Compare commits
5
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
aa96e7ce43 | ||
|
|
5c9d69ebcc | ||
|
|
7469dbed21 | ||
|
|
bc1f0b79f5 | ||
|
|
4c2225259f |
@@ -1,3 +1,18 @@
|
||||
# 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)
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
+580
-62
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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
+2
-1
@@ -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
|
||||
@@ -3519,6 +3519,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
|
||||
|
||||
+2
-2
@@ -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,161 @@
|
||||
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
|
||||
|
||||
---
|
||||
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(-)
|
||||
|
||||
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[] = {
|
||||
{"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-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[] =
|
||||
"Accelerometer, LinearAccelerationSensor, Gyroscope, "
|
||||
"AbsoluteOrientationSensor and RelativeOrientationSensor interfaces.";
|
||||
|
||||
+const char kDisableDeviceMotionName[] = "Disable device motion";
|
||||
+const char kDisableDeviceMotionDescription[] =
|
||||
+ "Disable device motion API";
|
||||
+
|
||||
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,9 @@ extern const char kEnableEnumeratingAudioDevicesDescription[];
|
||||
extern const char kEnableGenericSensorName[];
|
||||
extern const char kEnableGenericSensorDescription[];
|
||||
|
||||
+extern const char kDisableDeviceMotionName[];
|
||||
+extern const char kDisableDeviceMotionDescription[];
|
||||
+
|
||||
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
|
||||
@@ -144,6 +144,9 @@ void SetRuntimeFeaturesDefaultsAndUpdateFromArgs(
|
||||
if (command_line.HasSwitch(switches::kDisableSharedWorkers))
|
||||
WebRuntimeFeatures::EnableSharedWorker(false);
|
||||
|
||||
+ if (command_line.HasSwitch(switches::kDisableDeviceMotion))
|
||||
+ WebRuntimeFeatures::EnableDeviceMotion(false);
|
||||
+
|
||||
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";
|
||||
|
||||
+// Disable device motion events.
|
||||
+const char kDisableDeviceMotion[] = "disable-device-motion";
|
||||
+
|
||||
// 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[];
|
||||
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 {
|
||||
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 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(
|
||||
void ModulesInitializer::OnClearWindowObjectInMainWorld(
|
||||
Document& document,
|
||||
const Settings& settings) const {
|
||||
- DeviceMotionController::From(document);
|
||||
+ if (RuntimeEnabledFeatures::DeviceMotionEnabled())
|
||||
+ DeviceMotionController::From(document);
|
||||
DeviceOrientationController::From(document);
|
||||
DeviceOrientationAbsoluteController::From(document);
|
||||
NavigatorGamepad::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) {
|
||||
RuntimeEnabledFeatures::SetDatabaseEnabled(enable);
|
||||
}
|
||||
|
||||
+void WebRuntimeFeatures::EnableDeviceMotion(bool enable) {
|
||||
+ RuntimeEnabledFeatures::SetDeviceMotionEnabled(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,10 @@
|
||||
status: "stable",
|
||||
},
|
||||
{
|
||||
+ name: "DeviceMotion",
|
||||
+ status: "stable",
|
||||
+ },
|
||||
+ {
|
||||
name: "DecodeToYUV",
|
||||
status: "experimental",
|
||||
},
|
||||
--
|
||||
2.11.0
|
||||
|
||||
+12
-10
@@ -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[] = {
|
||||
@@ -416,6 +416,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[] = {
|
||||
@@ -3722,6 +3729,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[] =
|
||||
@@ -2248,6 +2248,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[];
|
||||
@@ -1353,6 +1353,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
|
||||
|
||||
+4
-4
@@ -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[] = {
|
||||
@@ -909,6 +909,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[] = {
|
||||
@@ -2607,6 +2612,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[] =
|
||||
@@ -1141,6 +1141,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[];
|
||||
@@ -708,6 +708,9 @@ extern const char kMarkHttpAsWarningAndDangerousOnPasswordsAndCreditCards[];
|
||||
extern const char kMaterialDesignIncognitoNTPName[];
|
||||
extern const char kMaterialDesignIncognitoNTPDescription[];
|
||||
|
||||
+37
-16
@@ -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(
|
||||
+3
-3
@@ -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[] = {
|
||||
@@ -3982,10 +3982,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[] =
|
||||
@@ -1527,11 +1527,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[];
|
||||
@@ -937,9 +937,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
|
||||
|
||||
Reference in New Issue
Block a user