Compare commits

...
Author SHA1 Message Date
csagan5 e1b9f9d68a Release 70.0.3538.95 2018-11-05 22:33:05 +01:00
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
19 changed files with 1735 additions and 340 deletions
+19
View File
@@ -1,3 +1,22 @@
# 70.0.3538.95
* fix crash on bookmark edit activity (fixes https://github.com/bromite/bromite/issues/172)
* fix slow chrome://flags (fixes https://github.com/bromite/bromite/issues/173)
* enable TLS 1.3 final support by default (fixes https://github.com/bromite/bromite/issues/174)
* dropped some patches related to GCM/GMS on suspicion of being related to random crashes
# 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
+1 -1
View File
@@ -81,7 +81,7 @@ Yes, since version 69. While the desktop version of Chromium has an option to di
## 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
+1074 -147
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
@@ -13,7 +13,7 @@ Disable it by default on Android as it is everywhere else
diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
--- a/chrome/browser/about_flags.cc
+++ b/chrome/browser/about_flags.cc
@@ -3519,6 +3519,11 @@ const FeatureEntry kFeatureEntries[] = {
@@ -3520,6 +3520,11 @@ const FeatureEntry kFeatureEntries[] = {
FEATURE_VALUE_TYPE(media::kPictureInPicture)},
#endif // !defined(OS_ANDROID)
+12 -8
View File
@@ -18,12 +18,12 @@ New mechanism for adblocking based on Brave's adblocking hook
.../browser/appmenu/AppMenuPropertiesDelegate.java | 38 +++
.../CustomTabAppMenuPropertiesDelegate.java | 2 +
.../java/strings/android_chrome_strings.grd | 11 +
chrome/browser/net/chrome_network_delegate.cc | 58 ++++
chrome/browser/net/chrome_network_delegate.cc | 62 ++++
.../subresource_filter_content_settings_manager.cc | 1 +
net/BUILD.gn | 7 +
net/url_request/adblock_intercept.cc | 325 +++++++++++++++++++++
net/url_request/adblock_intercept.h | 24 ++
12 files changed, 505 insertions(+)
12 files changed, 509 insertions(+)
create mode 100644 net/url_request/adblock_intercept.cc
create mode 100644 net/url_request/adblock_intercept.h
@@ -213,7 +213,7 @@ diff --git a/chrome/browser/net/chrome_network_delegate.cc b/chrome/browser/net/
#endif
#if defined(OS_CHROMEOS)
@@ -174,15 +176,71 @@ void ChromeNetworkDelegate::set_cookie_settings(
@@ -174,15 +176,75 @@ void ChromeNetworkDelegate::set_cookie_settings(
cookie_settings_ = cookie_settings;
}
@@ -244,14 +244,18 @@ diff --git a/chrome/browser/net/chrome_network_delegate.cc b/chrome/browser/net/
+ content::WebContents* web_contents = web_contents_getter.Run();
+ if (web_contents) {
+ Profile* profile = Profile::FromBrowserContext(web_contents->GetBrowserContext());
+ //FIXME: this should not be called from the IO thread
+ const HostContentSettingsMap* content_settings = HostContentSettingsMapFactory::GetForProfile(profile);
+
+ // check global value first
+ adblock_enabled = CONTENT_SETTING_BLOCK == content_settings->GetDefaultContentSetting(ContentSettingsType::CONTENT_SETTINGS_TYPE_ADS, NULL);
+ if (content_settings) {
+ // check global value first
+ adblock_enabled = CONTENT_SETTING_BLOCK == content_settings->GetDefaultContentSetting(ContentSettingsType::CONTENT_SETTINGS_TYPE_ADS, NULL);
+
+ if (!adblock_enabled) {
+ adblock_enabled = CONTENT_SETTING_BLOCK == content_settings->GetContentSetting(request->url(), GURL(), ContentSettingsType::CONTENT_SETTINGS_TYPE_ADS,
+ std::string());
+ if (!adblock_enabled) {
+ // check per-site value
+ adblock_enabled = CONTENT_SETTING_BLOCK == content_settings->GetContentSetting(request->url(), GURL(), ContentSettingsType::CONTENT_SETTINGS_TYPE_ADS,
+ std::string());
+ }
+ }
+ }
+
@@ -1,44 +1,52 @@
From: csagan5 <32685696+csagan5@users.noreply.github.com>
Date: Mon, 22 Oct 2018 21:29:53 +0200
Subject: Add flag to disable device motion API
Subject: Add flags to disable device motion and orientation APIs
Both flags will be disabled by default and prevent usage of gyroscope and
legacy acceleration events.
---
chrome/browser/about_flags.cc | 3 +++
chrome/browser/flag_descriptions.cc | 4 ++++
chrome/browser/flag_descriptions.h | 3 +++
content/browser/renderer_host/render_process_host_impl.cc | 1 +
content/child/runtime_features.cc | 3 +++
content/public/common/content_switches.cc | 3 +++
content/public/common/content_switches.h | 1 +
third_party/blink/public/platform/web_runtime_features.h | 1 +
third_party/blink/renderer/modules/modules_initializer.cc | 3 ++-
third_party/blink/renderer/platform/exported/web_runtime_features.cc | 4 ++++
third_party/blink/renderer/platform/runtime_enabled_features.json5 | 4 ++++
11 files changed, 29 insertions(+), 1 deletion(-)
chrome/browser/about_flags.cc | 6 ++++++
chrome/browser/flag_descriptions.cc | 8 ++++++++
chrome/browser/flag_descriptions.h | 6 ++++++
content/child/runtime_features.cc | 3 +++
content/public/common/content_features.cc | 10 ++++++++++
content/public/common/content_features.h | 2 ++
third_party/blink/public/platform/web_runtime_features.h | 2 ++
third_party/blink/renderer/modules/modules_initializer.cc | 9 ++++++---
.../blink/renderer/platform/exported/web_runtime_features.cc | 8 ++++++++
.../blink/renderer/platform/runtime_enabled_features.json5 | 8 ++++++++
10 files changed, 59 insertions(+), 3 deletions(-)
diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
--- a/chrome/browser/about_flags.cc
+++ b/chrome/browser/about_flags.cc
@@ -3040,6 +3040,9 @@ const FeatureEntry kFeatureEntries[] = {
@@ -3041,6 +3041,12 @@ const FeatureEntry kFeatureEntries[] = {
{"enable-generic-sensor", flag_descriptions::kEnableGenericSensorName,
flag_descriptions::kEnableGenericSensorDescription, kOsAll,
FEATURE_VALUE_TYPE(features::kGenericSensor)},
+ {"disable-device-motion", flag_descriptions::kDisableDeviceMotionName,
+ flag_descriptions::kDisableDeviceMotionDescription, kOsAll,
+ SINGLE_DISABLE_VALUE_TYPE(switches::kDisableDeviceMotion)},
+ {"enable-device-motion", flag_descriptions::kEnableDeviceMotionName,
+ flag_descriptions::kEnableDeviceMotionDescription, kOsAll,
+ FEATURE_VALUE_TYPE(features::kDeviceMotion)},
+ {"enable-device-orientation", flag_descriptions::kEnableDeviceOrientationName,
+ flag_descriptions::kEnableDeviceOrientationDescription, kOsAll,
+ FEATURE_VALUE_TYPE(features::kDeviceOrientation)},
{"enable-generic-sensor-extra-classes",
flag_descriptions::kEnableGenericSensorExtraClassesName,
flag_descriptions::kEnableGenericSensorExtraClassesDescription, kOsAll,
diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descriptions.cc
--- a/chrome/browser/flag_descriptions.cc
+++ b/chrome/browser/flag_descriptions.cc
@@ -556,6 +556,10 @@ const char kEnableGenericSensorDescription[] =
@@ -556,6 +556,14 @@ const char kEnableGenericSensorDescription[] =
"Accelerometer, LinearAccelerationSensor, Gyroscope, "
"AbsoluteOrientationSensor and RelativeOrientationSensor interfaces.";
+const char kDisableDeviceMotionName[] = "Disable device motion";
+const char kDisableDeviceMotionDescription[] =
+ "Disable device motion API";
+const char kEnableDeviceMotionName[] = "Enable device motion";
+const char kEnableDeviceMotionDescription[] =
+ "Enable device motion API which is used to detect changes in acceleration";
+
+const char kEnableDeviceOrientationName[] = "Enable device orientation";
+const char kEnableDeviceOrientationDescription[] =
+ "Enable device orientation API which is used to detect changes in orientation";
+
const char kEnableGenericSensorExtraClassesName[] =
"Generic Sensor Extra Classes";
@@ -46,27 +54,19 @@ diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descripti
diff --git a/chrome/browser/flag_descriptions.h b/chrome/browser/flag_descriptions.h
--- a/chrome/browser/flag_descriptions.h
+++ b/chrome/browser/flag_descriptions.h
@@ -366,6 +366,9 @@ extern const char kEnableEnumeratingAudioDevicesDescription[];
@@ -366,6 +366,12 @@ extern const char kEnableEnumeratingAudioDevicesDescription[];
extern const char kEnableGenericSensorName[];
extern const char kEnableGenericSensorDescription[];
+extern const char kDisableDeviceMotionName[];
+extern const char kDisableDeviceMotionDescription[];
+extern const char kEnableDeviceMotionName[];
+extern const char kEnableDeviceMotionDescription[];
+
+extern const char kEnableDeviceOrientationName[];
+extern const char kEnableDeviceOrientationDescription[];
+
extern const char kEnableGenericSensorExtraClassesName[];
extern const char kEnableGenericSensorExtraClassesDescription[];
diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc
--- a/content/browser/renderer_host/render_process_host_impl.cc
+++ b/content/browser/renderer_host/render_process_host_impl.cc
@@ -2938,6 +2938,7 @@ void RenderProcessHostImpl::PropagateBrowserCommandLineToRenderer(
switches::kDisableCompositorUkmForTests,
switches::kDisablePreferCompositingToLCDText,
switches::kDisableDatabases,
+ switches::kDisableDeviceMotion,
switches::kDisableFileSystem,
switches::kDisableFrameRateLimit,
switches::kDisableGpuMemoryBufferVideoFrames,
diff --git a/content/child/runtime_features.cc b/content/child/runtime_features.cc
--- a/content/child/runtime_features.cc
+++ b/content/child/runtime_features.cc
@@ -74,70 +74,89 @@ diff --git a/content/child/runtime_features.cc b/content/child/runtime_features.
if (command_line.HasSwitch(switches::kDisableSharedWorkers))
WebRuntimeFeatures::EnableSharedWorker(false);
+ if (command_line.HasSwitch(switches::kDisableDeviceMotion))
+ WebRuntimeFeatures::EnableDeviceMotion(false);
+ WebRuntimeFeatures::EnableDeviceMotion(base::FeatureList::IsEnabled(features::kDeviceMotion));
+ WebRuntimeFeatures::EnableDeviceOrientation(base::FeatureList::IsEnabled(features::kDeviceOrientation));
+
if (command_line.HasSwitch(switches::kDisableSpeechAPI))
WebRuntimeFeatures::EnableScriptedSpeech(false);
diff --git a/content/public/common/content_switches.cc b/content/public/common/content_switches.cc
--- a/content/public/common/content_switches.cc
+++ b/content/public/common/content_switches.cc
@@ -98,6 +98,9 @@ const char kDisableCompositorUkmForTests[] = "disable-compositor-ukm-for-tests";
// Disables HTML5 DB support.
const char kDisableDatabases[] = "disable-databases";
diff --git a/content/public/common/content_features.cc b/content/public/common/content_features.cc
--- a/content/public/common/content_features.cc
+++ b/content/public/common/content_features.cc
@@ -590,6 +590,16 @@ const base::Feature kWebRtcUseGpuMemoryBufferVideoFrames{
// https://wicg.github.io/webusb
const base::Feature kWebUsb{"WebUSB", base::FEATURE_ENABLED_BY_DEFAULT};
+// Disable device motion events.
+const char kDisableDeviceMotion[] = "disable-device-motion";
+// Enables the device motion API used to track device acceleration;
+// no user authorization or notifications happens when in use.
+const base::Feature kDeviceMotion{"DeviceMotion",
+ base::FEATURE_DISABLED_BY_DEFAULT};
+
// Disable the per-domain blocking for 3D APIs after GPU reset.
// This switch is intended only for tests.
const char kDisableDomainBlockingFor3DAPIs[] =
diff --git a/content/public/common/content_switches.h b/content/public/common/content_switches.h
--- a/content/public/common/content_switches.h
+++ b/content/public/common/content_switches.h
@@ -42,6 +42,7 @@ CONTENT_EXPORT extern const char kDisableBlinkFeatures[];
CONTENT_EXPORT extern const char kDisableCompositorUkmForTests[];
CONTENT_EXPORT extern const char kDisableDatabases[];
CONTENT_EXPORT extern const char kDisableDisplayList2dCanvas[];
+CONTENT_EXPORT extern const char kDisableDeviceMotion[];
extern const char kDisableDomainBlockingFor3DAPIs[];
CONTENT_EXPORT extern const char kDisableWebGL[];
CONTENT_EXPORT extern const char kDisableWebGL2[];
+// Enables the device orientation API used to track device orientation;
+// no user authorization or notifications happens when in use.
+const base::Feature kDeviceOrientation{"DeviceOrientation",
+ base::FEATURE_DISABLED_BY_DEFAULT};
+
// Controls whether WebVR VSync-aligned render loop timing is enabled.
const base::Feature kWebVrVsyncAlign{"WebVrVsyncAlign",
base::FEATURE_ENABLED_BY_DEFAULT};
diff --git a/content/public/common/content_features.h b/content/public/common/content_features.h
--- a/content/public/common/content_features.h
+++ b/content/public/common/content_features.h
@@ -155,6 +155,8 @@ CONTENT_EXPORT extern const char kWebXrRenderPathParamValueGpuFence[];
CONTENT_EXPORT extern const char kWebXrRenderPathParamValueSharedBuffer[];
#endif // defined(OS_ANDROID)
+CONTENT_EXPORT extern const base::Feature kDeviceMotion, kDeviceOrientation;
+
#if !defined(OS_ANDROID)
CONTENT_EXPORT extern const base::Feature kWebUIPolymer2;
#endif // !defined(OS_ANDROID)
diff --git a/third_party/blink/public/platform/web_runtime_features.h b/third_party/blink/public/platform/web_runtime_features.h
--- a/third_party/blink/public/platform/web_runtime_features.h
+++ b/third_party/blink/public/platform/web_runtime_features.h
@@ -84,6 +84,7 @@ class WebRuntimeFeatures {
@@ -84,6 +84,8 @@ class WebRuntimeFeatures {
BLINK_PLATFORM_EXPORT static void EnableCSSFragmentIdentifiers(bool);
BLINK_PLATFORM_EXPORT static void EnableScrollTopLeftInterop(bool);
BLINK_PLATFORM_EXPORT static void EnableDatabase(bool);
+ BLINK_PLATFORM_EXPORT static void EnableDeviceMotion(bool);
+ BLINK_PLATFORM_EXPORT static void EnableDeviceOrientation(bool);
BLINK_PLATFORM_EXPORT static void EnableDecodeToYUV(bool);
BLINK_PLATFORM_EXPORT static void EnableDisplayCutoutAPI(bool);
BLINK_PLATFORM_EXPORT static void EnableFastMobileScrolling(bool);
diff --git a/third_party/blink/renderer/modules/modules_initializer.cc b/third_party/blink/renderer/modules/modules_initializer.cc
--- a/third_party/blink/renderer/modules/modules_initializer.cc
+++ b/third_party/blink/renderer/modules/modules_initializer.cc
@@ -233,7 +233,8 @@ void ModulesInitializer::InitInspectorAgentSession(
@@ -233,9 +233,12 @@ void ModulesInitializer::InitInspectorAgentSession(
void ModulesInitializer::OnClearWindowObjectInMainWorld(
Document& document,
const Settings& settings) const {
- DeviceMotionController::From(document);
- DeviceOrientationController::From(document);
- DeviceOrientationAbsoluteController::From(document);
+ if (RuntimeEnabledFeatures::DeviceMotionEnabled())
+ DeviceMotionController::From(document);
DeviceOrientationController::From(document);
DeviceOrientationAbsoluteController::From(document);
+ if (RuntimeEnabledFeatures::DeviceOrientationEnabled()) {
+ DeviceOrientationController::From(document);
+ DeviceOrientationAbsoluteController::From(document);
+ }
NavigatorGamepad::From(document);
NavigatorServiceWorker::From(document);
DOMWindowStorageController::From(document);
diff --git a/third_party/blink/renderer/platform/exported/web_runtime_features.cc b/third_party/blink/renderer/platform/exported/web_runtime_features.cc
--- a/third_party/blink/renderer/platform/exported/web_runtime_features.cc
+++ b/third_party/blink/renderer/platform/exported/web_runtime_features.cc
@@ -140,6 +140,10 @@ void WebRuntimeFeatures::EnableDatabase(bool enable) {
@@ -140,6 +140,14 @@ void WebRuntimeFeatures::EnableDatabase(bool enable) {
RuntimeEnabledFeatures::SetDatabaseEnabled(enable);
}
+void WebRuntimeFeatures::EnableDeviceMotion(bool enable) {
+ RuntimeEnabledFeatures::SetDeviceMotionEnabled(enable);
+}
+
+void WebRuntimeFeatures::EnableDeviceOrientation(bool enable) {
+ RuntimeEnabledFeatures::SetDeviceOrientationEnabled(enable);
+}
+
void WebRuntimeFeatures::EnableDecodeToYUV(bool enable) {
RuntimeEnabledFeatures::SetDecodeToYUVEnabled(enable);
@@ -145,13 +164,17 @@ diff --git a/third_party/blink/renderer/platform/exported/web_runtime_features.c
diff --git a/third_party/blink/renderer/platform/runtime_enabled_features.json5 b/third_party/blink/renderer/platform/runtime_enabled_features.json5
--- a/third_party/blink/renderer/platform/runtime_enabled_features.json5
+++ b/third_party/blink/renderer/platform/runtime_enabled_features.json5
@@ -348,6 +348,10 @@
@@ -348,6 +348,14 @@
status: "stable",
},
{
+ name: "DeviceMotion",
+ status: "stable",
+ },
+ {
+ name: "DeviceOrientation",
+ status: "stable",
+ },
+ {
name: "DecodeToYUV",
status: "experimental",
@@ -23,7 +23,7 @@ See also: https://tools.ietf.org/id/draft-ietf-doh-dns-over-https-12.txt
diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
--- a/chrome/browser/about_flags.cc
+++ b/chrome/browser/about_flags.cc
@@ -416,6 +416,13 @@ const FeatureEntry::Choice kChromeHomeSwipeLogicChoices[] = {
@@ -417,6 +417,13 @@ const FeatureEntry::Choice kChromeHomeSwipeLogicChoices[] = {
switches::kChromeHomeSwipeLogicType, "velocity"},
};
@@ -37,7 +37,7 @@ diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
#endif // OS_ANDROID
const FeatureEntry::Choice kNumRasterThreadsChoices[] = {
@@ -3722,6 +3729,12 @@ const FeatureEntry kFeatureEntries[] = {
@@ -3730,6 +3737,12 @@ const FeatureEntry kFeatureEntries[] = {
FEATURE_VALUE_TYPE(features::kAsyncDns)},
#endif // defined(OS_ANDROID)
@@ -53,7 +53,7 @@ diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descriptions.cc
--- a/chrome/browser/flag_descriptions.cc
+++ b/chrome/browser/flag_descriptions.cc
@@ -2248,6 +2248,9 @@ const char kAndroidPaymentAppsDescription[] =
@@ -2252,6 +2252,9 @@ const char kAndroidPaymentAppsDescription[] =
const char kAsyncDnsName[] = "Async DNS resolver";
const char kAsyncDnsDescription[] = "Enables the built-in DNS resolver.";
@@ -66,7 +66,7 @@ diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descripti
diff --git a/chrome/browser/flag_descriptions.h b/chrome/browser/flag_descriptions.h
--- a/chrome/browser/flag_descriptions.h
+++ b/chrome/browser/flag_descriptions.h
@@ -1353,6 +1353,9 @@ extern const char kAppNotificationStatusMessagingDescription[];
@@ -1356,6 +1356,9 @@ extern const char kAppNotificationStatusMessagingDescription[];
extern const char kAsyncDnsName[];
extern const char kAsyncDnsDescription[];
@@ -18,7 +18,7 @@ with limited CPU/memory resources and it is disabled by default.
diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
--- a/chrome/browser/about_flags.cc
+++ b/chrome/browser/about_flags.cc
@@ -909,6 +909,11 @@ const FeatureEntry::Choice kForceEffectiveConnectionTypeChoices[] = {
@@ -910,6 +910,11 @@ const FeatureEntry::Choice kForceEffectiveConnectionTypeChoices[] = {
net::kEffectiveConnectionType4G},
};
@@ -30,7 +30,7 @@ diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
// Ensure that all effective connection types returned by Network Quality
// Estimator (NQE) are also exposed via flags.
static_assert(net::EFFECTIVE_CONNECTION_TYPE_LAST + 2 ==
@@ -2607,6 +2612,9 @@ const FeatureEntry kFeatureEntries[] = {
@@ -2608,6 +2613,9 @@ const FeatureEntry kFeatureEntries[] = {
flag_descriptions::kMaterialDesignIncognitoNTPName,
flag_descriptions::kMaterialDesignIncognitoNTPDescription, kOsAndroid,
FEATURE_VALUE_TYPE(features::kMaterialDesignIncognitoNTP)},
@@ -43,7 +43,7 @@ diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descriptions.cc
--- a/chrome/browser/flag_descriptions.cc
+++ b/chrome/browser/flag_descriptions.cc
@@ -1141,6 +1141,10 @@ const char kMaterialDesignIncognitoNTPDescription[] =
@@ -1145,6 +1145,10 @@ const char kMaterialDesignIncognitoNTPDescription[] =
"If enabled, the Incognito New Tab page uses the new material design with "
"a better readable text.";
@@ -57,7 +57,7 @@ diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descripti
diff --git a/chrome/browser/flag_descriptions.h b/chrome/browser/flag_descriptions.h
--- a/chrome/browser/flag_descriptions.h
+++ b/chrome/browser/flag_descriptions.h
@@ -708,6 +708,9 @@ extern const char kMarkHttpAsWarningAndDangerousOnPasswordsAndCreditCards[];
@@ -711,6 +711,9 @@ extern const char kMarkHttpAsWarningAndDangerousOnPasswordsAndCreditCards[];
extern const char kMaterialDesignIncognitoNTPName[];
extern const char kMaterialDesignIncognitoNTPDescription[];
@@ -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
@@ -3982,10 +3982,6 @@ const FeatureEntry kFeatureEntries[] = {
@@ -3990,10 +3990,6 @@ const FeatureEntry kFeatureEntries[] = {
FEATURE_VALUE_TYPE(features::kOobeRecommendAppsScreen)},
#endif // OS_CHROMEOS
@@ -63,7 +63,7 @@ diff --git a/chrome/browser/android/chrome_feature_list.cc b/chrome/browser/andr
diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descriptions.cc
--- a/chrome/browser/flag_descriptions.cc
+++ b/chrome/browser/flag_descriptions.cc
@@ -1527,11 +1527,6 @@ const char kPullToRefreshDescription[] =
@@ -1531,11 +1531,6 @@ const char kPullToRefreshDescription[] =
"Pull-to-refresh gesture in response to vertical overscroll.";
const char kPullToRefreshEnabledTouchscreen[] = "Enabled for touchscreen only";
@@ -78,7 +78,7 @@ diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descripti
diff --git a/chrome/browser/flag_descriptions.h b/chrome/browser/flag_descriptions.h
--- a/chrome/browser/flag_descriptions.h
+++ b/chrome/browser/flag_descriptions.h
@@ -937,9 +937,6 @@ extern const char kPullToRefreshName[];
@@ -940,9 +940,6 @@ extern const char kPullToRefreshName[];
extern const char kPullToRefreshDescription[];
extern const char kPullToRefreshEnabledTouchscreen[];
@@ -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
@@ -0,0 +1,56 @@
From: csagan5 <32685696+csagan5@users.noreply.github.com>
Date: Mon, 5 Nov 2018 09:39:50 +0100
Subject: Enable TLS 1.3 (final) by default
---
.../browser/ssl/ssl_config_service_manager_pref.cc | 21 ++-------------------
1 file changed, 2 insertions(+), 19 deletions(-)
diff --git a/chrome/browser/ssl/ssl_config_service_manager_pref.cc b/chrome/browser/ssl/ssl_config_service_manager_pref.cc
--- a/chrome/browser/ssl/ssl_config_service_manager_pref.cc
+++ b/chrome/browser/ssl/ssl_config_service_manager_pref.cc
@@ -12,7 +12,6 @@
#include "base/bind.h"
#include "base/location.h"
#include "base/macros.h"
-#include "base/metrics/field_trial_params.h"
#include "base/strings/string_util.h"
#include "base/values.h"
#include "chrome/common/chrome_switches.h"
@@ -115,8 +114,6 @@ std::vector<std::string> CanonicalizeHostnamePatterns(
return out;
}
-const char kTLS13VariantExperimentName[] = "TLS13Variant";
-
////////////////////////////////////////////////////////////////////////////////
// SSLConfigServiceManagerPref
@@ -173,22 +170,8 @@ SSLConfigServiceManagerPref::SSLConfigServiceManagerPref(
PrefService* local_state) {
DCHECK(local_state);
- const std::string tls13_variant =
- base::GetFieldTrialParamValue(kTLS13VariantExperimentName, "variant");
- const char* tls13_value = nullptr;
- const char* version_value = nullptr;
- if (tls13_variant == "disabled") {
- tls13_value = switches::kTLS13VariantDisabled;
- } else if (tls13_variant == "draft23") {
- tls13_value = switches::kTLS13VariantDraft23;
- version_value = switches::kSSLVersionTLSv13;
- } else if (tls13_variant == "draft28") {
- tls13_value = switches::kTLS13VariantDraft28;
- version_value = switches::kSSLVersionTLSv13;
- } else if (tls13_variant == "final") {
- tls13_value = switches::kTLS13VariantFinal;
- version_value = switches::kSSLVersionTLSv13;
- }
+ const char* tls13_value = switches::kTLS13VariantFinal;
+ const char* version_value = switches::kSSLVersionTLSv13;
if (tls13_value) {
local_state->SetDefaultPrefValue(prefs::kTLS13Variant,
--
2.11.0