Compare commits

...
Author SHA1 Message Date
csagan5 7f7fc80c7a Release 70.0.3538.87 2018-11-03 23:22:55 +01:00
csagan5 aa96e7ce43 Release 70.0.3538.83 2018-10-30 16:13:18 +01:00
csagan5 5c9d69ebcc Mention improvement for background video playback 2018-10-27 20:18:17 +02:00
csagan5 7469dbed21 Release 70.0.3538.80 2018-10-27 20:14:19 +02:00
csagan5 bc1f0b79f5 Release 70.0.3538.77 2018-10-24 17:32:08 +02:00
csagan5 4c2225259f More verbose lines about anti-fingerprinting mitigations 2018-10-23 08:40:27 +02:00
67 changed files with 2289 additions and 315 deletions
+23
View File
@@ -1,3 +1,26 @@
# 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)
* offer builtin autocomplete for chrome://flags quick access
# 70.0.3538.80
* add flag to disable video resume functionality, allowing to not pause video playback on tab switch (fixes https://github.com/bromite/bromite/issues/108)
* prevent "are you there" prompts from appearing when playing videos
* completely disable update scheduler checks to fix a related crash
# 70.0.3538.77
* disable generic sensor APIs by default (fixes https://github.com/bromite/bromite/issues/160)
* introduce flag to disable device motion API (fixes https://github.com/bromite/bromite/issues/160)
* add Quad9 as a DNS-over-HTTPS (DoH) option (fixes https://github.com/bromite/bromite/issues/140)
# 70.0.3538.71
* fix bug with canvas fingerprinting (fixes https://github.com/bromite/bromite/issues/154)
+4 -3
View File
@@ -70,17 +70,18 @@ Yes, since version 69. While the desktop version of Chromium has an option to di
* baked-in adblock engine with filters from EasyList, EasyPrivacy and others
* remove click-tracking and AMP from search results
* DNS-over-HTTPS support via Google/CloudFlare servers
* DNS-over-HTTPS support via Google, Cloudflare and Quad9 servers
* [StartPage](https://startpage.com/), [DuckDuckGo](https://duckduckgo.com/) and [Qwant](https://www.qwant.com/) search engines
* chrome flags to disable custom intents and clear session on exit
* always-incognito mode
* completely removed safe browsing and other privacy-unfriendly features
* anti-fingerprinting mitigations for canvas, audio, client rects, webGL and sensor APIs
* use fixed User-Agent to conceal real model and browser version
* privacy enhancement patches from [Iridium](https://iridiumbrowser.de/), [Inox patchset](https://github.com/gcarq/inox-patchset), [Brave](https://brave.com/) and [ungoogled-chromium](https://github.com/Eloston/ungoogled-chromium) projects
* canvas, audio and other anti-fingerprinting mitigations
## Features not related to privacy
* import/export bookmarks
* allow playing videos in background
* allow playing videos in background tabs and disable pause on switching tabs
* all codecs included (proprietary, open H.264 etc.)
* built with official speed optimizations
+1439 -176
View File
File diff suppressed because it is too large Load Diff
@@ -3,14 +3,14 @@ Date: Wed, 22 Mar 2017 19:10:30 -0400
Subject: Remove Sync and Translate menu
---
.../java/res/drawable-hdpi/settings_translate.png | Bin 399 -> 0 bytes
.../java/res/drawable-mdpi/settings_translate.png | Bin 284 -> 0 bytes
.../java/res/drawable-xhdpi/settings_translate.png | Bin 547 -> 0 bytes
.../java/res/drawable-xxhdpi/settings_translate.png | Bin 793 -> 0 bytes
.../java/res/drawable-xxxhdpi/settings_translate.png | Bin 1038 -> 0 bytes
.../android/java/res/xml/site_settings_preferences.xml | 4 ++--
.../preferences/website/SiteSettingsPreferences.java | 14 +++++++-------
7 files changed, 9 insertions(+), 9 deletions(-)
.../java/res/drawable-hdpi/settings_translate.png | Bin 399 -> 0 bytes
.../java/res/drawable-mdpi/settings_translate.png | Bin 284 -> 0 bytes
.../java/res/drawable-xhdpi/settings_translate.png | Bin 547 -> 0 bytes
.../res/drawable-xxhdpi/settings_translate.png | Bin 793 -> 0 bytes
.../res/drawable-xxxhdpi/settings_translate.png | Bin 1038 -> 0 bytes
.../java/res/xml/site_settings_preferences.xml | 8 +++----
.../website/SiteSettingsPreferences.java | 23 +++------------------
7 files changed, 7 insertions(+), 24 deletions(-)
delete mode 100644 chrome/android/java/res/drawable-hdpi/settings_translate.png
delete mode 100644 chrome/android/java/res/drawable-mdpi/settings_translate.png
delete mode 100644 chrome/android/java/res/drawable-xhdpi/settings_translate.png
@@ -33,9 +33,21 @@ diff --git a/chrome/android/java/res/drawable-xxxhdpi/settings_translate.png b/c
deleted file mode 100644
index 058b50b84dd216d983e9dea2ea264b39773ac318..0000000000000000000000000000000000000000
diff --git a/chrome/android/java/res/xml/site_settings_preferences.xml b/chrome/android/java/res/xml/site_settings_preferences.xml
index 81658269058c..346cdce944c6 100644
index 81658269058c..518be48cb3c5 100644
--- a/chrome/android/java/res/xml/site_settings_preferences.xml
+++ b/chrome/android/java/res/xml/site_settings_preferences.xml
@@ -50,9 +50,9 @@
android:fragment="org.chromium.chrome.browser.preferences.website.SingleCategoryPreferences"
android:key="ads" />
<!-- Background sync -->
- <org.chromium.chrome.browser.preferences.website.SiteSettingsPreference
+ <!-- org.chromium.chrome.browser.preferences.website.SiteSettingsPreference
android:fragment="org.chromium.chrome.browser.preferences.website.SingleCategoryPreferences"
- android:key="background_sync" />
+ android:key="background_sync" /-->
<!-- Protected content -->
<org.chromium.chrome.browser.preferences.website.SiteSettingsPreference
android:fragment="org.chromium.chrome.browser.preferences.website.SingleCategoryPreferences"
@@ -73,11 +73,11 @@
android:fragment="org.chromium.chrome.browser.preferences.website.SingleCategoryPreferences"
android:key="sound" />
@@ -51,43 +63,56 @@ index 81658269058c..346cdce944c6 100644
<!-- TODO(finnur): Move this over to the new Usage screen, once it exists. -->
<org.chromium.chrome.browser.preferences.website.SiteSettingsPreference
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/preferences/website/SiteSettingsPreferences.java b/chrome/android/java/src/org/chromium/chrome/browser/preferences/website/SiteSettingsPreferences.java
index 1274fd3c7118..831f01c52fe0 100644
index 1274fd3c7118..57b29816fd96 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/preferences/website/SiteSettingsPreferences.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/preferences/website/SiteSettingsPreferences.java
@@ -89,7 +89,7 @@ public class SiteSettingsPreferences extends PreferenceFragment
@@ -38,7 +38,6 @@ public class SiteSettingsPreferences extends PreferenceFragment
// are defined in the SiteSettingsCategory, additional keys
// are listed here.
static final String MEDIA_KEY = "media";
- static final String TRANSLATE_KEY = "translate";
// Whether the Protected Content menu is available for display.
boolean mProtectedContentMenuAvailable;
@@ -84,12 +83,12 @@ public class SiteSettingsPreferences extends PreferenceFragment
for (@SiteSettingsCategory.Type int i = 0; i < SiteSettingsCategory.Type.NUM_ENTRIES;
i++) {
if (i == SiteSettingsCategory.Type.AUTOPLAY
- || i == SiteSettingsCategory.Type.PROTECTED_MEDIA)
+ || i == SiteSettingsCategory.Type.PROTECTED_MEDIA
+ || i == SiteSettingsCategory.Type.BACKGROUND_SYNC)
continue;
getPreferenceScreen().removePreference(findPreference(i));
}
getPreferenceScreen().removePreference(findPreference(MEDIA_KEY));
- getPreferenceScreen().removePreference(findPreference(TRANSLATE_KEY));
+// getPreferenceScreen().removePreference(findPreference(TRANSLATE_KEY));
} else {
// If both Autoplay and Protected Content menus are available, they'll be tucked under
// the Media key. Otherwise, we can remove the Media menu entry.
@@ -118,9 +118,9 @@ public class SiteSettingsPreferences extends PreferenceFragment
@@ -116,11 +115,6 @@ public class SiteSettingsPreferences extends PreferenceFragment
getPreferenceScreen().removePreference(
findPreference(SiteSettingsCategory.Type.CLIPBOARD));
}
// The new Languages Preference *feature* is an advanced version of this translate
// preference. Once Languages Preference is enabled, remove this setting.
- // The new Languages Preference *feature* is an advanced version of this translate
- // preference. Once Languages Preference is enabled, remove this setting.
- if (ChromeFeatureList.isEnabled(ChromeFeatureList.LANGUAGES_PREFERENCE)) {
- getPreferenceScreen().removePreference(findPreference(TRANSLATE_KEY));
- }
+// if (ChromeFeatureList.isEnabled(ChromeFeatureList.LANGUAGES_PREFERENCE)) {
+// getPreferenceScreen().removePreference(findPreference(TRANSLATE_KEY));
+// }
if (!ChromeFeatureList.isEnabled(ChromeFeatureList.GENERIC_SENSOR_EXTRA_CLASSES)) {
getPreferenceScreen().removePreference(
findPreference(SiteSettingsCategory.Type.SENSORS));
@@ -132,8 +132,8 @@ public class SiteSettingsPreferences extends PreferenceFragment
@@ -131,10 +125,6 @@ public class SiteSettingsPreferences extends PreferenceFragment
private void updatePreferenceStates() {
PrefServiceBridge prefServiceBridge = PrefServiceBridge.getInstance();
// Translate preference.
- // Translate preference.
- Preference translatePref = findPreference(TRANSLATE_KEY);
- if (translatePref != null) setTranslateStateSummary(translatePref);
+// Preference translatePref = findPreference(TRANSLATE_KEY);
+// if (translatePref != null) setTranslateStateSummary(translatePref);
-
// Preferences that navigate to Website Settings.
List<Integer> websitePrefs = new ArrayList<Integer>();
@@ -149,7 +149,7 @@ public class SiteSettingsPreferences extends PreferenceFragment
if (mMediaSubMenu) {
@@ -149,7 +139,7 @@ public class SiteSettingsPreferences extends PreferenceFragment
if (!mProtectedContentMenuAvailable) {
websitePrefs.add(SiteSettingsCategory.Type.AUTOPLAY);
}
@@ -96,6 +121,18 @@ index 1274fd3c7118..831f01c52fe0 100644
websitePrefs.add(SiteSettingsCategory.Type.CAMERA);
if (ChromeFeatureList.isEnabled(ChromeFeatureList.CLIPBOARD_CONTENT_SETTING)) {
websitePrefs.add(SiteSettingsCategory.Type.CLIPBOARD);
@@ -247,11 +237,4 @@ public class SiteSettingsPreferences extends PreferenceFragment
preference.getTitle().toString());
return false;
}
-
- private void setTranslateStateSummary(Preference translatePref) {
- boolean translateEnabled = PrefServiceBridge.getInstance().isTranslateEnabled();
- translatePref.setSummary(translateEnabled
- ? R.string.website_settings_category_ask
- : R.string.website_settings_category_blocked);
- }
}
--
2.11.0
@@ -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
@@ -0,0 +1,33 @@
From: csagan5 <32685696+csagan5@users.noreply.github.com>
Date: Sat, 27 Oct 2018 17:54:01 +0200
Subject: Disable update scheduler
---
.../chromium/chrome/browser/component_updater/UpdateScheduler.java | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/component_updater/UpdateScheduler.java b/chrome/android/java/src/org/chromium/chrome/browser/component_updater/UpdateScheduler.java
--- a/chrome/android/java/src/org/chromium/chrome/browser/component_updater/UpdateScheduler.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/component_updater/UpdateScheduler.java
@@ -35,10 +35,7 @@ public class UpdateScheduler {
@CalledByNative
/* package */ static boolean isAvailable() {
- return Build.VERSION.SDK_INT >= Build.VERSION_CODES.M
- || GoogleApiAvailability.getInstance().isGooglePlayServicesAvailable(
- ContextUtils.getApplicationContext())
- == ConnectionResult.SUCCESS;
+ return false;
}
/* package */ void onStartTaskBeforeNativeLoaded(TaskFinishedCallback callback) {
@@ -108,4 +105,4 @@ public class UpdateScheduler {
private native void nativeOnStartTask(long nativeBackgroundTaskUpdateScheduler);
private native void nativeOnStopTask(long nativeBackgroundTaskUpdateScheduler);
-}
\ No newline at end of file
+}
--
2.11.0
@@ -5,6 +5,7 @@ Subject: Inject scripts for AMP, tracking, ads and video functionality
Remove AMP, tracking and ads from search results
Break Page Visibility API and Fullscreen API for youtube.com and vimeo.com to
allow playing videos in background (original Javascript code by timdream)
Send a random key press to circumvent idle status detection
---
third_party/blink/renderer/core/dom/BUILD.gn | 2 ++
third_party/blink/renderer/core/dom/document.cc | 28 +++++++++++++++++++++-
@@ -98,7 +99,7 @@ new file mode 100644
+#ifndef video_bg_play_h
+#define video_bg_play_h
+
+#define VIDEO_BG_PLAY_JS "'use strict';\n\n/* video background play fix - original version by timdream */\ndocument.videoBGFix = {};\n\n// Page Visibility API\nObject.defineProperties(document.videoBGFix,\n { 'hidden': {value: false}, 'visibilityState': {value: 'visible'} });\n\nwindow.addEventListener(\n 'visibilitychange', evt => evt.stopImmediatePropagation(), true);\nwindow.addEventListener(\n 'blur', evt => evt.stopImmediatePropagation(), true);\n\n// Fullscreen API\nwindow.addEventListener('fullscreenchange', evt => {\n Object.defineProperties(document.videoBGFix,\n { 'fullscreenEnabled': {value: true},\n 'fullscreen': {value: true},\n 'fullscreenElement': {value: document.fullscreenElement.videoBGFix}});\n window.addEventListener(\n 'fullscreenchange', evt => evt.stopImmediatePropagation(), true);\n}, { capture: true, once: true });\n"
+#define VIDEO_BG_PLAY_JS "'use strict';\n\n/* generate a synthetic keypress to circumvent the extremely useful pause-and-prompt beaviour */\nsetInterval(function() {\n document.dispatchEvent(new KeyboardEvent(\"keydown\", {key : \"a\", char : \"a\", shiftKey: false}));\n}, 3 * 60 * 1000);\n\n/* video background play fix - original version by timdream */\ndocument.videoBGFix = {};\n\n// Page Visibility API\nObject.defineProperties(document.videoBGFix,\n { 'hidden': {value: false}, 'visibilityState': {value: 'visible'} });\n\nwindow.addEventListener(\n 'visibilitychange', evt => evt.stopImmediatePropagation(), true);\nwindow.addEventListener(\n 'blur', evt => evt.stopImmediatePropagation(), true);\n\n// Fullscreen API\nwindow.addEventListener('fullscreenchange', evt => {\n Object.defineProperties(document.videoBGFix,\n { 'fullscreenEnabled': {value: true},\n 'fullscreen': {value: true},\n 'fullscreenElement': {value: document.fullscreenElement.videoBGFix}});\n window.addEventListener(\n 'fullscreenchange', evt => evt.stopImmediatePropagation(), true);\n}, { capture: true, once: true });\n"
+
+#endif // video_bg_play_h
--
@@ -0,0 +1,74 @@
From: csagan5 <32685696+csagan5@users.noreply.github.com>
Date: Thu, 25 Oct 2018 23:13:34 +0200
Subject: Add flag to control video playback resume feature
Disable it by default on Android as it is everywhere else
---
chrome/browser/about_flags.cc | 5 +++++
chrome/browser/flag_descriptions.cc | 5 +++++
chrome/browser/flag_descriptions.h | 3 +++
media/base/media_switches.cc | 6 +-----
4 files changed, 14 insertions(+), 5 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
@@ -3520,6 +3520,11 @@ const FeatureEntry kFeatureEntries[] = {
FEATURE_VALUE_TYPE(media::kPictureInPicture)},
#endif // !defined(OS_ANDROID)
+ {"resume-background-video",
+ flag_descriptions::kResumeBackgroundVideoName,
+ flag_descriptions::kResumeBackgroundVideoDescription, kOsAll,
+ FEATURE_VALUE_TYPE(media::kResumeBackgroundVideo)},
+
#if defined(OS_MACOSX)
{"mac-touchbar", flag_descriptions::kMacTouchBarName,
flag_descriptions::kMacTouchBarDescription, kOsMac,
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
@@ -747,6 +747,11 @@ const char kEnablePictureInPictureName[] = "Enable Picture-in-Picture.";
const char kEnablePictureInPictureDescription[] =
"Enable the Picture-in-Picture feature for videos.";
+const char kResumeBackgroundVideoName[] = "Resume background video.";
+const char kResumeBackgroundVideoDescription[] =
+ "Resume background video playback when tab re-gains focus; additionally, "
+ "it will pause video playback every single time you switch tabs.";
+
const char kEnablePixelCanvasRecordingName[] = "Enable pixel canvas recording";
const char kEnablePixelCanvasRecordingDescription[] =
"Pixel canvas recording allows the compositor to raster contents aligned "
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
@@ -465,6 +465,9 @@ extern const char kOOPHPStackModePseudo[];
extern const char kEnablePictureInPictureName[];
extern const char kEnablePictureInPictureDescription[];
+extern const char kResumeBackgroundVideoName[];
+extern const char kResumeBackgroundVideoDescription[];
+
extern const char kEnablePixelCanvasRecordingName[];
extern const char kEnablePixelCanvasRecordingDescription[];
diff --git a/media/base/media_switches.cc b/media/base/media_switches.cc
--- a/media/base/media_switches.cc
+++ b/media/base/media_switches.cc
@@ -220,11 +220,7 @@ const base::Feature kPreloadMetadataSuspend{"PreloadMetadataSuspend",
// when in background.
const base::Feature kResumeBackgroundVideo {
"resume-background-video",
-#if defined(OS_ANDROID)
- base::FEATURE_ENABLED_BY_DEFAULT
-#else
- base::FEATURE_DISABLED_BY_DEFAULT
-#endif
+ base::FEATURE_DISABLED_BY_DEFAULT
};
// Display the Cast overlay button on the media controls.
--
2.11.0
@@ -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());
+ }
+ }
+ }
+
@@ -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
@@ -119,8 +119,8 @@ diff --git a/third_party/blink/renderer/platform/graphics/static_bitmap_image.cc
+
+ // cap maximum pixels to change
+ auto pixels = (w + h) / 128;
+ if (pixels > 10) {
+ pixels = 10;
+ if (pixels > 20) {
+ pixels = 20;
+ } else if (pixels < 2) {
+ pixels = 2;
+ }
@@ -0,0 +1,23 @@
From: csagan5 <32685696+csagan5@users.noreply.github.com>
Date: Mon, 22 Oct 2018 21:14:57 +0200
Subject: Disable generic sensor API by default
---
services/device/public/cpp/device_features.cc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/services/device/public/cpp/device_features.cc b/services/device/public/cpp/device_features.cc
--- a/services/device/public/cpp/device_features.cc
+++ b/services/device/public/cpp/device_features.cc
@@ -9,7 +9,7 @@ namespace features {
// Enables sensors based on Generic Sensor API:
// https://w3c.github.io/sensors/
const base::Feature kGenericSensor{"GenericSensor",
- base::FEATURE_ENABLED_BY_DEFAULT};
+ base::FEATURE_DISABLED_BY_DEFAULT};
// Enables an extra set of concrete sensors classes based on Generic Sensor API,
// which expose previously unexposed platform features, e.g. ALS or Magnetometer
const base::Feature kGenericSensorExtraClasses{
--
2.11.0
@@ -0,0 +1,184 @@
From: csagan5 <32685696+csagan5@users.noreply.github.com>
Date: Mon, 22 Oct 2018 21:29:53 +0200
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 | 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
@@ -3041,6 +3041,12 @@ const FeatureEntry kFeatureEntries[] = {
{"enable-generic-sensor", flag_descriptions::kEnableGenericSensorName,
flag_descriptions::kEnableGenericSensorDescription, kOsAll,
FEATURE_VALUE_TYPE(features::kGenericSensor)},
+ {"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,14 @@ const char kEnableGenericSensorDescription[] =
"Accelerometer, LinearAccelerationSensor, Gyroscope, "
"AbsoluteOrientationSensor and RelativeOrientationSensor interfaces.";
+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";
const char kEnableGenericSensorExtraClassesDescription[] =
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,12 @@ extern const char kEnableEnumeratingAudioDevicesDescription[];
extern const char kEnableGenericSensorName[];
extern const char kEnableGenericSensorDescription[];
+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/child/runtime_features.cc b/content/child/runtime_features.cc
--- a/content/child/runtime_features.cc
+++ b/content/child/runtime_features.cc
@@ -144,6 +144,9 @@ void SetRuntimeFeaturesDefaultsAndUpdateFromArgs(
if (command_line.HasSwitch(switches::kDisableSharedWorkers))
WebRuntimeFeatures::EnableSharedWorker(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_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};
+// 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};
+
+// 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,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,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);
+ 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,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);
}
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,14 @@
status: "stable",
},
{
+ name: "DeviceMotion",
+ status: "stable",
+ },
+ {
+ name: "DeviceOrientation",
+ status: "stable",
+ },
+ {
name: "DecodeToYUV",
status: "experimental",
},
--
2.11.0
@@ -8,22 +8,22 @@ Reduce HTTP headers in DoH requests to bare minimum.
See also: https://tools.ietf.org/id/draft-ietf-doh-dns-over-https-12.txt
---
chrome/browser/about_flags.cc | 12 ++++++++++
chrome/browser/about_flags.cc | 13 ++++++++++
chrome/browser/flag_descriptions.cc | 3 +++
chrome/browser/flag_descriptions.h | 3 +++
.../browser/net/system_network_context_manager.cc | 16 ++++++-------
.../common/network_features.cc | 5 ++--
.../common/network_features.cc | 6 +++--
.../common/network_features.h | 4 +++-
.../common/network_switch_list.h | 4 ++++
net/base/load_flags_list.h | 6 +++++
net/dns/dns_transaction.cc | 28 +++-------------------
net/url_request/url_request_http_job.cc | 26 ++++++++++++--------
10 files changed, 60 insertions(+), 47 deletions(-)
10 files changed, 62 insertions(+), 47 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
@@ -416,6 +416,12 @@ const FeatureEntry::Choice kChromeHomeSwipeLogicChoices[] = {
@@ -417,6 +417,13 @@ const FeatureEntry::Choice kChromeHomeSwipeLogicChoices[] = {
switches::kChromeHomeSwipeLogicType, "velocity"},
};
@@ -31,12 +31,13 @@ diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
+ {features::kDnsOverHttpsChoiceDefault, "", ""},
+ {features::kDnsOverHttpsChoiceGoogle, switches::kDnsOverHttpsServer, "https://dns.google.com/experimental"},
+ {features::kDnsOverHttpsChoiceCloudflare, switches::kDnsOverHttpsServer, "https://1.1.1.1/dns-query"},
+ {features::kDnsOverHttpsChoiceQuad9, switches::kDnsOverHttpsServer, "https://9.9.9.9/dns-query"}
+};
+
#endif // OS_ANDROID
const FeatureEntry::Choice kNumRasterThreadsChoices[] = {
@@ -3714,6 +3720,12 @@ const FeatureEntry kFeatureEntries[] = {
@@ -3730,6 +3737,12 @@ const FeatureEntry kFeatureEntries[] = {
FEATURE_VALUE_TYPE(features::kAsyncDns)},
#endif // defined(OS_ANDROID)
@@ -52,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
@@ -2239,6 +2239,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.";
@@ -65,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
@@ -1347,6 +1347,9 @@ extern const char kAppNotificationStatusMessagingDescription[];
@@ -1356,6 +1356,9 @@ extern const char kAppNotificationStatusMessagingDescription[];
extern const char kAsyncDnsName[];
extern const char kAsyncDnsDescription[];
@@ -111,7 +112,7 @@ diff --git a/chrome/browser/net/system_network_context_manager.cc b/chrome/brows
diff --git a/components/network_session_configurator/common/network_features.cc b/components/network_session_configurator/common/network_features.cc
--- a/components/network_session_configurator/common/network_features.cc
+++ b/components/network_session_configurator/common/network_features.cc
@@ -11,7 +11,8 @@ namespace features {
@@ -11,7 +11,9 @@ namespace features {
// TODO(nharper): Disable kChannelID on all platforms in M69.
const base::Feature kChannelID{"channel-id", base::FEATURE_ENABLED_BY_DEFAULT};
@@ -119,7 +120,8 @@ diff --git a/components/network_session_configurator/common/network_features.cc
- base::FEATURE_DISABLED_BY_DEFAULT};
+const char kDnsOverHttpsChoiceDefault[] = "Disabled",
+ kDnsOverHttpsChoiceGoogle[] = "Google",
+ kDnsOverHttpsChoiceCloudflare[] = "Cloudflare";
+ kDnsOverHttpsChoiceCloudflare[] = "Cloudflare",
+ kDnsOverHttpsChoiceQuad9[] = "Quad9";
} // namespace features
diff --git a/components/network_session_configurator/common/network_features.h b/components/network_session_configurator/common/network_features.h
@@ -134,7 +136,7 @@ diff --git a/components/network_session_configurator/common/network_features.h b
// (https://tools.ietf.org/id/draft-ietf-doh-dns-over-https-12.txt).
NETWORK_SESSION_CONFIGURATOR_EXPORT extern const base::Feature kDnsOverHttps;
+NETWORK_SESSION_CONFIGURATOR_EXPORT extern const char kDnsOverHttpsChoiceDefault[],
+ kDnsOverHttpsChoiceGoogle[], kDnsOverHttpsChoiceCloudflare[];
+ kDnsOverHttpsChoiceGoogle[], kDnsOverHttpsChoiceCloudflare[], kDnsOverHttpsChoiceQuad9[];
} // namespace features
@@ -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
@@ -908,6 +908,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 ==
@@ -2606,6 +2611,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
@@ -1132,6 +1132,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
@@ -702,6 +702,9 @@ extern const char kMarkHttpAsWarningAndDangerousOnPasswordsAndCreditCards[];
@@ -711,6 +711,9 @@ extern const char kMarkHttpAsWarningAndDangerousOnPasswordsAndCreditCards[];
extern const char kMaterialDesignIncognitoNTPName[];
extern const char kMaterialDesignIncognitoNTPDescription[];
@@ -3,13 +3,13 @@ Date: Tue, 28 Aug 2018 23:27:23 +0200
Subject: Add privacy option to keep cookies until session exit
---
chrome/android/java/res/values/values.xml | 3 +++
chrome/android/java/res/xml/website_preferences.xml | 7 +++++++
.../browser/preferences/PrefServiceBridge.java | 10 ++++++++++
.../website/SingleCategoryPreferences.java | 20 +++++++++++++++++++-
.../android/java/strings/android_chrome_strings.grd | 6 ++++++
.../android/preferences/pref_service_bridge.cc | 19 +++++++++++++++++++
6 files changed, 64 insertions(+), 1 deletion(-)
chrome/android/java/res/values/values.xml | 3 +++
.../android/java/res/xml/website_preferences.xml | 7 ++++++
.../browser/preferences/PrefServiceBridge.java | 10 +++++++++
.../website/SingleCategoryPreferences.java | 21 +++++++++++++++++-
.../java/strings/android_chrome_strings.grd | 6 ++++++
.../android/preferences/pref_service_bridge.cc | 25 ++++++++++++++++++++++
6 files changed, 71 insertions(+), 1 deletion(-)
diff --git a/chrome/android/java/res/values/values.xml b/chrome/android/java/res/values/values.xml
--- a/chrome/android/java/res/values/values.xml
@@ -110,14 +110,29 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/preferences/web
} else if (NOTIFICATIONS_VIBRATE_TOGGLE_KEY.equals(preference.getKey())) {
prefServiceBridge.setNotificationsVibrateEnabled((boolean) newValue);
}
@@ -803,12 +807,17 @@ public class SingleCategoryPreferences extends PreferenceFragment
@@ -754,6 +758,8 @@ public class SingleCategoryPreferences extends PreferenceFragment
TriStateSiteSettingsPreference triStateToggle =
(TriStateSiteSettingsPreference) screen.findPreference(TRI_STATE_TOGGLE_KEY);
Preference thirdPartyCookies = screen.findPreference(THIRD_PARTY_COOKIES_TOGGLE_KEY);
+ Preference cookiesSessionOnly = getPreferenceScreen().findPreference(
+ COOKIES_SESSION_ONLY_TOGGLE_KEY);
Preference notificationsVibrate = screen.findPreference(NOTIFICATIONS_VIBRATE_TOGGLE_KEY);
Preference explainProtectedMediaKey = screen.findPreference(EXPLAIN_PROTECTED_MEDIA_KEY);
PreferenceGroup allowedGroup = (PreferenceGroup) screen.findPreference(ALLOWED_GROUP);
@@ -768,6 +774,7 @@ public class SingleCategoryPreferences extends PreferenceFragment
screen.removePreference(binaryToggle);
screen.removePreference(triStateToggle);
screen.removePreference(thirdPartyCookies);
+ screen.removePreference(cookiesSessionOnly);
screen.removePreference(notificationsVibrate);
screen.removePreference(explainProtectedMediaKey);
screen.removePreference(allowedGroup);
@@ -803,12 +810,15 @@ public class SingleCategoryPreferences extends PreferenceFragment
configureBinaryToggle(binaryToggle, contentType);
}
- // Configure/hide the third-party cookie toggle, as needed.
+ // Configure/hide the third-party cookie toggle and session-only cookie toggle, as needed.
+ Preference cookiesSessionOnly = getPreferenceScreen().findPreference(
+ COOKIES_SESSION_ONLY_TOGGLE_KEY);
if (mCategory.showSites(SiteSettingsCategory.Type.COOKIES)) {
thirdPartyCookies.setOnPreferenceChangeListener(this);
updateThirdPartyCookiesCheckBox();
@@ -129,7 +144,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/preferences/web
}
// Configure/hide the notifications vibrate toggle, as needed.
@@ -894,6 +903,15 @@ public class SingleCategoryPreferences extends PreferenceFragment
@@ -894,6 +904,15 @@ public class SingleCategoryPreferences extends PreferenceFragment
preference -> PrefServiceBridge.getInstance().isBlockThirdPartyCookiesManaged());
}
@@ -137,7 +152,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/preferences/web
+ ChromeBaseCheckBoxPreference cookiesSessionOnlyPref = (ChromeBaseCheckBoxPreference)
+ getPreferenceScreen().findPreference(COOKIES_SESSION_ONLY_TOGGLE_KEY);
+ cookiesSessionOnlyPref.setChecked(
+ !PrefServiceBridge.getInstance().isCookiesSessionOnlyEnabled());
+ PrefServiceBridge.getInstance().isCookiesSessionOnlyEnabled());
+ cookiesSessionOnlyPref.setEnabled(PrefServiceBridge.getInstance().isCategoryEnabled(
+ ContentSettingsType.CONTENT_SETTINGS_TYPE_COOKIES));
+ }
@@ -164,7 +179,7 @@ diff --git a/chrome/android/java/strings/android_chrome_strings.grd b/chrome/and
diff --git a/chrome/browser/android/preferences/pref_service_bridge.cc b/chrome/browser/android/preferences/pref_service_bridge.cc
--- a/chrome/browser/android/preferences/pref_service_bridge.cc
+++ b/chrome/browser/android/preferences/pref_service_bridge.cc
@@ -304,6 +304,14 @@ static jboolean JNI_PrefServiceBridge_GetBlockThirdPartyCookiesEnabled(
@@ -304,6 +304,17 @@ static jboolean JNI_PrefServiceBridge_GetBlockThirdPartyCookiesEnabled(
return GetPrefService()->GetBoolean(prefs::kBlockThirdPartyCookies);
}
@@ -173,13 +188,16 @@ diff --git a/chrome/browser/android/preferences/pref_service_bridge.cc b/chrome/
+ const JavaParamRef<jobject>& obj) {
+ HostContentSettingsMap* host_content_settings_map =
+ HostContentSettingsMapFactory::GetForProfile(GetOriginalProfile());
+ return CONTENT_SETTING_SESSION_ONLY == host_content_settings_map->GetDefaultContentSetting(CONTENT_SETTINGS_TYPE_COOKIES, nullptr);
+ auto value = host_content_settings_map->GetDefaultContentSetting(CONTENT_SETTINGS_TYPE_COOKIES, nullptr);
+ auto enabled = CONTENT_SETTING_SESSION_ONLY == value;
+ LOG(INFO) << "GetCookiesSessionOnly := " << enabled << " (raw_value = " << value << ")";
+ return enabled;
+}
+
static jboolean JNI_PrefServiceBridge_GetBlockThirdPartyCookiesManaged(
JNIEnv* env,
const JavaParamRef<jobject>& obj) {
@@ -756,6 +764,17 @@ static void JNI_PrefServiceBridge_SetBlockThirdPartyCookiesEnabled(
@@ -756,6 +767,20 @@ static void JNI_PrefServiceBridge_SetBlockThirdPartyCookiesEnabled(
GetPrefService()->SetBoolean(prefs::kBlockThirdPartyCookies, enabled);
}
@@ -189,9 +207,12 @@ diff --git a/chrome/browser/android/preferences/pref_service_bridge.cc b/chrome/
+ jboolean enabled) {
+ HostContentSettingsMap* host_content_settings_map =
+ HostContentSettingsMapFactory::GetForProfile(GetOriginalProfile());
+ LOG(INFO) << "SetCookiesSessionOnly -> " << (enabled ? "true" : "false") <<
+ "; false -> setting_allow: " << CONTENT_SETTING_ALLOW <<
+ "; true -> session_only: " << CONTENT_SETTING_SESSION_ONLY;
+ host_content_settings_map->SetDefaultContentSetting(
+ CONTENT_SETTINGS_TYPE_COOKIES,
+ enabled ? CONTENT_SETTING_ALLOW : CONTENT_SETTING_SESSION_ONLY);
+ enabled ? CONTENT_SETTING_SESSION_ONLY : CONTENT_SETTING_ALLOW);
+}
+
static void JNI_PrefServiceBridge_SetRememberPasswordsEnabled(
@@ -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_;
@@ -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
@@ -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
@@ -3973,10 +3973,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
@@ -1518,11 +1518,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
@@ -931,9 +931,6 @@ extern const char kPullToRefreshName[];
@@ -940,9 +940,6 @@ extern const char kPullToRefreshName[];
extern const char kPullToRefreshDescription[];
extern const char kPullToRefreshEnabledTouchscreen[];
@@ -0,0 +1,23 @@
From: csagan5 <32685696+csagan5@users.noreply.github.com>
Date: Sun, 28 Oct 2018 14:11:50 +0100
Subject: Offer builtin autocomplete for chrome://flags
---
chrome/browser/autocomplete/chrome_autocomplete_provider_client.cc | 2 ++
1 file changed, 2 insertions(+)
diff --git a/chrome/browser/autocomplete/chrome_autocomplete_provider_client.cc b/chrome/browser/autocomplete/chrome_autocomplete_provider_client.cc
--- a/chrome/browser/autocomplete/chrome_autocomplete_provider_client.cc
+++ b/chrome/browser/autocomplete/chrome_autocomplete_provider_client.cc
@@ -228,6 +228,8 @@ std::vector<base::string16>
ChromeAutocompleteProviderClient::GetBuiltinsToProvideAsUserTypes() {
std::vector<base::string16> builtins_to_provide;
builtins_to_provide.push_back(
+ base::ASCIIToUTF16(chrome::kChromeUIFlagsURL));
+ builtins_to_provide.push_back(
base::ASCIIToUTF16(chrome::kChromeUIChromeURLsURL));
#if !defined(OS_ANDROID)
builtins_to_provide.push_back(
--
2.11.0
@@ -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
@@ -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
@@ -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