Release 70.0.3538.87

This commit is contained in:
csagan5 2018-11-03 23:22:55 +01:00
parent aa96e7ce43
commit 7f7fc80c7a
No known key found for this signature in database
GPG key ID: 64190A51D85DC0C5
15 changed files with 1343 additions and 278 deletions

View file

@ -1,3 +1,11 @@
# 70.0.3538.87
* enable history requirement of user gesture (fixes https://github.com/bromite/bromite/issues/171)
* enable serialization of scroll position changes while loading (fixes https://github.com/bromite/bromite/issues/171)
* remove passwords keyboard accessory option (fixes https://github.com/bromite/bromite/issues/171)
* some improvements to bookmark import/export interaction
* add flag to disable orientation API, disabled by default
* disable device motion API by default (fixes https://github.com/bromite/bromite/issues/171)
# 70.0.3538.83
* fix keep session cookies option showing on all site settings views
* fix blank site settings entry showing (fixes https://github.com/bromite/bromite/issues/166)

File diff suppressed because it is too large Load diff

View file

@ -2,10 +2,49 @@ From: csagan5 <32685696+csagan5@users.noreply.github.com>
Date: Mon, 12 Feb 2018 21:29:30 +0100
Subject: ungoogled-chromium: Disable profile avatar downloading
Added some Bromite-specific further improvements
---
chrome/browser/profiles/profile_avatar_downloader.cc | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
chrome/browser/BUILD.gn | 2 --
chrome/browser/profiles/profile_attributes_entry.cc | 14 --------------
chrome/browser/profiles/profile_avatar_downloader.cc | 8 +-------
3 files changed, 1 insertion(+), 23 deletions(-)
diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
--- a/chrome/browser/BUILD.gn
+++ b/chrome/browser/BUILD.gn
@@ -1253,8 +1253,6 @@ jumbo_split_static_library("browser") {
"profiles/profile_attributes_entry.h",
"profiles/profile_attributes_storage.cc",
"profiles/profile_attributes_storage.h",
- "profiles/profile_avatar_downloader.cc",
- "profiles/profile_avatar_downloader.h",
"profiles/profile_avatar_icon_util.cc",
"profiles/profile_avatar_icon_util.h",
"profiles/profile_destroyer.cc",
diff --git a/chrome/browser/profiles/profile_attributes_entry.cc b/chrome/browser/profiles/profile_attributes_entry.cc
--- a/chrome/browser/profiles/profile_attributes_entry.cc
+++ b/chrome/browser/profiles/profile_attributes_entry.cc
@@ -83,20 +83,6 @@ base::string16 ProfileAttributesEntry::GetUserName() const {
}
const gfx::Image& ProfileAttributesEntry::GetAvatarIcon() const {
- if (IsUsingGAIAPicture()) {
- const gfx::Image* image = GetGAIAPicture();
- if (image)
- return *image;
- }
-
-#if !defined(OS_CHROMEOS) && !defined(OS_ANDROID)
- // Use the high resolution version of the avatar if it exists. Mobile and
- // ChromeOS don't need the high resolution version so no need to fetch it.
- const gfx::Image* image = GetHighResAvatar();
- if (image)
- return *image;
-#endif
-
int resource_id =
profiles::GetDefaultAvatarIconResourceIDAtIndex(GetAvatarIconIndex());
return ui::ResourceBundle::GetSharedInstance().GetNativeImageNamed(
diff --git a/chrome/browser/profiles/profile_avatar_downloader.cc b/chrome/browser/profiles/profile_avatar_downloader.cc
--- a/chrome/browser/profiles/profile_avatar_downloader.cc
+++ b/chrome/browser/profiles/profile_avatar_downloader.cc

View file

@ -13,7 +13,7 @@ Disable it by default on Android as it is everywhere else
diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
--- a/chrome/browser/about_flags.cc
+++ b/chrome/browser/about_flags.cc
@@ -3519,6 +3519,11 @@ const FeatureEntry kFeatureEntries[] = {
@@ -3520,6 +3520,11 @@ const FeatureEntry kFeatureEntries[] = {
FEATURE_VALUE_TYPE(media::kPictureInPicture)},
#endif // !defined(OS_ANDROID)

View file

@ -18,12 +18,12 @@ New mechanism for adblocking based on Brave's adblocking hook
.../browser/appmenu/AppMenuPropertiesDelegate.java | 38 +++
.../CustomTabAppMenuPropertiesDelegate.java | 2 +
.../java/strings/android_chrome_strings.grd | 11 +
chrome/browser/net/chrome_network_delegate.cc | 58 ++++
chrome/browser/net/chrome_network_delegate.cc | 62 ++++
.../subresource_filter_content_settings_manager.cc | 1 +
net/BUILD.gn | 7 +
net/url_request/adblock_intercept.cc | 325 +++++++++++++++++++++
net/url_request/adblock_intercept.h | 24 ++
12 files changed, 505 insertions(+)
12 files changed, 509 insertions(+)
create mode 100644 net/url_request/adblock_intercept.cc
create mode 100644 net/url_request/adblock_intercept.h
@ -213,7 +213,7 @@ diff --git a/chrome/browser/net/chrome_network_delegate.cc b/chrome/browser/net/
#endif
#if defined(OS_CHROMEOS)
@@ -174,15 +176,71 @@ void ChromeNetworkDelegate::set_cookie_settings(
@@ -174,15 +176,75 @@ void ChromeNetworkDelegate::set_cookie_settings(
cookie_settings_ = cookie_settings;
}
@ -244,14 +244,18 @@ diff --git a/chrome/browser/net/chrome_network_delegate.cc b/chrome/browser/net/
+ content::WebContents* web_contents = web_contents_getter.Run();
+ if (web_contents) {
+ Profile* profile = Profile::FromBrowserContext(web_contents->GetBrowserContext());
+ //FIXME: this should not be called from the IO thread
+ const HostContentSettingsMap* content_settings = HostContentSettingsMapFactory::GetForProfile(profile);
+
+ // check global value first
+ adblock_enabled = CONTENT_SETTING_BLOCK == content_settings->GetDefaultContentSetting(ContentSettingsType::CONTENT_SETTINGS_TYPE_ADS, NULL);
+ if (content_settings) {
+ // check global value first
+ adblock_enabled = CONTENT_SETTING_BLOCK == content_settings->GetDefaultContentSetting(ContentSettingsType::CONTENT_SETTINGS_TYPE_ADS, NULL);
+
+ if (!adblock_enabled) {
+ adblock_enabled = CONTENT_SETTING_BLOCK == content_settings->GetContentSetting(request->url(), GURL(), ContentSettingsType::CONTENT_SETTINGS_TYPE_ADS,
+ std::string());
+ if (!adblock_enabled) {
+ // check per-site value
+ adblock_enabled = CONTENT_SETTING_BLOCK == content_settings->GetContentSetting(request->url(), GURL(), ContentSettingsType::CONTENT_SETTINGS_TYPE_ADS,
+ std::string());
+ }
+ }
+ }
+

View file

@ -4,7 +4,7 @@ Subject: Canvas: fingerprinting mitigations for image data and webGL
Disable webGL renderer info and modify the color data returned by ToBlob,
ToDataURL and getImageData so that it will contain randomly manipulated
pixels (maximum 10) that slightly change the color of the R,G,B components
pixels (maximum 20) that slightly change the color of the R,G,B components
without a visible effect.
Credits to Slaviro (https://github.com/Slaviro) for coming up with a better

View file

@ -1,44 +1,52 @@
From: csagan5 <32685696+csagan5@users.noreply.github.com>
Date: Mon, 22 Oct 2018 21:29:53 +0200
Subject: Add flag to disable device motion API
Subject: Add flags to disable device motion and orientation APIs
Both flags will be disabled by default and prevent usage of gyroscope and
legacy acceleration events.
---
chrome/browser/about_flags.cc | 3 +++
chrome/browser/flag_descriptions.cc | 4 ++++
chrome/browser/flag_descriptions.h | 3 +++
content/browser/renderer_host/render_process_host_impl.cc | 1 +
content/child/runtime_features.cc | 3 +++
content/public/common/content_switches.cc | 3 +++
content/public/common/content_switches.h | 1 +
third_party/blink/public/platform/web_runtime_features.h | 1 +
third_party/blink/renderer/modules/modules_initializer.cc | 3 ++-
third_party/blink/renderer/platform/exported/web_runtime_features.cc | 4 ++++
third_party/blink/renderer/platform/runtime_enabled_features.json5 | 4 ++++
11 files changed, 29 insertions(+), 1 deletion(-)
chrome/browser/about_flags.cc | 6 ++++++
chrome/browser/flag_descriptions.cc | 8 ++++++++
chrome/browser/flag_descriptions.h | 6 ++++++
content/child/runtime_features.cc | 3 +++
content/public/common/content_features.cc | 10 ++++++++++
content/public/common/content_features.h | 2 ++
third_party/blink/public/platform/web_runtime_features.h | 2 ++
third_party/blink/renderer/modules/modules_initializer.cc | 9 ++++++---
.../blink/renderer/platform/exported/web_runtime_features.cc | 8 ++++++++
.../blink/renderer/platform/runtime_enabled_features.json5 | 8 ++++++++
10 files changed, 59 insertions(+), 3 deletions(-)
diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
--- a/chrome/browser/about_flags.cc
+++ b/chrome/browser/about_flags.cc
@@ -3040,6 +3040,9 @@ const FeatureEntry kFeatureEntries[] = {
@@ -3041,6 +3041,12 @@ const FeatureEntry kFeatureEntries[] = {
{"enable-generic-sensor", flag_descriptions::kEnableGenericSensorName,
flag_descriptions::kEnableGenericSensorDescription, kOsAll,
FEATURE_VALUE_TYPE(features::kGenericSensor)},
+ {"disable-device-motion", flag_descriptions::kDisableDeviceMotionName,
+ flag_descriptions::kDisableDeviceMotionDescription, kOsAll,
+ SINGLE_DISABLE_VALUE_TYPE(switches::kDisableDeviceMotion)},
+ {"enable-device-motion", flag_descriptions::kEnableDeviceMotionName,
+ flag_descriptions::kEnableDeviceMotionDescription, kOsAll,
+ FEATURE_VALUE_TYPE(features::kDeviceMotion)},
+ {"enable-device-orientation", flag_descriptions::kEnableDeviceOrientationName,
+ flag_descriptions::kEnableDeviceOrientationDescription, kOsAll,
+ FEATURE_VALUE_TYPE(features::kDeviceOrientation)},
{"enable-generic-sensor-extra-classes",
flag_descriptions::kEnableGenericSensorExtraClassesName,
flag_descriptions::kEnableGenericSensorExtraClassesDescription, kOsAll,
diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descriptions.cc
--- a/chrome/browser/flag_descriptions.cc
+++ b/chrome/browser/flag_descriptions.cc
@@ -556,6 +556,10 @@ const char kEnableGenericSensorDescription[] =
@@ -556,6 +556,14 @@ const char kEnableGenericSensorDescription[] =
"Accelerometer, LinearAccelerationSensor, Gyroscope, "
"AbsoluteOrientationSensor and RelativeOrientationSensor interfaces.";
+const char kDisableDeviceMotionName[] = "Disable device motion";
+const char kDisableDeviceMotionDescription[] =
+ "Disable device motion API";
+const char kEnableDeviceMotionName[] = "Enable device motion";
+const char kEnableDeviceMotionDescription[] =
+ "Enable device motion API which is used to detect changes in acceleration";
+
+const char kEnableDeviceOrientationName[] = "Enable device orientation";
+const char kEnableDeviceOrientationDescription[] =
+ "Enable device orientation API which is used to detect changes in orientation";
+
const char kEnableGenericSensorExtraClassesName[] =
"Generic Sensor Extra Classes";
@ -46,27 +54,19 @@ diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descripti
diff --git a/chrome/browser/flag_descriptions.h b/chrome/browser/flag_descriptions.h
--- a/chrome/browser/flag_descriptions.h
+++ b/chrome/browser/flag_descriptions.h
@@ -366,6 +366,9 @@ extern const char kEnableEnumeratingAudioDevicesDescription[];
@@ -366,6 +366,12 @@ extern const char kEnableEnumeratingAudioDevicesDescription[];
extern const char kEnableGenericSensorName[];
extern const char kEnableGenericSensorDescription[];
+extern const char kDisableDeviceMotionName[];
+extern const char kDisableDeviceMotionDescription[];
+extern const char kEnableDeviceMotionName[];
+extern const char kEnableDeviceMotionDescription[];
+
+extern const char kEnableDeviceOrientationName[];
+extern const char kEnableDeviceOrientationDescription[];
+
extern const char kEnableGenericSensorExtraClassesName[];
extern const char kEnableGenericSensorExtraClassesDescription[];
diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc
--- a/content/browser/renderer_host/render_process_host_impl.cc
+++ b/content/browser/renderer_host/render_process_host_impl.cc
@@ -2938,6 +2938,7 @@ void RenderProcessHostImpl::PropagateBrowserCommandLineToRenderer(
switches::kDisableCompositorUkmForTests,
switches::kDisablePreferCompositingToLCDText,
switches::kDisableDatabases,
+ switches::kDisableDeviceMotion,
switches::kDisableFileSystem,
switches::kDisableFrameRateLimit,
switches::kDisableGpuMemoryBufferVideoFrames,
diff --git a/content/child/runtime_features.cc b/content/child/runtime_features.cc
--- a/content/child/runtime_features.cc
+++ b/content/child/runtime_features.cc
@ -74,70 +74,89 @@ diff --git a/content/child/runtime_features.cc b/content/child/runtime_features.
if (command_line.HasSwitch(switches::kDisableSharedWorkers))
WebRuntimeFeatures::EnableSharedWorker(false);
+ if (command_line.HasSwitch(switches::kDisableDeviceMotion))
+ WebRuntimeFeatures::EnableDeviceMotion(false);
+ WebRuntimeFeatures::EnableDeviceMotion(base::FeatureList::IsEnabled(features::kDeviceMotion));
+ WebRuntimeFeatures::EnableDeviceOrientation(base::FeatureList::IsEnabled(features::kDeviceOrientation));
+
if (command_line.HasSwitch(switches::kDisableSpeechAPI))
WebRuntimeFeatures::EnableScriptedSpeech(false);
diff --git a/content/public/common/content_switches.cc b/content/public/common/content_switches.cc
--- a/content/public/common/content_switches.cc
+++ b/content/public/common/content_switches.cc
@@ -98,6 +98,9 @@ const char kDisableCompositorUkmForTests[] = "disable-compositor-ukm-for-tests";
// Disables HTML5 DB support.
const char kDisableDatabases[] = "disable-databases";
diff --git a/content/public/common/content_features.cc b/content/public/common/content_features.cc
--- a/content/public/common/content_features.cc
+++ b/content/public/common/content_features.cc
@@ -590,6 +590,16 @@ const base::Feature kWebRtcUseGpuMemoryBufferVideoFrames{
// https://wicg.github.io/webusb
const base::Feature kWebUsb{"WebUSB", base::FEATURE_ENABLED_BY_DEFAULT};
+// Disable device motion events.
+const char kDisableDeviceMotion[] = "disable-device-motion";
+// Enables the device motion API used to track device acceleration;
+// no user authorization or notifications happens when in use.
+const base::Feature kDeviceMotion{"DeviceMotion",
+ base::FEATURE_DISABLED_BY_DEFAULT};
+
// Disable the per-domain blocking for 3D APIs after GPU reset.
// This switch is intended only for tests.
const char kDisableDomainBlockingFor3DAPIs[] =
diff --git a/content/public/common/content_switches.h b/content/public/common/content_switches.h
--- a/content/public/common/content_switches.h
+++ b/content/public/common/content_switches.h
@@ -42,6 +42,7 @@ CONTENT_EXPORT extern const char kDisableBlinkFeatures[];
CONTENT_EXPORT extern const char kDisableCompositorUkmForTests[];
CONTENT_EXPORT extern const char kDisableDatabases[];
CONTENT_EXPORT extern const char kDisableDisplayList2dCanvas[];
+CONTENT_EXPORT extern const char kDisableDeviceMotion[];
extern const char kDisableDomainBlockingFor3DAPIs[];
CONTENT_EXPORT extern const char kDisableWebGL[];
CONTENT_EXPORT extern const char kDisableWebGL2[];
+// Enables the device orientation API used to track device orientation;
+// no user authorization or notifications happens when in use.
+const base::Feature kDeviceOrientation{"DeviceOrientation",
+ base::FEATURE_DISABLED_BY_DEFAULT};
+
// Controls whether WebVR VSync-aligned render loop timing is enabled.
const base::Feature kWebVrVsyncAlign{"WebVrVsyncAlign",
base::FEATURE_ENABLED_BY_DEFAULT};
diff --git a/content/public/common/content_features.h b/content/public/common/content_features.h
--- a/content/public/common/content_features.h
+++ b/content/public/common/content_features.h
@@ -155,6 +155,8 @@ CONTENT_EXPORT extern const char kWebXrRenderPathParamValueGpuFence[];
CONTENT_EXPORT extern const char kWebXrRenderPathParamValueSharedBuffer[];
#endif // defined(OS_ANDROID)
+CONTENT_EXPORT extern const base::Feature kDeviceMotion, kDeviceOrientation;
+
#if !defined(OS_ANDROID)
CONTENT_EXPORT extern const base::Feature kWebUIPolymer2;
#endif // !defined(OS_ANDROID)
diff --git a/third_party/blink/public/platform/web_runtime_features.h b/third_party/blink/public/platform/web_runtime_features.h
--- a/third_party/blink/public/platform/web_runtime_features.h
+++ b/third_party/blink/public/platform/web_runtime_features.h
@@ -84,6 +84,7 @@ class WebRuntimeFeatures {
@@ -84,6 +84,8 @@ class WebRuntimeFeatures {
BLINK_PLATFORM_EXPORT static void EnableCSSFragmentIdentifiers(bool);
BLINK_PLATFORM_EXPORT static void EnableScrollTopLeftInterop(bool);
BLINK_PLATFORM_EXPORT static void EnableDatabase(bool);
+ BLINK_PLATFORM_EXPORT static void EnableDeviceMotion(bool);
+ BLINK_PLATFORM_EXPORT static void EnableDeviceOrientation(bool);
BLINK_PLATFORM_EXPORT static void EnableDecodeToYUV(bool);
BLINK_PLATFORM_EXPORT static void EnableDisplayCutoutAPI(bool);
BLINK_PLATFORM_EXPORT static void EnableFastMobileScrolling(bool);
diff --git a/third_party/blink/renderer/modules/modules_initializer.cc b/third_party/blink/renderer/modules/modules_initializer.cc
--- a/third_party/blink/renderer/modules/modules_initializer.cc
+++ b/third_party/blink/renderer/modules/modules_initializer.cc
@@ -233,7 +233,8 @@ void ModulesInitializer::InitInspectorAgentSession(
@@ -233,9 +233,12 @@ void ModulesInitializer::InitInspectorAgentSession(
void ModulesInitializer::OnClearWindowObjectInMainWorld(
Document& document,
const Settings& settings) const {
- DeviceMotionController::From(document);
- DeviceOrientationController::From(document);
- DeviceOrientationAbsoluteController::From(document);
+ if (RuntimeEnabledFeatures::DeviceMotionEnabled())
+ DeviceMotionController::From(document);
DeviceOrientationController::From(document);
DeviceOrientationAbsoluteController::From(document);
+ if (RuntimeEnabledFeatures::DeviceOrientationEnabled()) {
+ DeviceOrientationController::From(document);
+ DeviceOrientationAbsoluteController::From(document);
+ }
NavigatorGamepad::From(document);
NavigatorServiceWorker::From(document);
DOMWindowStorageController::From(document);
diff --git a/third_party/blink/renderer/platform/exported/web_runtime_features.cc b/third_party/blink/renderer/platform/exported/web_runtime_features.cc
--- a/third_party/blink/renderer/platform/exported/web_runtime_features.cc
+++ b/third_party/blink/renderer/platform/exported/web_runtime_features.cc
@@ -140,6 +140,10 @@ void WebRuntimeFeatures::EnableDatabase(bool enable) {
@@ -140,6 +140,14 @@ void WebRuntimeFeatures::EnableDatabase(bool enable) {
RuntimeEnabledFeatures::SetDatabaseEnabled(enable);
}
+void WebRuntimeFeatures::EnableDeviceMotion(bool enable) {
+ RuntimeEnabledFeatures::SetDeviceMotionEnabled(enable);
+}
+
+void WebRuntimeFeatures::EnableDeviceOrientation(bool enable) {
+ RuntimeEnabledFeatures::SetDeviceOrientationEnabled(enable);
+}
+
void WebRuntimeFeatures::EnableDecodeToYUV(bool enable) {
RuntimeEnabledFeatures::SetDecodeToYUVEnabled(enable);
@ -145,13 +164,17 @@ diff --git a/third_party/blink/renderer/platform/exported/web_runtime_features.c
diff --git a/third_party/blink/renderer/platform/runtime_enabled_features.json5 b/third_party/blink/renderer/platform/runtime_enabled_features.json5
--- a/third_party/blink/renderer/platform/runtime_enabled_features.json5
+++ b/third_party/blink/renderer/platform/runtime_enabled_features.json5
@@ -348,6 +348,10 @@
@@ -348,6 +348,14 @@
status: "stable",
},
{
+ name: "DeviceMotion",
+ status: "stable",
+ },
+ {
+ name: "DeviceOrientation",
+ status: "stable",
+ },
+ {
name: "DecodeToYUV",
status: "experimental",

View file

@ -23,7 +23,7 @@ See also: https://tools.ietf.org/id/draft-ietf-doh-dns-over-https-12.txt
diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
--- a/chrome/browser/about_flags.cc
+++ b/chrome/browser/about_flags.cc
@@ -416,6 +416,13 @@ const FeatureEntry::Choice kChromeHomeSwipeLogicChoices[] = {
@@ -417,6 +417,13 @@ const FeatureEntry::Choice kChromeHomeSwipeLogicChoices[] = {
switches::kChromeHomeSwipeLogicType, "velocity"},
};
@ -37,7 +37,7 @@ diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
#endif // OS_ANDROID
const FeatureEntry::Choice kNumRasterThreadsChoices[] = {
@@ -3722,6 +3729,12 @@ const FeatureEntry kFeatureEntries[] = {
@@ -3730,6 +3737,12 @@ const FeatureEntry kFeatureEntries[] = {
FEATURE_VALUE_TYPE(features::kAsyncDns)},
#endif // defined(OS_ANDROID)
@ -53,7 +53,7 @@ diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descriptions.cc
--- a/chrome/browser/flag_descriptions.cc
+++ b/chrome/browser/flag_descriptions.cc
@@ -2248,6 +2248,9 @@ const char kAndroidPaymentAppsDescription[] =
@@ -2252,6 +2252,9 @@ const char kAndroidPaymentAppsDescription[] =
const char kAsyncDnsName[] = "Async DNS resolver";
const char kAsyncDnsDescription[] = "Enables the built-in DNS resolver.";
@ -66,7 +66,7 @@ diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descripti
diff --git a/chrome/browser/flag_descriptions.h b/chrome/browser/flag_descriptions.h
--- a/chrome/browser/flag_descriptions.h
+++ b/chrome/browser/flag_descriptions.h
@@ -1353,6 +1353,9 @@ extern const char kAppNotificationStatusMessagingDescription[];
@@ -1356,6 +1356,9 @@ extern const char kAppNotificationStatusMessagingDescription[];
extern const char kAsyncDnsName[];
extern const char kAsyncDnsDescription[];

View file

@ -18,7 +18,7 @@ with limited CPU/memory resources and it is disabled by default.
diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
--- a/chrome/browser/about_flags.cc
+++ b/chrome/browser/about_flags.cc
@@ -909,6 +909,11 @@ const FeatureEntry::Choice kForceEffectiveConnectionTypeChoices[] = {
@@ -910,6 +910,11 @@ const FeatureEntry::Choice kForceEffectiveConnectionTypeChoices[] = {
net::kEffectiveConnectionType4G},
};
@ -30,7 +30,7 @@ diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
// Ensure that all effective connection types returned by Network Quality
// Estimator (NQE) are also exposed via flags.
static_assert(net::EFFECTIVE_CONNECTION_TYPE_LAST + 2 ==
@@ -2607,6 +2612,9 @@ const FeatureEntry kFeatureEntries[] = {
@@ -2608,6 +2613,9 @@ const FeatureEntry kFeatureEntries[] = {
flag_descriptions::kMaterialDesignIncognitoNTPName,
flag_descriptions::kMaterialDesignIncognitoNTPDescription, kOsAndroid,
FEATURE_VALUE_TYPE(features::kMaterialDesignIncognitoNTP)},
@ -43,7 +43,7 @@ diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descriptions.cc
--- a/chrome/browser/flag_descriptions.cc
+++ b/chrome/browser/flag_descriptions.cc
@@ -1141,6 +1141,10 @@ const char kMaterialDesignIncognitoNTPDescription[] =
@@ -1145,6 +1145,10 @@ const char kMaterialDesignIncognitoNTPDescription[] =
"If enabled, the Incognito New Tab page uses the new material design with "
"a better readable text.";
@ -57,7 +57,7 @@ diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descripti
diff --git a/chrome/browser/flag_descriptions.h b/chrome/browser/flag_descriptions.h
--- a/chrome/browser/flag_descriptions.h
+++ b/chrome/browser/flag_descriptions.h
@@ -708,6 +708,9 @@ extern const char kMarkHttpAsWarningAndDangerousOnPasswordsAndCreditCards[];
@@ -711,6 +711,9 @@ extern const char kMarkHttpAsWarningAndDangerousOnPasswordsAndCreditCards[];
extern const char kMaterialDesignIncognitoNTPName[];
extern const char kMaterialDesignIncognitoNTPDescription[];

View file

@ -2,24 +2,25 @@ From: csagan5 <32685696+csagan5@users.noreply.github.com>
Date: Wed, 1 Aug 2018 09:19:40 +0200
Subject: Add bookmark import/export actions in bookmarks activity and page
Thanks to Arnaud for the snippet on how to add toast notifications
---
.../java/res/menu/bookmark_action_bar_menu.xml | 14 ++
.../browser/bookmarks/BookmarkActionBar.java | 12 ++
.../chrome/browser/bookmarks/BookmarkActivity.java | 19 ++
.../chrome/browser/bookmarks/BookmarkBridge.java | 21 ++
.../chrome/browser/bookmarks/BookmarkBridge.java | 55 ++++++
.../chrome/browser/bookmarks/BookmarkDelegate.java | 10 +
.../chrome/browser/bookmarks/BookmarkManager.java | 20 ++
.../chrome/browser/bookmarks/BookmarkPage.java | 1 +
.../java/strings/android_chrome_strings.grd | 6 +
chrome/browser/BUILD.gn | 8 +-
.../browser/android/bookmarks/bookmark_bridge.cc | 219 +++++++++++++++++++++
chrome/browser/android/bookmarks/bookmark_bridge.h | 19 +-
.../browser/android/bookmarks/bookmark_bridge.cc | 215 +++++++++++++++++++++
chrome/browser/android/bookmarks/bookmark_bridge.h | 20 +-
chrome/browser/importer/profile_writer.cc | 2 +
chrome/common/BUILD.gn | 3 +
chrome/utility/BUILD.gn | 7 +-
chrome/utility/importer/bookmark_html_reader.cc | 27 ++-
chrome/utility/importer/bookmark_html_reader.h | 9 +
16 files changed, 387 insertions(+), 10 deletions(-)
16 files changed, 418 insertions(+), 10 deletions(-)
diff --git a/chrome/android/java/res/menu/bookmark_action_bar_menu.xml b/chrome/android/java/res/menu/bookmark_action_bar_menu.xml
--- a/chrome/android/java/res/menu/bookmark_action_bar_menu.xml
@ -141,15 +142,36 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/Bookm
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkBridge.java b/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkBridge.java
--- a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkBridge.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkBridge.java
@@ -18,6 +18,7 @@ import org.chromium.chrome.browser.profiles.Profile;
@@ -4,7 +4,11 @@
package org.chromium.chrome.browser.bookmarks;
+import android.content.Intent;
+import android.content.Context;
+import android.net.Uri;
import android.os.SystemClock;
+import android.provider.Browser;
import android.text.TextUtils;
import android.util.Pair;
@@ -13,11 +17,16 @@ import org.chromium.base.ObserverList;
import org.chromium.base.VisibleForTesting;
import org.chromium.base.annotations.CalledByNative;
import org.chromium.base.metrics.RecordHistogram;
+import org.chromium.chrome.browser.document.ChromeLauncherActivity;
+import org.chromium.chrome.browser.IntentHandler;
import org.chromium.chrome.browser.partnerbookmarks.PartnerBookmarksShim;
import org.chromium.chrome.browser.profiles.Profile;
import org.chromium.components.bookmarks.BookmarkId;
import org.chromium.components.bookmarks.BookmarkType;
import org.chromium.components.url_formatter.UrlFormatter;
+import org.chromium.ui.base.PageTransition;
+import org.chromium.ui.base.WindowAndroid;
+import org.chromium.ui.widget.Toast;
import java.util.ArrayList;
import java.util.List;
@@ -508,6 +509,24 @@ public class BookmarkBridge {
@@ -508,6 +517,24 @@ public class BookmarkBridge {
}
/**
@ -174,7 +196,40 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/Bookm
* Synchronously gets a list of bookmarks that match the specified search query.
* @param query Keyword used for searching bookmarks.
* @param maxNumberOfResult Maximum number of result to fetch.
@@ -906,6 +925,8 @@ public class BookmarkBridge {
@@ -840,6 +867,32 @@ public class BookmarkBridge {
depthList.add(depth);
}
+
+ @CalledByNative
+ public void bookmarksImported() {
+ Context context = ContextUtils.getApplicationContext();
+
+ Toast.makeText(ContextUtils.getApplicationContext(), "Bookmarks imported", Toast.LENGTH_LONG).show();
+ }
+
+ @CalledByNative
+ public void bookmarksExported(String bookmarksPath) {
+ Context context = ContextUtils.getApplicationContext();
+
+ Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse("file://" + bookmarksPath));
+ intent.putExtra(Browser.EXTRA_APPLICATION_ID,
+ context.getPackageName());
+ intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
+ intent.putExtra(IntentHandler.EXTRA_PAGE_TRANSITION_TYPE, PageTransition.AUTO_BOOKMARK);
+
+ // If the bookmark manager is shown in a tab on a phone (rather than in a separate
+ // activity) the component name may be null. Send the intent through
+ // ChromeLauncherActivity instead to avoid crashing. See crbug.com/615012.
+ intent.setClass(context, ChromeLauncherActivity.class);
+
+ IntentHandler.startActivityForTrustedIntent(intent);
+ }
+
private static List<Pair<Integer, Integer>> createPairsList(int[] left, int[] right) {
List<Pair<Integer, Integer>> pairList = new ArrayList<Pair<Integer, Integer>>();
for (int i = 0; i < left.length; i++) {
@@ -906,6 +959,8 @@ public class BookmarkBridge {
boolean getFolders, boolean getBookmarks, List<BookmarkId> bookmarksList);
private native BookmarkId nativeGetChildAt(long nativeBookmarkBridge, long id, int type,
int index);
@ -437,7 +492,7 @@ diff --git a/chrome/browser/android/bookmarks/bookmark_bridge.cc b/chrome/browse
}
void BookmarkBridge::Destroy(JNIEnv*, const JavaParamRef<jobject>&) {
@@ -470,6 +539,156 @@ jint BookmarkBridge::GetTotalBookmarkCount(
@@ -470,6 +539,152 @@ jint BookmarkBridge::GetTotalBookmarkCount(
return count;
}
@ -445,6 +500,7 @@ diff --git a/chrome/browser/android/bookmarks/bookmark_bridge.cc b/chrome/browse
+ const JavaParamRef<jobject>& obj,
+ const JavaParamRef<jobject>& java_window) {
+ DCHECK(IsLoaded());
+ DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
+
+ ui::WindowAndroid* window =
+ ui::WindowAndroid::FromJavaWindowAndroid(java_window);
@ -462,39 +518,39 @@ diff --git a/chrome/browser/android/bookmarks/bookmark_bridge.cc b/chrome/browse
+ file_type_info.allowed_paths =
+ ui::SelectFileDialog::FileTypeInfo::NATIVE_OR_DRIVE_PATH;
+
+ const base::FilePath file_path;
+
+ select_file_dialog_->SelectFile(
+ ui::SelectFileDialog::SELECT_OPEN_FILE,
+ base::string16(),
+ file_path,
+ NULL,
+ import_path_,
+ &file_type_info,
+ 0,
+ base::FilePath::StringType(),
+ window,
+ NULL);
+}
+
+void ExporterCallback(Profile* profile, const base::FilePath& path) {
+ bookmark_html_writer::WriteBookmarks(profile, path, NULL);
+ //NOTE: nothing will be written if write permission has not been granted before
+ LOG(INFO) << "Bookmarks exported successfully in " << path;
+ //NOTE: this should be called after the actual import
+ Java_BookmarkBridge_bookmarksImported(env, obj);
+}
+
+void BookmarkBridge::ExportBookmarks(JNIEnv* env,
+ const JavaParamRef<jobject>& obj) {
+ DCHECK(IsLoaded());
+ base::FilePath path;
+ if (!base::android::GetDownloadsDirectory(&path)) {
+ LOG(ERROR) << "Could not retrieve downloads directory for bookmarks export";
+ return;
+ DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
+
+ if (import_path_.empty()) {
+ if (!base::android::GetDownloadsDirectory(&import_path_)) {
+ LOG(ERROR) << "Could not retrieve downloads directory for bookmarks export";
+ return;
+ }
+ import_path_ = import_path_.Append(FILE_PATH_LITERAL("bookmarks.html"));
+ }
+
+ path = path.Append(FILE_PATH_LITERAL("bookmarks.html"));
+ bookmark_html_writer::WriteBookmarks(profile_, import_path_, NULL);
+
+// base::PostTaskWithTraits(FROM_HERE, {base::MayBlock()},
+// base::BindOnce(&ExporterCallback, profile_, path));
+ ExporterCallback(profile_, path);
+ //NOTE: nothing will be written if write permission has not been granted before
+ LOG(INFO) << "Bookmarks exported successfully in " << import_path_;
+
+ Java_BookmarkBridge_bookmarksExported(env, obj, ConvertUTF8ToJavaString(env, import_path_.MaybeAsASCII()));
+}
+
+// Attempts to create a TemplateURL from the provided data. |title| is optional.
@ -513,40 +569,6 @@ diff --git a/chrome/browser/android/bookmarks/bookmark_bridge.cc b/chrome/browse
+ return std::make_unique<TemplateURL>(data);
+}
+
+void ImporterCallback(Profile* profile, const base::FilePath& path, const std::string& contents) {
+ // this import logic comes from BookmarksFileImporter class
+ std::vector<ImportedBookmarkEntry> bookmarks;
+ std::vector<importer::SearchEngineInfo> search_engines;
+
+ bookmark_html_reader::ImportBookmarksFile(
+ base::Callback<bool(void)>(),
+ base::Bind(internal::CanImportURL),
+ contents,
+ &bookmarks,
+ &search_engines,
+ nullptr);
+
+ // writing to profile will begin extensive changes and use the same bookmarks model for persisting changes
+ auto *writer = new ProfileWriter(profile);
+
+ if (!bookmarks.empty()) {
+ writer->AddBookmarks(bookmarks, base::ASCIIToUTF16("Imported"));
+ }
+ if (!search_engines.empty()) {
+ TemplateURLService::OwnedTemplateURLVector owned_template_urls;
+ for (const auto& search_engine : search_engines) {
+ std::unique_ptr<TemplateURL> owned_template_url = CreateTemplateURL(
+ search_engine.url, search_engine.keyword, search_engine.display_name);
+ if (owned_template_url)
+ owned_template_urls.push_back(std::move(owned_template_url));
+ }
+ writer->AddKeywords(std::move(owned_template_urls), false);
+ }
+
+ LOG(INFO) << "Imported " << bookmarks.size() << " bookmarks and " <<
+ search_engines.size() << " search engines from " << path;
+}
+
+void BookmarkBridge::FileSelected(const base::FilePath& path, int index,
+ void* params) {
+ base::File file;
@ -582,10 +604,39 @@ diff --git a/chrome/browser/android/bookmarks/bookmark_bridge.cc b/chrome/browse
+ return;
+ }
+
+ std::string content(buffer.begin(), buffer.end());
+// base::PostTaskWithTraits(FROM_HERE, {base::MayBlock()},
+// base::BindOnce(&ImporterCallback, profile_, path, content));
+ ImporterCallback(profile_, path, content);
+ std::string contents(buffer.begin(), buffer.end());
+
+ // the following import logic comes from BookmarksFileImporter class
+ std::vector<ImportedBookmarkEntry> bookmarks;
+ std::vector<importer::SearchEngineInfo> search_engines;
+
+ bookmark_html_reader::ImportBookmarksFile(
+ base::Callback<bool(void)>(),
+ base::Bind(internal::CanImportURL),
+ contents,
+ &bookmarks,
+ &search_engines,
+ nullptr);
+
+ // writing to profile will begin extensive changes and use the same bookmarks model for persisting changes
+ auto *writer = new ProfileWriter(profile_);
+
+ if (!bookmarks.empty()) {
+ writer->AddBookmarks(bookmarks, base::ASCIIToUTF16("Imported"));
+ }
+ if (!search_engines.empty()) {
+ TemplateURLService::OwnedTemplateURLVector owned_template_urls;
+ for (const auto& search_engine : search_engines) {
+ std::unique_ptr<TemplateURL> owned_template_url = CreateTemplateURL(
+ search_engine.url, search_engine.keyword, search_engine.display_name);
+ if (owned_template_url)
+ owned_template_urls.push_back(std::move(owned_template_url));
+ }
+ writer->AddKeywords(std::move(owned_template_urls), false);
+ }
+
+ LOG(INFO) << "Imported " << bookmarks.size() << " bookmarks and " <<
+ search_engines.size() << " search engines from " << import_path_;
+}
+
+void BookmarkBridge::FileSelectionCanceled(void* params) {
@ -643,7 +694,14 @@ diff --git a/chrome/browser/android/bookmarks/bookmark_bridge.h b/chrome/browser
void SetBookmarkTitle(JNIEnv* env,
const base::android::JavaParamRef<jobject>& obj,
jlong id,
@@ -267,6 +283,7 @@ class BookmarkBridge : public bookmarks::BaseBookmarkModelObserver,
@@ -261,12 +277,14 @@ class BookmarkBridge : public bookmarks::BaseBookmarkModelObserver,
void ShimBeingDeleted(PartnerBookmarksShim* shim) override;
Profile* profile_;
+ base::FilePath import_path_;
JavaObjectWeakGlobalRef weak_java_ref_;
bookmarks::BookmarkModel* bookmark_model_; // weak
bookmarks::ManagedBookmarkService* managed_bookmark_service_; // weak
std::unique_ptr<bookmarks::ScopedGroupBookmarkActions>
grouped_bookmark_actions_;
PrefChangeRegistrar pref_change_registrar_;

View file

@ -6,8 +6,9 @@ Subject: Allow building without safebrowsing for Android
.../android/java/res/xml/privacy_preferences.xml | 12 -----
.../preferences/privacy/PrivacyPreferences.java | 58 ----------------------
.../chrome_browsing_data_remover_delegate.cc | 10 ----
chrome/browser/chrome_content_browser_client.cc | 14 +-----
.../chrome_resource_dispatcher_host_delegate.cc | 2 +
4 files changed, 2 insertions(+), 80 deletions(-)
5 files changed, 3 insertions(+), 93 deletions(-)
diff --git a/chrome/android/java/res/xml/privacy_preferences.xml b/chrome/android/java/res/xml/privacy_preferences.xml
--- a/chrome/android/java/res/xml/privacy_preferences.xml
@ -160,6 +161,28 @@ diff --git a/chrome/browser/browsing_data/chrome_browsing_data_remover_delegate.
} // namespace
ChromeBrowsingDataRemoverDelegate::ChromeBrowsingDataRemoverDelegate(
diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc
--- a/chrome/browser/chrome_content_browser_client.cc
+++ b/chrome/browser/chrome_content_browser_client.cc
@@ -4790,17 +4790,5 @@ ChromeContentBrowserClient::GetSafeBrowsingUrlCheckerDelegate(
content::ResourceContext* resource_context) {
DCHECK_CURRENTLY_ON(BrowserThread::IO);
- ProfileIOData* io_data = ProfileIOData::FromResourceContext(resource_context);
- if (!io_data->safe_browsing_enabled()->GetValue())
- return nullptr;
-
- // |safe_browsing_service_| may be unavailable in tests.
- if (safe_browsing_service_ && !safe_browsing_url_checker_delegate_) {
- safe_browsing_url_checker_delegate_ =
- base::MakeRefCounted<safe_browsing::UrlCheckerDelegateImpl>(
- safe_browsing_service_->database_manager(),
- safe_browsing_service_->ui_manager());
- }
-
- return safe_browsing_url_checker_delegate_.get();
+ return nullptr;
}
diff --git a/chrome/browser/loader/chrome_resource_dispatcher_host_delegate.cc b/chrome/browser/loader/chrome_resource_dispatcher_host_delegate.cc
--- a/chrome/browser/loader/chrome_resource_dispatcher_host_delegate.cc
+++ b/chrome/browser/loader/chrome_resource_dispatcher_host_delegate.cc

View file

@ -38,7 +38,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/toolbar/Toolbar
diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
--- a/chrome/browser/about_flags.cc
+++ b/chrome/browser/about_flags.cc
@@ -3982,10 +3982,6 @@ const FeatureEntry kFeatureEntries[] = {
@@ -3990,10 +3990,6 @@ const FeatureEntry kFeatureEntries[] = {
FEATURE_VALUE_TYPE(features::kOobeRecommendAppsScreen)},
#endif // OS_CHROMEOS
@ -63,7 +63,7 @@ diff --git a/chrome/browser/android/chrome_feature_list.cc b/chrome/browser/andr
diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descriptions.cc
--- a/chrome/browser/flag_descriptions.cc
+++ b/chrome/browser/flag_descriptions.cc
@@ -1527,11 +1527,6 @@ const char kPullToRefreshDescription[] =
@@ -1531,11 +1531,6 @@ const char kPullToRefreshDescription[] =
"Pull-to-refresh gesture in response to vertical overscroll.";
const char kPullToRefreshEnabledTouchscreen[] = "Enabled for touchscreen only";
@ -78,7 +78,7 @@ diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descripti
diff --git a/chrome/browser/flag_descriptions.h b/chrome/browser/flag_descriptions.h
--- a/chrome/browser/flag_descriptions.h
+++ b/chrome/browser/flag_descriptions.h
@@ -937,9 +937,6 @@ extern const char kPullToRefreshName[];
@@ -940,9 +940,6 @@ extern const char kPullToRefreshName[];
extern const char kPullToRefreshDescription[];
extern const char kPullToRefreshEnabledTouchscreen[];

View file

@ -0,0 +1,24 @@
From: csagan5 <32685696+csagan5@users.noreply.github.com>
Date: Fri, 2 Nov 2018 14:06:17 +0100
Subject: Enable history requirement of user gesture
Set #enable-history-entry-requires-user-gesture to enabled by default
---
chrome/browser/about_flags.cc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
--- a/chrome/browser/about_flags.cc
+++ b/chrome/browser/about_flags.cc
@@ -1486,7 +1486,7 @@ const FeatureEntry kFeatureEntries[] = {
{"enable-history-entry-requires-user-gesture",
flag_descriptions::kHistoryRequiresUserGestureName,
flag_descriptions::kHistoryRequiresUserGestureDescription, kOsAll,
- SINGLE_VALUE_TYPE(switches::kHistoryEntryRequiresUserGesture)},
+ SINGLE_DISABLE_VALUE_TYPE(switches::kHistoryEntryRequiresUserGesture)},
{"disable-pushstate-throttle",
flag_descriptions::kDisablePushStateThrottleName,
flag_descriptions::kDisablePushStateThrottleDescription, kOsAll,
--
2.11.0

View file

@ -0,0 +1,24 @@
From: csagan5 <32685696+csagan5@users.noreply.github.com>
Date: Fri, 2 Nov 2018 14:10:32 +0100
Subject: Enable serialization of scroll position changes while loading
Set #enable-scroll-anchor-serialization to enabled by default
---
content/public/common/content_features.cc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/content/public/common/content_features.cc b/content/public/common/content_features.cc
--- a/content/public/common/content_features.cc
+++ b/content/public/common/content_features.cc
@@ -377,7 +377,7 @@ const base::Feature kRunVideoCaptureServiceInBrowserProcess{
// Save the scroll anchor and use it to restore scroll position.
const base::Feature kScrollAnchorSerialization{
- "ScrollAnchorSerialization", base::FEATURE_DISABLED_BY_DEFAULT};
+ "ScrollAnchorSerialization", base::FEATURE_ENABLED_BY_DEFAULT};
// Make sendBeacon throw for a Blob with a non simple type.
const base::Feature kSendBeaconThrowForBlobWithNonSimpleType{
--
2.11.0

View file

@ -0,0 +1,117 @@
From: csagan5 <32685696+csagan5@users.noreply.github.com>
Date: Fri, 2 Nov 2018 20:01:11 +0100
Subject: Remove passwords keyboard accessory option
Completely rip out #passwords-keyboard-accessory, since the default of
disabled does not seem to be working
---
chrome/browser/about_flags.cc | 5 -----
chrome/browser/android/chrome_feature_list.cc | 1 -
chrome/browser/flag_descriptions.cc | 6 ------
chrome/browser/flag_descriptions.h | 3 ---
chrome/browser/password_manager/password_accessory_controller.cc | 8 +-------
.../password_manager/core/common/password_manager_features.cc | 4 ----
.../password_manager/core/common/password_manager_features.h | 1 -
7 files changed, 1 insertion(+), 27 deletions(-)
diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
--- a/chrome/browser/about_flags.cc
+++ b/chrome/browser/about_flags.cc
@@ -2854,11 +2854,6 @@ const FeatureEntry kFeatureEntries[] = {
{"password-search", flag_descriptions::kPasswordSearchMobileName,
flag_descriptions::kPasswordSearchMobileDescription, kOsAndroid,
FEATURE_VALUE_TYPE(password_manager::features::kPasswordSearchMobile)},
- {"passwords-keyboard-accessory",
- flag_descriptions::kPasswordsKeyboardAccessoryName,
- flag_descriptions::kPasswordsKeyboardAccessoryDescription, kOsAndroid,
- FEATURE_VALUE_TYPE(
- password_manager::features::kPasswordsKeyboardAccessory)},
#endif // OS_ANDROID
#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
{"passwords-migrate-linux-to-login-db",
diff --git a/chrome/browser/android/chrome_feature_list.cc b/chrome/browser/android/chrome_feature_list.cc
--- a/chrome/browser/android/chrome_feature_list.cc
+++ b/chrome/browser/android/chrome_feature_list.cc
@@ -170,7 +170,6 @@ const base::Feature* kFeaturesExposedToJava[] = {
&omnibox::kUIExperimentHideSteadyStateUrlSchemeAndSubdomains,
&password_manager::features::kPasswordExport,
&password_manager::features::kPasswordSearchMobile,
- &password_manager::features::kPasswordsKeyboardAccessory,
&unified_consent::kUnifiedConsent,
&subresource_filter::kSafeBrowsingSubresourceFilter,
};
diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descriptions.cc
--- a/chrome/browser/flag_descriptions.cc
+++ b/chrome/browser/flag_descriptions.cc
@@ -1480,12 +1480,6 @@ const char kPasswordSearchMobileName[] = "Password search";
const char kPasswordSearchMobileDescription[] =
"Search functionality in password settings.";
-const char kPasswordsKeyboardAccessoryName[] =
- "Add password-related functions to keyboard accessory";
-const char kPasswordsKeyboardAccessoryDescription[] =
- "Adds password generation button and toggle for the passwords bottom sheet "
- "to the keyboard accessory. Replaces password generation popups.";
-
const char kPasswordsMigrateLinuxToLoginDBName[] =
"Migrate passwords to \"Login Data\"";
const char kPasswordsMigrateLinuxToLoginDBDescription[] =
diff --git a/chrome/browser/flag_descriptions.h b/chrome/browser/flag_descriptions.h
--- a/chrome/browser/flag_descriptions.h
+++ b/chrome/browser/flag_descriptions.h
@@ -909,9 +909,6 @@ extern const char kPasswordImportDescription[];
extern const char kPasswordSearchMobileName[];
extern const char kPasswordSearchMobileDescription[];
-extern const char kPasswordsKeyboardAccessoryName[];
-extern const char kPasswordsKeyboardAccessoryDescription[];
-
extern const char kPasswordsMigrateLinuxToLoginDBName[];
extern const char kPasswordsMigrateLinuxToLoginDBDescription[];
diff --git a/chrome/browser/password_manager/password_accessory_controller.cc b/chrome/browser/password_manager/password_accessory_controller.cc
--- a/chrome/browser/password_manager/password_accessory_controller.cc
+++ b/chrome/browser/password_manager/password_accessory_controller.cc
@@ -158,13 +158,7 @@ PasswordAccessoryController::~PasswordAccessoryController() = default;
bool PasswordAccessoryController::AllowedForWebContents(
content::WebContents* web_contents) {
DCHECK(web_contents) << "Need valid WebContents to attach controller to!";
- if (vr::VrTabHelper::IsInVr(web_contents)) {
- return false; // TODO(crbug.com/865749): Reenable if works for VR keyboard.
- }
- // Either #passwords-keyboards-accessory or #experimental-ui must be enabled.
- return base::FeatureList::IsEnabled(
- password_manager::features::kPasswordsKeyboardAccessory) ||
- base::FeatureList::IsEnabled(features::kExperimentalUi);
+ return false;
}
// static
diff --git a/components/password_manager/core/common/password_manager_features.cc b/components/password_manager/core/common/password_manager_features.cc
--- a/components/password_manager/core/common/password_manager_features.cc
+++ b/components/password_manager/core/common/password_manager_features.cc
@@ -68,10 +68,6 @@ const base::Feature kPasswordImport = {"PasswordImport",
const base::Feature kPasswordSearchMobile = {"PasswordSearchMobile",
base::FEATURE_ENABLED_BY_DEFAULT};
-// Adds password-related features to the keyboard accessory on mobile devices.
-const base::Feature kPasswordsKeyboardAccessory = {
- "PasswordsKeyboardAccessory", base::FEATURE_DISABLED_BY_DEFAULT};
-
// Enables the experiment for the password manager to only fill on account
// selection, rather than autofilling on page load, with highlighting of fields.
const base::Feature kFillOnAccountSelect = {"fill-on-account-select",
diff --git a/components/password_manager/core/common/password_manager_features.h b/components/password_manager/core/common/password_manager_features.h
--- a/components/password_manager/core/common/password_manager_features.h
+++ b/components/password_manager/core/common/password_manager_features.h
@@ -32,7 +32,6 @@ extern const base::Feature kNewPasswordFormParsingForSaving;
extern const base::Feature kPasswordExport;
extern const base::Feature kPasswordImport;
extern const base::Feature kPasswordSearchMobile;
-extern const base::Feature kPasswordsKeyboardAccessory;
extern const base::Feature kProtectSyncCredential;
extern const base::Feature kProtectSyncCredentialOnReauth;
--
2.11.0