RecordUserAction.record("MobileMenuSettings");
} else if (id == R.id.show_menu) {
showAppMenuForKeyboardEvent();
@@ -53,7 +53,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/init/ChromeLife
diff --git a/chrome/android/java/strings/android_chrome_strings.grd b/chrome/android/java/strings/android_chrome_strings.grd
--- a/chrome/android/java/strings/android_chrome_strings.grd
+++ b/chrome/android/java/strings/android_chrome_strings.grd
-@@ -2992,6 +2992,9 @@ To change this setting, <resetlink>reset sync<resetlink>reset sync
Settings
diff --git a/build/patches/Add-flag-to-configure-maximum-connections-per-host.patch b/build/patches/Add-flag-to-configure-maximum-connections-per-host.patch
index 47227078..9fc55c5b 100644
--- a/build/patches/Add-flag-to-configure-maximum-connections-per-host.patch
+++ b/build/patches/Add-flag-to-configure-maximum-connections-per-host.patch
@@ -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
-@@ -964,6 +964,11 @@ const FeatureEntry::Choice kForceEffectiveConnectionTypeChoices[] = {
+@@ -912,6 +912,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[] = {
+@@ -2495,6 +2500,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
-@@ -1142,6 +1142,10 @@ const char kMaterialDesignIncognitoNTPDescription[] =
+@@ -1231,6 +1231,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
-@@ -710,6 +710,9 @@ extern const char kMarkHttpAsWarningAndDangerousOnPasswordsAndCreditCards[];
+@@ -748,6 +748,9 @@ extern const char kMarkHttpAsWarningAndDangerousOnPasswordsAndCreditCards[];
extern const char kMaterialDesignIncognitoNTPName[];
extern const char kMaterialDesignIncognitoNTPDescription[];
@@ -77,9 +77,9 @@ diff --git a/components/network_session_configurator/common/network_features.cc
+const char kMaxConnectionsPerHostChoiceDefault[] = "6",
+ kMaxConnectionsPerHostChoice15[] = "15";
+
- const base::Feature kChannelID{"channel-id", base::FEATURE_DISABLED_BY_DEFAULT};
-
const char kDnsOverHttpsChoiceDefault[] = "Disabled",
+ kDnsOverHttpsChoiceGoogle[] = "Google",
+ kDnsOverHttpsChoiceCloudflare[] = "Cloudflare",
diff --git a/components/network_session_configurator/common/network_features.h b/components/network_session_configurator/common/network_features.h
--- a/components/network_session_configurator/common/network_features.h
+++ b/components/network_session_configurator/common/network_features.h
@@ -91,9 +91,9 @@ diff --git a/components/network_session_configurator/common/network_features.h b
+ kMaxConnectionsPerHostChoice6[],
+ kMaxConnectionsPerHostChoice15[];
+
- // Enables Channel ID.
- NETWORK_SESSION_CONFIGURATOR_EXPORT extern const base::Feature kChannelID;
-
+ // DNS over HTTPS server endpoint choices
+ // (https://tools.ietf.org/id/draft-ietf-doh-dns-over-https-12.txt).
+ NETWORK_SESSION_CONFIGURATOR_EXPORT extern const base::Feature kDnsOverHttps;
diff --git a/components/network_session_configurator/common/network_switch_list.h b/components/network_session_configurator/common/network_switch_list.h
--- a/components/network_session_configurator/common/network_switch_list.h
+++ b/components/network_session_configurator/common/network_switch_list.h
@@ -130,7 +130,7 @@ diff --git a/net/socket/client_socket_pool_manager.cc b/net/socket/client_socket
namespace net {
-@@ -316,6 +319,19 @@ void ClientSocketPoolManager::set_max_sockets_per_pool(
+@@ -314,6 +317,19 @@ void ClientSocketPoolManager::set_max_sockets_per_pool(
int ClientSocketPoolManager::max_sockets_per_group(
HttpNetworkSession::SocketPoolType pool_type) {
DCHECK_LT(pool_type, HttpNetworkSession::NUM_SOCKET_POOL_TYPES);
diff --git a/build/patches/Add-flag-to-control-video-playback-resume-feature.patch b/build/patches/Add-flag-to-control-video-playback-resume-feature.patch
index 4333dfe7..3c35b7d4 100644
--- a/build/patches/Add-flag-to-control-video-playback-resume-feature.patch
+++ b/build/patches/Add-flag-to-control-video-playback-resume-feature.patch
@@ -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
-@@ -3439,6 +3439,11 @@ const FeatureEntry kFeatureEntries[] = {
+@@ -3330,6 +3330,11 @@ const FeatureEntry kFeatureEntries[] = {
FEATURE_VALUE_TYPE(features::kUseGoogleLocalNtp)},
#endif // !defined(OS_ANDROID)
@@ -28,7 +28,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
-@@ -759,6 +759,11 @@ const char kEnablePictureInPictureName[] = "Enable Picture-in-Picture.";
+@@ -791,6 +791,11 @@ const char kEnablePictureInPictureName[] = "Enable Picture-in-Picture.";
const char kEnablePictureInPictureDescription[] =
"Enable the Picture-in-Picture feature for videos.";
@@ -43,7 +43,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
-@@ -470,6 +470,9 @@ extern const char kOOPHPStackModePseudo[];
+@@ -479,6 +479,9 @@ extern const char kOOPHPStackModePseudo[];
extern const char kEnablePictureInPictureName[];
extern const char kEnablePictureInPictureDescription[];
@@ -56,7 +56,7 @@ diff --git a/chrome/browser/flag_descriptions.h b/chrome/browser/flag_descriptio
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
-@@ -221,11 +221,7 @@ const base::Feature kPreloadMetadataLazyLoad{"PreloadMetadataLazyLoad",
+@@ -217,11 +217,7 @@ const base::Feature kPreloadMetadataLazyLoad{"PreloadMetadataLazyLoad",
// when in background.
const base::Feature kResumeBackgroundVideo {
"resume-background-video",
@@ -68,7 +68,7 @@ diff --git a/media/base/media_switches.cc b/media/base/media_switches.cc
+ base::FEATURE_DISABLED_BY_DEFAULT
};
- // Display the Cast overlay button on the media controls.
+ // Enable Media Capabilities with finch-parameters.
--
2.11.0
diff --git a/build/patches/Add-flag-to-disable-IPv6-probes.patch b/build/patches/Add-flag-to-disable-IPv6-probes.patch
index 9100e3ae..270577ad 100644
--- a/build/patches/Add-flag-to-disable-IPv6-probes.patch
+++ b/build/patches/Add-flag-to-disable-IPv6-probes.patch
@@ -14,7 +14,7 @@ Subject: Add flag to disable IPv6 probes
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
-@@ -3499,6 +3499,11 @@ const FeatureEntry kFeatureEntries[] = {
+@@ -3382,6 +3382,11 @@ const FeatureEntry kFeatureEntries[] = {
FEATURE_VALUE_TYPE(features::kEnableVirtualKeyboardUkm)},
#endif // OS_CHROMEOS
@@ -29,7 +29,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
-@@ -763,6 +763,10 @@ const char kOOPHPStackModeNative[] = "Native";
+@@ -795,6 +795,10 @@ const char kOOPHPStackModeNative[] = "Native";
const char kOOPHPStackModeNativeWithThreadNames[] = "Native with thread names";
const char kOOPHPStackModePseudo[] = "Trace events";
@@ -43,7 +43,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
-@@ -473,6 +473,9 @@ extern const char kOOPHPStackModeNative[];
+@@ -482,6 +482,9 @@ extern const char kOOPHPStackModeNative[];
extern const char kOOPHPStackModeNativeWithThreadNames[];
extern const char kOOPHPStackModePseudo[];
@@ -56,7 +56,7 @@ diff --git a/chrome/browser/flag_descriptions.h b/chrome/browser/flag_descriptio
diff --git a/net/dns/host_resolver_impl.cc b/net/dns/host_resolver_impl.cc
--- a/net/dns/host_resolver_impl.cc
+++ b/net/dns/host_resolver_impl.cc
-@@ -76,6 +76,7 @@
+@@ -78,6 +78,7 @@
#include "net/log/net_log_with_source.h"
#include "net/socket/client_socket_factory.h"
#include "net/socket/datagram_client_socket.h"
@@ -64,7 +64,7 @@ diff --git a/net/dns/host_resolver_impl.cc b/net/dns/host_resolver_impl.cc
#include "url/url_canon_ip.h"
#if BUILDFLAG(ENABLE_MDNS)
-@@ -2719,8 +2720,13 @@ bool HostResolverImpl::IsIPv6Reachable(const NetLogWithSource& net_log) {
+@@ -2773,8 +2774,13 @@ bool HostResolverImpl::IsIPv6Reachable(const NetLogWithSource& net_log) {
bool cached = true;
if ((tick_clock_->NowTicks() - last_ipv6_probe_time_).InMilliseconds() >
kIPv6ProbePeriodMs) {
@@ -102,7 +102,7 @@ diff --git a/services/network/public/cpp/features.h b/services/network/public/cp
COMPONENT_EXPORT(NETWORK_CPP)
+extern const base::Feature kIPv6Probing;
+COMPONENT_EXPORT(NETWORK_CPP)
- extern const base::Feature kOutOfBlinkCORS;
+ extern const base::Feature kOutOfBlinkCors;
COMPONENT_EXPORT(NETWORK_CPP)
extern const base::Feature kReporting;
--
diff --git a/build/patches/Add-flags-to-disable-device-motion-and-orientation-APIs.patch b/build/patches/Add-flags-to-disable-device-motion-and-orientation-APIs.patch
index b59f49ce..e23e503a 100644
--- a/build/patches/Add-flags-to-disable-device-motion-and-orientation-APIs.patch
+++ b/build/patches/Add-flags-to-disable-device-motion-and-orientation-APIs.patch
@@ -20,7 +20,7 @@ legacy acceleration events.
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
-@@ -3005,6 +3005,12 @@ const FeatureEntry kFeatureEntries[] = {
+@@ -2900,6 +2900,12 @@ const FeatureEntry kFeatureEntries[] = {
{"enable-generic-sensor", flag_descriptions::kEnableGenericSensorName,
flag_descriptions::kEnableGenericSensorDescription, kOsAll,
FEATURE_VALUE_TYPE(features::kGenericSensor)},
@@ -36,7 +36,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
-@@ -551,6 +551,14 @@ const char kEnableGenericSensorDescription[] =
+@@ -567,6 +567,14 @@ const char kEnableGenericSensorDescription[] =
"Accelerometer, LinearAccelerationSensor, Gyroscope, "
"AbsoluteOrientationSensor and RelativeOrientationSensor interfaces.";
@@ -54,7 +54,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
-@@ -362,6 +362,12 @@ extern const char kEnableEnumeratingAudioDevicesDescription[];
+@@ -368,6 +368,12 @@ extern const char kEnableEnumeratingAudioDevicesDescription[];
extern const char kEnableGenericSensorName[];
extern const char kEnableGenericSensorDescription[];
@@ -70,20 +70,20 @@ diff --git a/chrome/browser/flag_descriptions.h b/chrome/browser/flag_descriptio
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
-@@ -143,6 +143,9 @@ void SetRuntimeFeaturesDefaultsAndUpdateFromArgs(
- if (command_line.HasSwitch(switches::kDisableSharedWorkers))
- WebRuntimeFeatures::EnableSharedWorker(false);
+@@ -145,6 +145,9 @@ void SetRuntimeFeaturesDefaultsAndUpdateFromArgs(
+ base::FeatureList::IsEnabled(features::kSharedArrayBuffer) ||
+ base::FeatureList::IsEnabled(features::kWebAssemblyThreads));
+ WebRuntimeFeatures::EnableDeviceMotion(base::FeatureList::IsEnabled(features::kDeviceMotion));
+ WebRuntimeFeatures::EnableDeviceOrientation(base::FeatureList::IsEnabled(features::kDeviceOrientation));
+
- if (command_line.HasSwitch(switches::kDisableSpeechAPI))
- WebRuntimeFeatures::EnableScriptedSpeech(false);
+ if (command_line.HasSwitch(switches::kDisableSharedWorkers))
+ WebRuntimeFeatures::EnableSharedWorker(false);
diff --git a/content/public/common/content_features.cc b/content/public/common/content_features.cc
--- a/content/public/common/content_features.cc
+++ b/content/public/common/content_features.cc
-@@ -570,6 +570,16 @@ const base::Feature kWebRtcHideLocalIpsWithMdns{
+@@ -598,6 +598,16 @@ const base::Feature kWebRtcHideLocalIpsWithMdns{
// https://wicg.github.io/webusb
const base::Feature kWebUsb{"WebUSB", base::FEATURE_ENABLED_BY_DEFAULT};
@@ -103,7 +103,7 @@ diff --git a/content/public/common/content_features.cc b/content/public/common/c
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
-@@ -152,6 +152,8 @@ CONTENT_EXPORT extern const char kWebXrRenderPathParamValueGpuFence[];
+@@ -156,6 +156,8 @@ CONTENT_EXPORT extern const char kWebXrRenderPathParamValueGpuFence[];
CONTENT_EXPORT extern const char kWebXrRenderPathParamValueSharedBuffer[];
#endif // defined(OS_ANDROID)
@@ -115,7 +115,7 @@ diff --git a/content/public/common/content_features.h b/content/public/common/co
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
-@@ -85,6 +85,8 @@ class WebRuntimeFeatures {
+@@ -97,6 +97,8 @@ class WebRuntimeFeatures {
BLINK_PLATFORM_EXPORT static void EnableCSSFragmentIdentifiers(bool);
BLINK_PLATFORM_EXPORT static void EnableScrollTopLeftInterop(bool);
BLINK_PLATFORM_EXPORT static void EnableDatabase(bool);
@@ -146,7 +146,7 @@ diff --git a/third_party/blink/renderer/modules/modules_initializer.cc b/third_p
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
-@@ -136,6 +136,14 @@ void WebRuntimeFeatures::EnableDatabase(bool enable) {
+@@ -152,6 +152,14 @@ void WebRuntimeFeatures::EnableDatabase(bool enable) {
RuntimeEnabledFeatures::SetDatabaseEnabled(enable);
}
@@ -164,7 +164,7 @@ 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
-@@ -357,6 +357,14 @@
+@@ -371,6 +371,14 @@
status: "stable",
},
{
diff --git a/build/patches/Add-menu-option-to-toggle-global-Javascript-preference.patch b/build/patches/Add-menu-option-to-toggle-global-Javascript-preference.patch
index 9cf681ee..39fd6de3 100644
--- a/build/patches/Add-menu-option-to-toggle-global-Javascript-preference.patch
+++ b/build/patches/Add-menu-option-to-toggle-global-Javascript-preference.patch
@@ -75,7 +75,7 @@ diff --git a/chrome/android/java/res/menu/main_menu.xml b/chrome/android/java/re
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ChromeActivity.java b/chrome/android/java/src/org/chromium/chrome/browser/ChromeActivity.java
--- a/chrome/android/java/src/org/chromium/chrome/browser/ChromeActivity.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/ChromeActivity.java
-@@ -2195,6 +2195,14 @@ public abstract class ChromeActivity
+@@ -2196,6 +2196,14 @@ public abstract class ChromeActivity
final boolean usingDesktopUserAgent = currentTab.getUseDesktopUserAgent();
currentTab.setUseDesktopUserAgent(!usingDesktopUserAgent, reloadOnChange);
RecordUserAction.record("MobileMenuRequestDesktopSite");
@@ -93,7 +93,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ChromeActivity.
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java b/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java
--- a/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java
-@@ -1718,6 +1718,14 @@ public class ChromeTabbedActivity
+@@ -1709,6 +1709,14 @@ public class ChromeTabbedActivity
NewTabPageUma.recordAction(NewTabPageUma.ACTION_OPENED_DOWNLOADS_MANAGER);
}
RecordUserAction.record("MobileMenuDownloadManager");
@@ -119,7 +119,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/appmenu/AppMenu
import org.chromium.chrome.browser.ShortcutHelper;
import org.chromium.chrome.browser.UrlConstants;
import org.chromium.chrome.browser.banners.AppBannerManager;
-@@ -209,6 +210,8 @@ public class AppMenuPropertiesDelegate {
+@@ -197,6 +198,8 @@ public class AppMenuPropertiesDelegate {
updateRequestDesktopSiteMenuItem(menu, currentTab, true /* can show */);
@@ -128,7 +128,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/appmenu/AppMenu
// Only display reader mode settings menu option if the current page is in reader mode.
menu.findItem(R.id.reader_mode_prefs_id)
.setVisible(DomDistillerUrlUtils.isDistilledPage(currentTab.getUrl()));
-@@ -448,6 +451,41 @@ public class AppMenuPropertiesDelegate {
+@@ -450,6 +453,41 @@ public class AppMenuPropertiesDelegate {
}
/**
@@ -184,7 +184,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/Cust
diff --git a/chrome/android/java/strings/android_chrome_strings.grd b/chrome/android/java/strings/android_chrome_strings.grd
--- a/chrome/android/java/strings/android_chrome_strings.grd
+++ b/chrome/android/java/strings/android_chrome_strings.grd
-@@ -2977,6 +2977,17 @@ To change this setting, <resetlink>reset sync<resetlink>reset sync
Find in page
diff --git a/build/patches/Add-option-to-not-persist-tabs-across-sessions.patch b/build/patches/Add-option-to-not-persist-tabs-across-sessions.patch
index 30ff818b..ee35cd27 100644
--- a/build/patches/Add-option-to-not-persist-tabs-across-sessions.patch
+++ b/build/patches/Add-option-to-not-persist-tabs-across-sessions.patch
@@ -13,7 +13,7 @@ Subject: Add option to not persist tabs across sessions
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
+++ b/chrome/android/java/res/values/values.xml
-@@ -66,6 +66,9 @@
+@@ -67,6 +67,9 @@
@@ -41,7 +41,7 @@ diff --git a/chrome/android/java/res/xml/privacy_preferences.xml b/chrome/androi
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java b/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java
--- a/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java
-@@ -1030,8 +1030,10 @@ public class ChromeTabbedActivity
+@@ -1016,8 +1016,10 @@ public class ChromeTabbedActivity
boolean hadCipherData =
CipherFactory.getInstance().restoreFromBundle(getSavedInstanceState());
@@ -108,7 +108,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/preferences/pri
diff --git a/chrome/android/java/strings/android_chrome_strings.grd b/chrome/android/java/strings/android_chrome_strings.grd
--- a/chrome/android/java/strings/android_chrome_strings.grd
+++ b/chrome/android/java/strings/android_chrome_strings.grd
-@@ -3765,6 +3765,12 @@ However, you aren’t invisible. Going private doesn’t hide your browsing from
+@@ -3853,6 +3853,12 @@ However, you aren’t invisible. Going private doesn’t hide your browsing from
IMAGE
diff --git a/build/patches/Add-site-settings-option-for-session-only-cookies.patch b/build/patches/Add-site-settings-option-for-session-only-cookies.patch
index 503f5cad..55e05b6b 100644
--- a/build/patches/Add-site-settings-option-for-session-only-cookies.patch
+++ b/build/patches/Add-site-settings-option-for-session-only-cookies.patch
@@ -28,7 +28,7 @@ diff --git a/chrome/android/java/res/xml/website_preferences.xml b/chrome/androi
--- a/chrome/android/java/res/xml/website_preferences.xml
+++ b/chrome/android/java/res/xml/website_preferences.xml
@@ -26,6 +26,13 @@
- android:summary="@string/allow_third_party_cookies_summary"
+ android:summary="@string/block_third_party_cookies_summary"
android:defaultValue="true"
android:persistent="false" />
+
@@ -55,7 +55,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/preferences/Pre
/**
* @return Whether third-party cookie blocking is configured by policy
*/
-@@ -638,6 +642,10 @@ public class PrefServiceBridge {
+@@ -631,6 +635,10 @@ public class PrefServiceBridge {
nativeSetBlockThirdPartyCookiesEnabled(enabled);
}
@@ -66,7 +66,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/preferences/Pre
public void setDoNotTrackEnabled(boolean enabled) {
nativeSetDoNotTrackEnabled(enabled);
}
-@@ -1086,6 +1094,7 @@ public class PrefServiceBridge {
+@@ -1079,6 +1087,7 @@ public class PrefServiceBridge {
private native boolean nativeGetAutoplayEnabled();
private native boolean nativeGetBackgroundSyncEnabled();
private native boolean nativeGetBlockThirdPartyCookiesEnabled();
@@ -74,7 +74,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/preferences/Pre
private native boolean nativeGetBlockThirdPartyCookiesManaged();
private native boolean nativeGetRememberPasswordsEnabled();
private native boolean nativeGetPasswordManagerAutoSigninEnabled();
-@@ -1132,6 +1141,7 @@ public class PrefServiceBridge {
+@@ -1125,6 +1134,7 @@ public class PrefServiceBridge {
private native void nativeSetAutoplayEnabled(boolean enabled);
private native void nativeSetAllowCookiesEnabled(boolean enabled);
private native void nativeSetBackgroundSyncEnabled(boolean enabled);
@@ -85,7 +85,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/preferences/Pre
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/preferences/website/SingleCategoryPreferences.java b/chrome/android/java/src/org/chromium/chrome/browser/preferences/website/SingleCategoryPreferences.java
--- a/chrome/android/java/src/org/chromium/chrome/browser/preferences/website/SingleCategoryPreferences.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/preferences/website/SingleCategoryPreferences.java
-@@ -110,6 +110,7 @@ public class SingleCategoryPreferences extends PreferenceFragment
+@@ -121,6 +121,7 @@ public class SingleCategoryPreferences extends PreferenceFragment
// Keys for category-specific preferences (toggle, link, button etc.), dynamically shown.
public static final String THIRD_PARTY_COOKIES_TOGGLE_KEY = "third_party_cookies";
@@ -93,7 +93,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/preferences/web
public static final String NOTIFICATIONS_VIBRATE_TOGGLE_KEY = "notifications_vibrate";
public static final String EXPLAIN_PROTECTED_MEDIA_KEY = "protected_content_learn_more";
private static final String ADD_EXCEPTION_KEY = "add_exception";
-@@ -438,6 +439,7 @@ public class SingleCategoryPreferences extends PreferenceFragment
+@@ -440,6 +441,7 @@ public class SingleCategoryPreferences extends PreferenceFragment
if (type == SiteSettingsCategory.Type.COOKIES) {
updateThirdPartyCookiesCheckBox();
@@ -101,16 +101,16 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/preferences/web
} else if (type == SiteSettingsCategory.Type.NOTIFICATIONS) {
updateNotificationsVibrateCheckBox();
}
-@@ -476,6 +478,8 @@ public class SingleCategoryPreferences extends PreferenceFragment
+@@ -478,6 +480,8 @@ public class SingleCategoryPreferences extends PreferenceFragment
+ prefServiceBridge.setContentSetting(
+ mCategory.getContentSettingsType(), setting.toInt());
getInfoForOrigins();
- } else if (THIRD_PARTY_COOKIES_TOGGLE_KEY.equals(preference.getKey())) {
- prefServiceBridge.setBlockThirdPartyCookiesEnabled(!((boolean) newValue));
+ } else if (COOKIES_SESSION_ONLY_TOGGLE_KEY.equals(preference.getKey())) {
+ prefServiceBridge.setCookiesSessionOnlyEnabled((boolean) newValue);
+ } else if (THIRD_PARTY_COOKIES_TOGGLE_KEY.equals(preference.getKey())) {
+ prefServiceBridge.setBlockThirdPartyCookiesEnabled(((boolean) newValue));
} else if (NOTIFICATIONS_VIBRATE_TOGGLE_KEY.equals(preference.getKey())) {
- prefServiceBridge.setNotificationsVibrateEnabled((boolean) newValue);
- }
-@@ -738,6 +742,8 @@ public class SingleCategoryPreferences extends PreferenceFragment
+@@ -767,6 +771,8 @@ public class SingleCategoryPreferences extends PreferenceFragment
TriStateSiteSettingsPreference triStateToggle =
(TriStateSiteSettingsPreference) screen.findPreference(TRI_STATE_TOGGLE_KEY);
Preference thirdPartyCookies = screen.findPreference(THIRD_PARTY_COOKIES_TOGGLE_KEY);
@@ -119,16 +119,16 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/preferences/web
Preference notificationsVibrate = screen.findPreference(NOTIFICATIONS_VIBRATE_TOGGLE_KEY);
Preference explainProtectedMediaKey = screen.findPreference(EXPLAIN_PROTECTED_MEDIA_KEY);
PreferenceGroup allowedGroup = (PreferenceGroup) screen.findPreference(ALLOWED_GROUP);
-@@ -752,6 +758,7 @@ public class SingleCategoryPreferences extends PreferenceFragment
- screen.removePreference(binaryToggle);
- screen.removePreference(triStateToggle);
+@@ -797,6 +803,7 @@ public class SingleCategoryPreferences extends PreferenceFragment
+
+ if (hideSecondaryToggles) {
screen.removePreference(thirdPartyCookies);
+ screen.removePreference(cookiesSessionOnly);
screen.removePreference(notificationsVibrate);
screen.removePreference(explainProtectedMediaKey);
screen.removePreference(allowedGroup);
-@@ -787,12 +794,15 @@ public class SingleCategoryPreferences extends PreferenceFragment
- configureBinaryToggle(binaryToggle, contentType);
+@@ -806,12 +813,15 @@ public class SingleCategoryPreferences extends PreferenceFragment
+ return;
}
- // Configure/hide the third-party cookie toggle, as needed.
@@ -144,7 +144,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/preferences/web
}
// Configure/hide the notifications vibrate toggle, as needed.
-@@ -878,6 +888,15 @@ public class SingleCategoryPreferences extends PreferenceFragment
+@@ -916,6 +926,15 @@ public class SingleCategoryPreferences extends PreferenceFragment
preference -> PrefServiceBridge.getInstance().isBlockThirdPartyCookiesManaged());
}
@@ -163,9 +163,9 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/preferences/web
diff --git a/chrome/android/java/strings/android_chrome_strings.grd b/chrome/android/java/strings/android_chrome_strings.grd
--- a/chrome/android/java/strings/android_chrome_strings.grd
+++ b/chrome/android/java/strings/android_chrome_strings.grd
-@@ -882,6 +882,12 @@ Your Google account may have other forms of browsing history like searches and a
-
- Third-party websites can save and read cookie data
+@@ -879,6 +879,12 @@ Your Google account may have other forms of browsing history like searches and a
+
+ Prevent third-party websites from saving and reading cookie data
+
+ Keep cookies only until you quit your browser
@@ -197,7 +197,7 @@ diff --git a/chrome/browser/android/preferences/pref_service_bridge.cc b/chrome/
static jboolean JNI_PrefServiceBridge_GetBlockThirdPartyCookiesManaged(
JNIEnv* env,
const JavaParamRef& obj) {
-@@ -774,6 +785,20 @@ static void JNI_PrefServiceBridge_SetBlockThirdPartyCookiesEnabled(
+@@ -767,6 +778,20 @@ static void JNI_PrefServiceBridge_SetBlockThirdPartyCookiesEnabled(
GetPrefService()->SetBoolean(prefs::kBlockThirdPartyCookies, enabled);
}
diff --git a/build/patches/Allow-building-without-safebrowsing-for-Android.patch b/build/patches/Allow-building-without-safebrowsing-for-Android.patch
index bfe8125e..b0be8089 100644
--- a/build/patches/Allow-building-without-safebrowsing-for-Android.patch
+++ b/build/patches/Allow-building-without-safebrowsing-for-Android.patch
@@ -4,37 +4,33 @@ Subject: Allow building without safebrowsing for Android
Fix build from scratch (issue found by nikolowry)
---
- .../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 +-----
- .../file_type_policies_component_installer.cc | 2 +
- .../download/chrome_download_manager_delegate.cc | 14 +++++-
- .../download/chrome_download_manager_delegate.h | 6 +++
- chrome/browser/download/download_item_model.cc | 10 ++++
- chrome/browser/download/download_item_model.h | 4 ++
- chrome/browser/download/download_prefs.cc | 4 ++
- .../browser/download/download_target_determiner.cc | 18 +++++++
- .../browser/download/download_target_determiner.h | 6 +++
- chrome/browser/download/download_target_info.cc | 4 ++
- chrome/browser/download/download_target_info.h | 4 ++
- chrome/browser/download/download_ui_model.cc | 4 ++
- chrome/browser/download/download_ui_model.h | 4 ++
- .../chrome_resource_dispatcher_host_delegate.cc | 4 ++
- chrome/browser/net/chrome_network_delegate.cc | 35 +------------
- 18 files changed, 85 insertions(+), 128 deletions(-)
+ .../android/java/res/xml/privacy_preferences.xml | 8 -----
+ .../preferences/privacy/PrivacyPreferences.java | 40 ----------------------
+ .../chrome_browsing_data_remover_delegate.cc | 10 ------
+ chrome/browser/chrome_content_browser_client.cc | 14 +-------
+ .../file_type_policies_component_installer.cc | 2 ++
+ .../download/chrome_download_manager_delegate.cc | 14 ++++++--
+ .../download/chrome_download_manager_delegate.h | 6 ++++
+ chrome/browser/download/download_item_model.cc | 10 ++++++
+ chrome/browser/download/download_item_model.h | 4 +++
+ chrome/browser/download/download_prefs.cc | 4 +++
+ .../browser/download/download_target_determiner.cc | 18 ++++++++++
+ .../browser/download/download_target_determiner.h | 6 ++++
+ chrome/browser/download/download_target_info.cc | 4 +++
+ chrome/browser/download/download_target_info.h | 4 +++
+ chrome/browser/download/download_ui_model.cc | 4 +++
+ chrome/browser/download/download_ui_model.h | 4 +++
+ .../chrome_resource_dispatcher_host_delegate.cc | 4 +++
+ chrome/browser/net/chrome_network_delegate.cc | 35 ++-----------------
+ 18 files changed, 85 insertions(+), 106 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
+++ b/chrome/android/java/res/xml/privacy_preferences.xml
-@@ -18,18 +18,6 @@
+@@ -18,14 +18,6 @@
android:summary="@string/search_suggestions_summary"
android:defaultValue="true" />
--
@@ -49,48 +45,34 @@ diff --git a/chrome/android/java/res/xml/privacy_preferences.xml b/chrome/androi
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/preferences/privacy/PrivacyPreferences.java b/chrome/android/java/src/org/chromium/chrome/browser/preferences/privacy/PrivacyPreferences.java
--- a/chrome/android/java/src/org/chromium/chrome/browser/preferences/privacy/PrivacyPreferences.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/preferences/privacy/PrivacyPreferences.java
-@@ -38,11 +38,6 @@ public class PrivacyPreferences extends PreferenceFragment
+@@ -38,9 +38,6 @@ public class PrivacyPreferences extends PreferenceFragment
implements OnPreferenceChangeListener {
private static final String PREF_NAVIGATION_ERROR = "navigation_error";
private static final String PREF_SEARCH_SUGGESTIONS = "search_suggestions";
-- private static final String PREF_SAFE_BROWSING_EXTENDED_REPORTING =
-- "safe_browsing_extended_reporting";
- private static final String PREF_SAFE_BROWSING_SCOUT_REPORTING =
- "safe_browsing_scout_reporting";
- private static final String PREF_SAFE_BROWSING = "safe_browsing";
private static final String PREF_CAN_MAKE_PAYMENT = "can_make_payment";
private static final String PREF_CONTEXTUAL_SEARCH = "contextual_search";
private static final String PREF_NETWORK_PREDICTIONS = "network_predictions";
-@@ -76,10 +71,6 @@ public class PrivacyPreferences extends PreferenceFragment
+@@ -74,8 +71,6 @@ public class PrivacyPreferences extends PreferenceFragment
// Remove preferences that were migrated to SyncAndServicesPreferences.
preferenceScreen.removePreference(findPreference(PREF_NAVIGATION_ERROR));
preferenceScreen.removePreference(findPreference(PREF_SEARCH_SUGGESTIONS));
-- preferenceScreen.removePreference(
-- findPreference(PREF_SAFE_BROWSING_EXTENDED_REPORTING));
- preferenceScreen.removePreference(findPreference(PREF_SAFE_BROWSING_SCOUT_REPORTING));
- preferenceScreen.removePreference(findPreference(PREF_SAFE_BROWSING));
preferenceScreen.removePreference(findPreference(PREF_NETWORK_PREDICTIONS));
preferenceScreen.removePreference(findPreference(PREF_CONTEXTUAL_SEARCH));
preferenceScreen.removePreference(findPreference(PREF_USAGE_AND_CRASH_REPORTING));
-@@ -119,27 +110,6 @@ public class PrivacyPreferences extends PreferenceFragment
+@@ -115,17 +110,6 @@ public class PrivacyPreferences extends PreferenceFragment
preferenceScreen.removePreference(findPreference(PREF_CONTEXTUAL_SEARCH));
}
-- // Listen to changes to both Extended Reporting prefs.
-- ChromeBaseCheckBoxPreference legacyExtendedReportingPref =
-- (ChromeBaseCheckBoxPreference) findPreference(
-- PREF_SAFE_BROWSING_EXTENDED_REPORTING);
-- legacyExtendedReportingPref.setOnPreferenceChangeListener(this);
-- legacyExtendedReportingPref.setManagedPreferenceDelegate(mManagedPreferenceDelegate);
+- // Listen to changes to the Extended Reporting pref.
- ChromeBaseCheckBoxPreference scoutReportingPref =
- (ChromeBaseCheckBoxPreference) findPreference(PREF_SAFE_BROWSING_SCOUT_REPORTING);
- scoutReportingPref.setOnPreferenceChangeListener(this);
- scoutReportingPref.setManagedPreferenceDelegate(mManagedPreferenceDelegate);
-- // Remove the extended reporting preference that is NOT active.
-- String extended_reporting_pref_to_remove =
-- prefServiceBridge.isSafeBrowsingScoutReportingActive()
-- ? PREF_SAFE_BROWSING_EXTENDED_REPORTING : PREF_SAFE_BROWSING_SCOUT_REPORTING;
-- preferenceScreen.removePreference(findPreference(extended_reporting_pref_to_remove));
-
- ChromeBaseCheckBoxPreference safeBrowsingPref =
- (ChromeBaseCheckBoxPreference) findPreference(PREF_SAFE_BROWSING);
@@ -100,27 +82,24 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/preferences/pri
updateSummaries();
}
-@@ -148,12 +118,6 @@ public class PrivacyPreferences extends PreferenceFragment
+@@ -134,11 +118,6 @@ public class PrivacyPreferences extends PreferenceFragment
String key = preference.getKey();
if (PREF_SEARCH_SUGGESTIONS.equals(key)) {
PrefServiceBridge.getInstance().setSearchSuggestEnabled((boolean) newValue);
- } else if (PREF_SAFE_BROWSING.equals(key)) {
- PrefServiceBridge.getInstance().setSafeBrowsingEnabled((boolean) newValue);
-- } else if (PREF_SAFE_BROWSING_EXTENDED_REPORTING.equals(key)
-- || PREF_SAFE_BROWSING_SCOUT_REPORTING.equals(key)) {
+- } else if (PREF_SAFE_BROWSING_SCOUT_REPORTING.equals(key)) {
- PrefServiceBridge.getInstance().setSafeBrowsingExtendedReportingEnabled(
- (boolean) newValue);
} else if (PREF_NETWORK_PREDICTIONS.equals(key)) {
PrefServiceBridge.getInstance().setNetworkPredictionEnabled((boolean) newValue);
recordNetworkPredictionEnablingUMA((boolean) newValue);
-@@ -202,21 +166,6 @@ public class PrivacyPreferences extends PreferenceFragment
+@@ -187,19 +166,6 @@ public class PrivacyPreferences extends PreferenceFragment
searchSuggestionsPref.setChecked(prefServiceBridge.isSearchSuggestEnabled());
}
-- String extended_reporting_pref = prefServiceBridge.isSafeBrowsingScoutReportingActive()
-- ? PREF_SAFE_BROWSING_SCOUT_REPORTING : PREF_SAFE_BROWSING_EXTENDED_REPORTING;
- CheckBoxPreference extendedReportingPref =
-- (CheckBoxPreference) findPreference(extended_reporting_pref);
+- (CheckBoxPreference) findPreference(PREF_SAFE_BROWSING_SCOUT_REPORTING);
- if (extendedReportingPref != null) {
- extendedReportingPref.setChecked(
- prefServiceBridge.isSafeBrowsingExtendedReportingEnabled());
@@ -135,12 +114,11 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/preferences/pri
CheckBoxPreference canMakePaymentPref =
(CheckBoxPreference) findPreference(PREF_CAN_MAKE_PAYMENT);
if (canMakePaymentPref != null) {
-@@ -253,13 +202,6 @@ public class PrivacyPreferences extends PreferenceFragment
+@@ -236,12 +202,6 @@ public class PrivacyPreferences extends PreferenceFragment
if (PREF_SEARCH_SUGGESTIONS.equals(key)) {
return prefs.isSearchSuggestManaged();
}
-- if (PREF_SAFE_BROWSING_EXTENDED_REPORTING.equals(key)
-- || PREF_SAFE_BROWSING_SCOUT_REPORTING.equals(key)) {
+- if (PREF_SAFE_BROWSING_SCOUT_REPORTING.equals(key)) {
- return prefs.isSafeBrowsingExtendedReportingManaged();
- }
- if (PREF_SAFE_BROWSING.equals(key)) {
@@ -152,7 +130,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/preferences/pri
diff --git a/chrome/browser/browsing_data/chrome_browsing_data_remover_delegate.cc b/chrome/browser/browsing_data/chrome_browsing_data_remover_delegate.cc
--- a/chrome/browser/browsing_data/chrome_browsing_data_remover_delegate.cc
+++ b/chrome/browser/browsing_data/chrome_browsing_data_remover_delegate.cc
-@@ -254,16 +254,6 @@ bool DoesOriginMatchEmbedderMask(int origin_type_mask,
+@@ -242,16 +242,6 @@ bool DoesOriginMatchEmbedderMask(int origin_type_mask,
return false;
}
@@ -172,7 +150,7 @@ diff --git a/chrome/browser/browsing_data/chrome_browsing_data_remover_delegate.
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
-@@ -4853,19 +4853,7 @@ ChromeContentBrowserClient::GetSafeBrowsingUrlCheckerDelegate(
+@@ -4990,19 +4990,7 @@ ChromeContentBrowserClient::GetSafeBrowsingUrlCheckerDelegate(
content::ResourceContext* resource_context) {
DCHECK_CURRENTLY_ON(BrowserThread::IO);
@@ -228,9 +206,9 @@ diff --git a/chrome/browser/download/chrome_download_manager_delegate.cc b/chrom
#include "chrome/common/safe_browsing/file_type_policies.h"
+#endif
#include "chrome/grit/generated_resources.h"
- #include "components/download/database/in_progress/in_progress_cache_impl.h"
#include "components/download/public/common/download_interrupt_reasons.h"
-@@ -95,8 +99,10 @@
+ #include "components/download/public/common/download_item.h"
+@@ -94,8 +98,10 @@
using content::BrowserThread;
using download::DownloadItem;
using content::DownloadManager;
@@ -241,7 +219,7 @@ diff --git a/chrome/browser/download/chrome_download_manager_delegate.cc b/chrom
namespace {
-@@ -746,19 +752,19 @@ ChromeDownloadManagerDelegate::ApplicationClientIdForFileScanning() const {
+@@ -744,19 +750,19 @@ ChromeDownloadManagerDelegate::ApplicationClientIdForFileScanning() const {
return std::string(chrome::kApplicationClientIDStringForAVScanning);
}
@@ -263,7 +241,7 @@ diff --git a/chrome/browser/download/chrome_download_manager_delegate.cc b/chrom
void ChromeDownloadManagerDelegate::NotifyExtensions(
DownloadItem* download,
-@@ -1201,13 +1207,17 @@ void ChromeDownloadManagerDelegate::OnDownloadTargetDetermined(
+@@ -1199,13 +1205,17 @@ void ChromeDownloadManagerDelegate::OnDownloadTargetDetermined(
DownloadItemModel(item).SetShouldPreferOpeningInBrowser(true);
#endif
@@ -365,7 +343,7 @@ diff --git a/chrome/browser/download/download_item_model.cc b/chrome/browser/dow
is_being_revived_(false) {}
} // namespace
-@@ -376,6 +384,7 @@ void DownloadItemModel::SetShouldPreferOpeningInBrowser(bool preference) {
+@@ -368,6 +376,7 @@ void DownloadItemModel::SetShouldPreferOpeningInBrowser(bool preference) {
data->should_prefer_opening_in_browser_ = preference;
}
@@ -373,7 +351,7 @@ diff --git a/chrome/browser/download/download_item_model.cc b/chrome/browser/dow
DownloadFileType::DangerLevel DownloadItemModel::GetDangerLevel() const {
const DownloadItemModelData* data = DownloadItemModelData::Get(download_);
return data ? data->danger_level_ : DownloadFileType::NOT_DANGEROUS;
-@@ -386,6 +395,7 @@ void DownloadItemModel::SetDangerLevel(
+@@ -378,6 +387,7 @@ void DownloadItemModel::SetDangerLevel(
DownloadItemModelData* data = DownloadItemModelData::GetOrCreate(download_);
data->danger_level_ = danger_level;
}
@@ -691,7 +669,7 @@ diff --git a/chrome/browser/download/download_ui_model.h b/chrome/browser/downlo
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
-@@ -451,14 +451,18 @@ void ChromeResourceDispatcherHostDelegate::AppendStandardResourceThrottles(
+@@ -421,14 +421,18 @@ void ChromeResourceDispatcherHostDelegate::AppendStandardResourceThrottles(
content::ResourceContext* resource_context,
ResourceType resource_type,
std::vector>* throttles) {
@@ -713,7 +691,7 @@ diff --git a/chrome/browser/loader/chrome_resource_dispatcher_host_delegate.cc b
diff --git a/chrome/browser/net/chrome_network_delegate.cc b/chrome/browser/net/chrome_network_delegate.cc
--- a/chrome/browser/net/chrome_network_delegate.cc
+++ b/chrome/browser/net/chrome_network_delegate.cc
-@@ -79,19 +79,6 @@ namespace {
+@@ -78,19 +78,6 @@ namespace {
bool g_access_to_all_files_enabled = false;
@@ -733,7 +711,7 @@ diff --git a/chrome/browser/net/chrome_network_delegate.cc b/chrome/browser/net/
bool IsAccessAllowedInternal(const base::FilePath& path,
const base::FilePath& profile_path) {
if (g_access_to_all_files_enabled)
-@@ -213,26 +200,8 @@ int ChromeNetworkDelegate::OnBeforeURLRequest(
+@@ -212,26 +199,8 @@ int ChromeNetworkDelegate::OnBeforeURLRequest(
GURL* new_url) {
extensions_delegate_->ForwardStartRequestStatus(request);
diff --git a/build/patches/Allow-playing-audio-in-background.patch b/build/patches/Allow-playing-audio-in-background.patch
index 1daadb15..de0a987b 100644
--- a/build/patches/Allow-playing-audio-in-background.patch
+++ b/build/patches/Allow-playing-audio-in-background.patch
@@ -10,7 +10,7 @@ Subject: Allow playing audio in background
diff --git a/media/blink/webmediaplayer_impl.cc b/media/blink/webmediaplayer_impl.cc
--- a/media/blink/webmediaplayer_impl.cc
+++ b/media/blink/webmediaplayer_impl.cc
-@@ -908,6 +908,12 @@ bool WebMediaPlayerImpl::HasAudio() const {
+@@ -917,6 +917,12 @@ bool WebMediaPlayerImpl::HasAudio() const {
return pipeline_metadata_.has_audio;
}
@@ -23,7 +23,7 @@ diff --git a/media/blink/webmediaplayer_impl.cc b/media/blink/webmediaplayer_imp
void WebMediaPlayerImpl::EnabledAudioTracksChanged(
const blink::WebVector& enabledTrackIds) {
DCHECK(main_task_runner_->BelongsToCurrentThread());
-@@ -3053,7 +3059,10 @@ bool WebMediaPlayerImpl::ShouldPauseVideoWhenHidden() const {
+@@ -3108,7 +3114,10 @@ bool WebMediaPlayerImpl::ShouldPauseVideoWhenHidden() const {
// If suspending background video, pause any video that's not remoted or
// not unlocked to play in the background.
if (IsBackgroundSuspendEnabled(delegate_)) {
@@ -38,7 +38,7 @@ diff --git a/media/blink/webmediaplayer_impl.cc b/media/blink/webmediaplayer_imp
diff --git a/media/blink/webmediaplayer_impl.h b/media/blink/webmediaplayer_impl.h
--- a/media/blink/webmediaplayer_impl.h
+++ b/media/blink/webmediaplayer_impl.h
-@@ -161,6 +161,8 @@ class MEDIA_BLINK_EXPORT WebMediaPlayerImpl
+@@ -162,6 +162,8 @@ class MEDIA_BLINK_EXPORT WebMediaPlayerImpl
// True if the loaded media has a playable video/audio track.
bool HasVideo() const override;
bool HasAudio() const override;
diff --git a/build/patches/Always-respect-async-dns-flag-regardless-of-SDK-version.patch b/build/patches/Always-respect-async-dns-flag-regardless-of-SDK-version.patch
index 6a814874..a96916a6 100644
--- a/build/patches/Always-respect-async-dns-flag-regardless-of-SDK-version.patch
+++ b/build/patches/Always-respect-async-dns-flag-regardless-of-SDK-version.patch
@@ -11,7 +11,7 @@ Do not read experiment value for cronet async DNS configuration
diff --git a/chrome/browser/net/system_network_context_manager.cc b/chrome/browser/net/system_network_context_manager.cc
--- a/chrome/browser/net/system_network_context_manager.cc
+++ b/chrome/browser/net/system_network_context_manager.cc
-@@ -216,7 +216,7 @@ void OnAuthPrefsChanged(PrefService* local_state,
+@@ -219,7 +219,7 @@ void OnAuthPrefsChanged(PrefService* local_state,
// Android this includes checking the Android version in the field trial.
bool ShouldEnableAsyncDns() {
bool feature_can_be_enabled = true;
@@ -23,7 +23,7 @@ diff --git a/chrome/browser/net/system_network_context_manager.cc b/chrome/brows
diff --git a/components/cronet/url_request_context_config.cc b/components/cronet/url_request_context_config.cc
--- a/components/cronet/url_request_context_config.cc
+++ b/components/cronet/url_request_context_config.cc
-@@ -476,7 +476,8 @@ void URLRequestContextConfig::ParseAndSetExperimentalOptions(
+@@ -517,7 +517,8 @@ void URLRequestContextConfig::ParseAndSetExperimentalOptions(
effective_experimental_options->Remove(it.key(), nullptr);
continue;
}
diff --git a/build/patches/AudioBuffer-AnalyserNode-fingerprinting-mitigations-via-IDL.patch b/build/patches/AudioBuffer-AnalyserNode-fingerprinting-mitigations-via-IDL.patch
index 1c80502f..ff604972 100644
--- a/build/patches/AudioBuffer-AnalyserNode-fingerprinting-mitigations-via-IDL.patch
+++ b/build/patches/AudioBuffer-AnalyserNode-fingerprinting-mitigations-via-IDL.patch
@@ -43,7 +43,7 @@ diff --git a/third_party/blink/renderer/modules/webaudio/audio_buffer.idl b/thir
diff --git a/third_party/blink/renderer/modules/webaudio/audio_context.cc b/third_party/blink/renderer/modules/webaudio/audio_context.cc
--- a/third_party/blink/renderer/modules/webaudio/audio_context.cc
+++ b/third_party/blink/renderer/modules/webaudio/audio_context.cc
-@@ -320,6 +320,7 @@ void AudioContext::StopRendering() {
+@@ -330,6 +330,7 @@ void AudioContext::StopRendering() {
double AudioContext::baseLatency() const {
DCHECK(IsMainThread());
DCHECK(destination());
diff --git a/build/patches/Battery-API-return-nothing.patch b/build/patches/Battery-API-return-nothing.patch
index b670c7d3..a9cb464e 100644
--- a/build/patches/Battery-API-return-nothing.patch
+++ b/build/patches/Battery-API-return-nothing.patch
@@ -49,13 +49,13 @@ diff --git a/third_party/blink/renderer/modules/battery/battery_manager.cc b/thi
- return;
-
- if (battery_status_.Charging() != old_status.Charging())
-- DispatchEvent(*Event::Create(EventTypeNames::chargingchange));
+- DispatchEvent(*Event::Create(event_type_names::kChargingchange));
- if (battery_status_.charging_time() != old_status.charging_time())
-- DispatchEvent(*Event::Create(EventTypeNames::chargingtimechange));
+- DispatchEvent(*Event::Create(event_type_names::kChargingtimechange));
- if (battery_status_.discharging_time() != old_status.discharging_time())
-- DispatchEvent(*Event::Create(EventTypeNames::dischargingtimechange));
+- DispatchEvent(*Event::Create(event_type_names::kDischargingtimechange));
- if (battery_status_.Level() != old_status.Level())
-- DispatchEvent(*Event::Create(EventTypeNames::levelchange));
+- DispatchEvent(*Event::Create(event_type_names::kLevelchange));
}
void BatteryManager::RegisterWithDispatcher() {
diff --git a/build/patches/Bromite-adblock-engine.patch b/build/patches/Bromite-adblock-engine.patch
index 0a5a8a33..06dd4b33 100644
--- a/build/patches/Bromite-adblock-engine.patch
+++ b/build/patches/Bromite-adblock-engine.patch
@@ -73,7 +73,7 @@ diff --git a/chrome/android/java/res/menu/main_menu.xml b/chrome/android/java/re
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ChromeActivity.java b/chrome/android/java/src/org/chromium/chrome/browser/ChromeActivity.java
--- a/chrome/android/java/src/org/chromium/chrome/browser/ChromeActivity.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/ChromeActivity.java
-@@ -2205,6 +2205,14 @@ public abstract class ChromeActivity
+@@ -2206,6 +2206,14 @@ public abstract class ChromeActivity
RecordUserAction.record("MobileMenuRequestEnableJavascript");
} else if (id == R.id.reader_mode_prefs_id) {
DomDistillerUIUtils.openSettings(currentTab.getWebContents());
@@ -91,7 +91,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ChromeActivity.
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java b/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java
--- a/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java
-@@ -1676,6 +1676,14 @@ public class ChromeTabbedActivity
+@@ -1667,6 +1667,14 @@ public class ChromeTabbedActivity
reportNewTabShortcutUsed(true);
getTabCreator(true).launchNTP();
}
@@ -109,7 +109,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedAct
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/appmenu/AppMenuPropertiesDelegate.java b/chrome/android/java/src/org/chromium/chrome/browser/appmenu/AppMenuPropertiesDelegate.java
--- a/chrome/android/java/src/org/chromium/chrome/browser/appmenu/AppMenuPropertiesDelegate.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/appmenu/AppMenuPropertiesDelegate.java
-@@ -208,6 +208,8 @@ public class AppMenuPropertiesDelegate {
+@@ -196,6 +196,8 @@ public class AppMenuPropertiesDelegate {
&& !TextUtils.isEmpty(url);
prepareAddToHomescreenMenuItem(menu, currentTab, canShowHomeScreenMenuItem);
@@ -118,7 +118,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/appmenu/AppMenu
updateRequestDesktopSiteMenuItem(menu, currentTab, true /* can show */);
updateEnableJavascriptMenuItem(menu, currentTab);
-@@ -486,6 +488,42 @@ public class AppMenuPropertiesDelegate {
+@@ -488,6 +490,42 @@ public class AppMenuPropertiesDelegate {
}
/**
@@ -176,7 +176,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/Cust
diff --git a/chrome/android/java/strings/android_chrome_strings.grd b/chrome/android/java/strings/android_chrome_strings.grd
--- a/chrome/android/java/strings/android_chrome_strings.grd
+++ b/chrome/android/java/strings/android_chrome_strings.grd
-@@ -2997,6 +2997,17 @@ To change this setting, <resetlink>reset sync<resetlink>reset sync
Turn on Request desktop site
@@ -205,7 +205,7 @@ diff --git a/chrome/browser/net/chrome_network_delegate.cc b/chrome/browser/net/
#include "chrome/browser/content_settings/tab_specific_content_settings.h"
#include "chrome/browser/custom_handlers/protocol_handler_registry.h"
#include "chrome/browser/net/chrome_extensions_network_delegate.h"
-@@ -60,6 +61,7 @@
+@@ -59,6 +60,7 @@
#if defined(OS_ANDROID)
#include "base/android/path_utils.h"
#include "chrome/browser/io_thread.h"
@@ -213,7 +213,7 @@ diff --git a/chrome/browser/net/chrome_network_delegate.cc b/chrome/browser/net/
#endif
#if defined(OS_CHROMEOS)
-@@ -194,16 +196,76 @@ void ChromeNetworkDelegate::set_cookie_settings(
+@@ -193,16 +195,76 @@ void ChromeNetworkDelegate::set_cookie_settings(
cookie_settings_ = cookie_settings;
}
@@ -304,7 +304,7 @@ diff --git a/chrome/browser/subresource_filter/subresource_filter_content_settin
diff --git a/net/BUILD.gn b/net/BUILD.gn
--- a/net/BUILD.gn
+++ b/net/BUILD.gn
-@@ -1731,6 +1731,13 @@ component("net") {
+@@ -1758,6 +1758,13 @@ component("net") {
"url_request/websocket_handshake_userdata_key.h",
]
diff --git a/build/patches/Canvas-fingerprinting-mitigations-for-image-data-and-webGL.patch b/build/patches/Canvas-fingerprinting-mitigations-for-image-data-and-webGL.patch
index 027af16d..ed84444c 100644
--- a/build/patches/Canvas-fingerprinting-mitigations-for-image-data-and-webGL.patch
+++ b/build/patches/Canvas-fingerprinting-mitigations-for-image-data-and-webGL.patch
@@ -30,7 +30,7 @@ diff --git a/third_party/blink/renderer/modules/canvas/canvas2d/canvas_rendering
#include "third_party/blink/public/platform/platform.h"
#include "third_party/blink/public/platform/task_type.h"
#include "third_party/blink/public/platform/web_scroll_into_view_params.h"
-@@ -788,7 +786,7 @@ TextMetrics* CanvasRenderingContext2D::measureText(const String& text) {
+@@ -789,7 +787,7 @@ TextMetrics* CanvasRenderingContext2D::measureText(const String& text) {
GetState().GetTextAlign(), text);
// scale text metrics by 3/1000000th
@@ -46,7 +46,7 @@ diff --git a/third_party/blink/renderer/modules/webgl/webgl_debug_renderer_info.
WebGLDebugRendererInfo* WebGLDebugRendererInfo::Create(
WebGLRenderingContextBase* context) {
-- return new WebGLDebugRendererInfo(context);
+- return MakeGarbageCollected(context);
+ return nullptr;
}
@@ -59,7 +59,7 @@ diff --git a/third_party/blink/renderer/modules/webgl/webgl_debug_renderer_info.
diff --git a/third_party/blink/renderer/platform/BUILD.gn b/third_party/blink/renderer/platform/BUILD.gn
--- a/third_party/blink/renderer/platform/BUILD.gn
+++ b/third_party/blink/renderer/platform/BUILD.gn
-@@ -1432,7 +1432,9 @@ jumbo_component("platform") {
+@@ -1429,7 +1429,9 @@ jumbo_component("platform") {
"//third_party/blink/renderer:non_test_config",
]
@@ -108,7 +108,7 @@ diff --git a/third_party/blink/renderer/platform/graphics/static_bitmap_image.cc
#include "third_party/skia/include/core/SkCanvas.h"
#include "third_party/skia/include/core/SkImage.h"
#include "third_party/skia/include/core/SkPaint.h"
-+#include "third_party/skia/src/core/SkColorData.h"
++#include "third_party/skia/include/private/SkColorData.h"
#include "third_party/skia/include/core/SkSurface.h"
#include "third_party/skia/include/gpu/GrContext.h"
diff --git a/build/patches/Disable-NTP-remote-suggestions-by-default.patch b/build/patches/Disable-NTP-remote-suggestions-by-default.patch
index 95cb3ce2..05dad2ca 100644
--- a/build/patches/Disable-NTP-remote-suggestions-by-default.patch
+++ b/build/patches/Disable-NTP-remote-suggestions-by-default.patch
@@ -9,7 +9,7 @@ Subject: Disable NTP remote suggestions by default
diff --git a/components/ntp_snippets/features.cc b/components/ntp_snippets/features.cc
--- a/components/ntp_snippets/features.cc
+++ b/components/ntp_snippets/features.cc
-@@ -35,13 +35,13 @@ const base::Feature* const kAllFeatures[] = {
+@@ -34,13 +34,13 @@ const base::Feature* const kAllFeatures[] = {
&kRemoteSuggestionsBackendFeature};
const base::Feature kArticleSuggestionsFeature{
@@ -24,8 +24,8 @@ diff --git a/components/ntp_snippets/features.cc b/components/ntp_snippets/featu
- base::FEATURE_ENABLED_BY_DEFAULT};
+ base::FEATURE_DISABLED_BY_DEFAULT};
- const base::Feature kForeignSessionsSuggestionsFeature{
- "NTPForeignSessionsSuggestions", base::FEATURE_DISABLED_BY_DEFAULT};
+ const base::Feature kBreakingNewsPushFeature{"BreakingNewsPush",
+ base::FEATURE_DISABLED_BY_DEFAULT};
--
2.11.0
diff --git a/build/patches/Disable-Omaha-update-checks.patch b/build/patches/Disable-Omaha-update-checks.patch
index eda590de..4b465c08 100644
--- a/build/patches/Disable-Omaha-update-checks.patch
+++ b/build/patches/Disable-Omaha-update-checks.patch
@@ -36,8 +36,8 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/omaha/VersionNu
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
-@@ -334,7 +334,7 @@ const base::Feature kInflateToolbarOnBackgroundThread{
- "BackgroundToolbarInflation", base::FEATURE_DISABLED_BY_DEFAULT};
+@@ -350,7 +350,7 @@ const base::Feature kIntentBlockExternalFormRedirectsNoGesture{
+ base::FEATURE_ENABLED_BY_DEFAULT};
const base::Feature kJellyBeanSupported{"JellyBeanSupported",
- base::FEATURE_DISABLED_BY_DEFAULT};
diff --git a/build/patches/Disable-data-saver.patch b/build/patches/Disable-data-saver.patch
index 7970ad0e..9a6e8841 100644
--- a/build/patches/Disable-data-saver.patch
+++ b/build/patches/Disable-data-saver.patch
@@ -22,7 +22,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/firstrun/FirstR
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/net/spdyproxy/DataReductionProxySettings.java b/chrome/android/java/src/org/chromium/chrome/browser/net/spdyproxy/DataReductionProxySettings.java
--- a/chrome/android/java/src/org/chromium/chrome/browser/net/spdyproxy/DataReductionProxySettings.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/net/spdyproxy/DataReductionProxySettings.java
-@@ -131,6 +131,7 @@ public class DataReductionProxySettings {
+@@ -126,6 +126,7 @@ public class DataReductionProxySettings {
// DataReductionProxySettings is a singleton that lives forever and there's no clean
// shutdown of Chrome on Android
mNativeDataReductionProxySettings = nativeInit();
@@ -30,7 +30,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/net/spdyproxy/D
}
/** Returns true if the SPDY proxy promo is allowed to be shown. */
-@@ -153,6 +154,7 @@ public class DataReductionProxySettings {
+@@ -148,6 +149,7 @@ public class DataReductionProxySettings {
* data reduction statistics if this is the first time the SPDY proxy has been enabled.
*/
public void setDataReductionProxyEnabled(Context context, boolean enabled) {
diff --git a/build/patches/Disable-fetching-of-all-field-trials.patch b/build/patches/Disable-fetching-of-all-field-trials.patch
index 7421fcce..a5cf7c0b 100644
--- a/build/patches/Disable-fetching-of-all-field-trials.patch
+++ b/build/patches/Disable-fetching-of-all-field-trials.patch
@@ -46,7 +46,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ChromeFeatureLi
diff --git a/components/variations/service/variations_service.cc b/components/variations/service/variations_service.cc
--- a/components/variations/service/variations_service.cc
+++ b/components/variations/service/variations_service.cc
-@@ -232,17 +232,7 @@ bool GetInstanceManipulations(const net::HttpResponseHeaders* headers,
+@@ -239,17 +239,7 @@ bool GetInstanceManipulations(const net::HttpResponseHeaders* headers,
// Variations seed fetching is only enabled in official Chrome builds, if a URL
// is specified on the command line, and for testing.
bool IsFetchingEnabled() {
diff --git a/build/patches/Disable-hyperlink-auditing-by-default.patch b/build/patches/Disable-hyperlink-auditing-by-default.patch
index a93b9950..8e1f0ca5 100644
--- a/build/patches/Disable-hyperlink-auditing-by-default.patch
+++ b/build/patches/Disable-hyperlink-auditing-by-default.patch
@@ -9,8 +9,8 @@ Subject: Disable hyperlink auditing 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
-@@ -1505,7 +1505,7 @@ const FeatureEntry kFeatureEntries[] = {
- SINGLE_VALUE_TYPE(switches::kDisablePushStateThrottle)},
+@@ -1418,7 +1418,7 @@ const FeatureEntry kFeatureEntries[] = {
+ SINGLE_VALUE_TYPE(switches::kDisableIpcFloodingProtection)},
{"disable-hyperlink-auditing", flag_descriptions::kHyperlinkAuditingName,
flag_descriptions::kHyperlinkAuditingDescription, kOsAll,
- SINGLE_DISABLE_VALUE_TYPE(switches::kNoPings)},
diff --git a/build/patches/Disable-metrics-on-all-I-O-threads.patch b/build/patches/Disable-metrics-on-all-I-O-threads.patch
index a34b01a4..a8889a21 100644
--- a/build/patches/Disable-metrics-on-all-I-O-threads.patch
+++ b/build/patches/Disable-metrics-on-all-I-O-threads.patch
@@ -3,21 +3,34 @@ Date: Wed, 25 Apr 2018 10:23:51 +0200
Subject: Disable metrics on all I/O threads
---
- chrome/browser/profiles/profile_io_data.cc | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
+ chrome/browser/browser_process_impl.cc | 2 +-
+ chrome/browser/profiles/profile_io_data.cc | 2 --
+ 2 files changed, 1 insertion(+), 3 deletions(-)
+diff --git a/chrome/browser/browser_process_impl.cc b/chrome/browser/browser_process_impl.cc
+--- a/chrome/browser/browser_process_impl.cc
++++ b/chrome/browser/browser_process_impl.cc
+@@ -947,7 +947,7 @@ void BrowserProcessImpl::RegisterPrefs(PrefRegistrySimple* registry) {
+ #endif // defined(OS_CHROMEOS)
+
+ registry->RegisterBooleanPref(metrics::prefs::kMetricsReportingEnabled,
+- GoogleUpdateSettings::GetCollectStatsConsent());
++ false);
+
+ #if defined(OS_ANDROID)
+ registry->RegisterBooleanPref(
diff --git a/chrome/browser/profiles/profile_io_data.cc b/chrome/browser/profiles/profile_io_data.cc
--- a/chrome/browser/profiles/profile_io_data.cc
+++ b/chrome/browser/profiles/profile_io_data.cc
-@@ -873,7 +873,7 @@ void ProfileIOData::InitializeMetricsEnabledStateOnUIThread() {
-
- bool ProfileIOData::GetMetricsEnabledStateOnIOThread() const {
- DCHECK_CURRENTLY_ON(BrowserThread::IO);
-- return enable_metrics_.GetValue();
-+ return false;
- }
-
- chrome_browser_net::Predictor* ProfileIOData::GetPredictor() {
+@@ -57,8 +57,6 @@
+ #include "components/cookie_config/cookie_store_util.h"
+ #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_io_data.h"
+ #include "components/dom_distiller/core/url_constants.h"
+-#include "components/metrics/metrics_pref_names.h"
+-#include "components/metrics/metrics_service.h"
+ #include "components/net_log/chrome_net_log.h"
+ #include "components/policy/core/common/cloud/policy_header_service.h"
+ #include "components/policy/core/common/cloud/user_cloud_policy_manager.h"
--
2.11.0
diff --git a/build/patches/Disables-omission-of-URL-elements-in-Omnibox.patch b/build/patches/Disable-omission-of-URL-elements-in-Omnibox.patch
similarity index 61%
rename from build/patches/Disables-omission-of-URL-elements-in-Omnibox.patch
rename to build/patches/Disable-omission-of-URL-elements-in-Omnibox.patch
index 3447ae38..c4ec969c 100644
--- a/build/patches/Disables-omission-of-URL-elements-in-Omnibox.patch
+++ b/build/patches/Disable-omission-of-URL-elements-in-Omnibox.patch
@@ -1,16 +1,17 @@
From: csagan5 <32685696+csagan5@users.noreply.github.com>
Date: Wed, 11 Oct 2017 23:24:58 +0200
-Subject: Disables omission of URL elements in Omnibox
+Subject: Disable omission of URL elements in Omnibox
-Disable all omissions (already shadowed by first flag)
+Disable all omissions because they are used throughout the code without
+a corresponding user option to individually disable their usage.
---
- components/url_formatter/url_formatter.cc | 12 ++++++------
- 1 file changed, 6 insertions(+), 6 deletions(-)
+ components/url_formatter/url_formatter.cc | 14 +++++++-------
+ 1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/components/url_formatter/url_formatter.cc b/components/url_formatter/url_formatter.cc
--- a/components/url_formatter/url_formatter.cc
+++ b/components/url_formatter/url_formatter.cc
-@@ -410,12 +410,12 @@ IDNConversionStatus IDNToUnicodeOneComponent(const base::char16* comp,
+@@ -410,13 +410,13 @@ IDNConversionStatus IDNToUnicodeOneComponent(const base::char16* comp,
} // namespace
const FormatUrlType kFormatUrlOmitNothing = 0;
@@ -18,17 +19,19 @@ diff --git a/components/url_formatter/url_formatter.cc b/components/url_formatte
-const FormatUrlType kFormatUrlOmitHTTP = 1 << 1;
-const FormatUrlType kFormatUrlOmitTrailingSlashOnBareHostname = 1 << 2;
-const FormatUrlType kFormatUrlOmitHTTPS = 1 << 3;
--const FormatUrlType kFormatUrlExperimentalElideAfterHost = 1 << 4;
-const FormatUrlType kFormatUrlOmitTrivialSubdomains = 1 << 5;
+-const FormatUrlType kFormatUrlTrimAfterHost = 1 << 6;
+-const FormatUrlType kFormatUrlOmitFileScheme = 1 << 7;
+const FormatUrlType kFormatUrlOmitUsernamePassword = 0 << 0;
+const FormatUrlType kFormatUrlOmitHTTP = 0 << 1;
+const FormatUrlType kFormatUrlOmitTrailingSlashOnBareHostname = 0 << 2;
+const FormatUrlType kFormatUrlOmitHTTPS = 0 << 3;
-+const FormatUrlType kFormatUrlExperimentalElideAfterHost = 0 << 4;
+const FormatUrlType kFormatUrlOmitTrivialSubdomains = 0 << 5;
- const FormatUrlType kFormatUrlTrimAfterHost = 1 << 6;
++const FormatUrlType kFormatUrlTrimAfterHost = 0 << 6;
++const FormatUrlType kFormatUrlOmitFileScheme = 0 << 7;
const FormatUrlType kFormatUrlOmitDefaults =
+ kFormatUrlOmitUsernamePassword | kFormatUrlOmitHTTP |
--
2.11.0
diff --git a/build/patches/Disable-plugins-enumeration.patch b/build/patches/Disable-plugins-enumeration.patch
index 9baade68..a14390ba 100644
--- a/build/patches/Disable-plugins-enumeration.patch
+++ b/build/patches/Disable-plugins-enumeration.patch
@@ -9,7 +9,7 @@ Subject: Disable plugins enumeration
diff --git a/third_party/blink/renderer/core/frame/local_frame.cc b/third_party/blink/renderer/core/frame/local_frame.cc
--- a/third_party/blink/renderer/core/frame/local_frame.cc
+++ b/third_party/blink/renderer/core/frame/local_frame.cc
-@@ -1294,10 +1294,8 @@ FrameResourceCoordinator* LocalFrame::GetFrameResourceCoordinator() {
+@@ -1309,10 +1309,8 @@ FrameResourceCoordinator* LocalFrame::GetFrameResourceCoordinator() {
}
PluginData* LocalFrame::GetPluginData() const {
diff --git a/build/patches/Disable-promos-displayed-in-bookmarks-manager.patch b/build/patches/Disable-promos-displayed-in-bookmarks-manager.patch
index fb6cb92d..ee5cce7e 100644
--- a/build/patches/Disable-promos-displayed-in-bookmarks-manager.patch
+++ b/build/patches/Disable-promos-displayed-in-bookmarks-manager.patch
@@ -156,7 +156,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/signin/SigninPr
diff --git a/chrome/android/java_sources.gni b/chrome/android/java_sources.gni
--- a/chrome/android/java_sources.gni
+++ b/chrome/android/java_sources.gni
-@@ -140,7 +140,6 @@ chrome_java_sources = [
+@@ -163,7 +163,6 @@ chrome_java_sources = [
"java/src/org/chromium/chrome/browser/bookmarks/BookmarkManager.java",
"java/src/org/chromium/chrome/browser/bookmarks/BookmarkModel.java",
"java/src/org/chromium/chrome/browser/bookmarks/BookmarkPage.java",
diff --git a/build/patches/Disable-signin-and-data-saver-preferences.patch b/build/patches/Disable-signin-and-data-saver-preferences.patch
index 8ecfbc4e..6eb34bac 100644
--- a/build/patches/Disable-signin-and-data-saver-preferences.patch
+++ b/build/patches/Disable-signin-and-data-saver-preferences.patch
@@ -4,10 +4,10 @@ Subject: Disable signin and data saver preferences
Never show the data saver promo snackbar
---
- chrome/android/java/res/xml/main_preferences.xml | 9 -----
+ chrome/android/java/res/xml/main_preferences.xml | 9 ------
.../chromium/chrome/browser/ChromeActivity.java | 6 ++--
- .../browser/preferences/MainPreferences.java | 39 +++++++++++-----------
- 3 files changed, 24 insertions(+), 30 deletions(-)
+ .../browser/preferences/MainPreferences.java | 37 +++++++++++-----------
+ 3 files changed, 22 insertions(+), 30 deletions(-)
diff --git a/chrome/android/java/res/xml/main_preferences.xml b/chrome/android/java/res/xml/main_preferences.xml
--- a/chrome/android/java/res/xml/main_preferences.xml
@@ -23,22 +23,22 @@ diff --git a/chrome/android/java/res/xml/main_preferences.xml b/chrome/android/j
-
+@@ -267,7 +267,7 @@ public abstract class ChromeActivity
+ private EphemeralTabPanel mEphemeralTabPanel;
protected ReaderModeManager mReaderModeManager;
private SnackbarManager mSnackbarManager;
- private ModalDialogManager mModalDialogManager;
- private DataReductionPromoSnackbarController mDataReductionPromoSnackbarController;
+ //private DataReductionPromoSnackbarController mDataReductionPromoSnackbarController;
private AppMenuPropertiesDelegate mAppMenuPropertiesDelegate;
private AppMenuHandler mAppMenuHandler;
private ToolbarManager mToolbarManager;
-@@ -666,6 +666,7 @@ public abstract class ChromeActivity
+@@ -678,6 +678,7 @@ public abstract class ChromeActivity
mTabModelSelectorTabObserver = new TabModelSelectorTabObserver(mTabModelSelector) {
@Override
public void didFirstVisuallyNonEmptyPaint(Tab tab) {
@@ -64,7 +64,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ChromeActivity.
// Only alert about data savings once the first paint has happened. It
// doesn't make sense to show a snackbar about savings when nothing has been
// displayed yet.
-@@ -679,6 +680,7 @@ public abstract class ChromeActivity
+@@ -691,6 +692,7 @@ public abstract class ChromeActivity
DataReductionProxySettings.getInstance()
.getTotalHttpContentLengthSaved());
}
@@ -75,19 +75,18 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ChromeActivity.
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/preferences/MainPreferences.java b/chrome/android/java/src/org/chromium/chrome/browser/preferences/MainPreferences.java
--- a/chrome/android/java/src/org/chromium/chrome/browser/preferences/MainPreferences.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/preferences/MainPreferences.java
-@@ -17,9 +17,9 @@ import org.chromium.base.VisibleForTesting;
- import org.chromium.chrome.R;
+@@ -18,10 +18,8 @@ import org.chromium.chrome.R;
+ import org.chromium.chrome.browser.AppHooks;
import org.chromium.chrome.browser.ChromeFeatureList;
import org.chromium.chrome.browser.contextual_suggestions.ContextualSuggestionsEnabledStateUtils;
-import org.chromium.chrome.browser.net.spdyproxy.DataReductionProxySettings;
-+//import org.chromium.chrome.browser.net.spdyproxy.DataReductionProxySettings;
import org.chromium.chrome.browser.partnercustomizations.HomepageManager;
+ import org.chromium.chrome.browser.password_manager.ManagePasswordsReferrer;
-import org.chromium.chrome.browser.preferences.datareduction.DataReductionPreferences;
-+//import org.chromium.chrome.browser.preferences.datareduction.DataReductionPreferences;
import org.chromium.chrome.browser.search_engines.TemplateUrl;
import org.chromium.chrome.browser.search_engines.TemplateUrlService;
import org.chromium.chrome.browser.signin.SigninManager;
-@@ -34,13 +34,11 @@ import java.util.Map;
+@@ -36,13 +34,11 @@ import java.util.Map;
public class MainPreferences extends PreferenceFragment
implements SigninManager.SignInStateObserver, TemplateUrlService.LoadListener {
public static final String PREF_ACCOUNT_SECTION = "account_section";
@@ -101,7 +100,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/preferences/Mai
public static final String PREF_NOTIFICATIONS = "notifications";
public static final String PREF_LANGUAGES = "languages";
public static final String PREF_DOWNLOADS = "downloads";
-@@ -52,7 +50,6 @@ public class MainPreferences extends PreferenceFragment
+@@ -56,7 +52,6 @@ public class MainPreferences extends PreferenceFragment
private final ManagedPreferenceDelegate mManagedPreferenceDelegate;
private final Map mAllPreferences = new HashMap<>();
@@ -109,7 +108,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/preferences/Mai
public MainPreferences() {
setHasOptionsMenu(true);
-@@ -68,25 +65,29 @@ public class MainPreferences extends PreferenceFragment
+@@ -72,25 +67,29 @@ public class MainPreferences extends PreferenceFragment
@Override
public void onDestroy() {
super.onDestroy();
@@ -140,7 +139,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/preferences/Mai
}
@Override
-@@ -99,16 +100,16 @@ public class MainPreferences extends PreferenceFragment
+@@ -103,16 +102,16 @@ public class MainPreferences extends PreferenceFragment
PreferenceUtils.addPreferencesFromResource(this, R.xml.main_preferences);
cachePreferences();
@@ -158,9 +157,9 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/preferences/Mai
- setManagedPreferenceDelegateForPreference(PREF_DATA_REDUCTION);
+ //setManagedPreferenceDelegateForPreference(PREF_DATA_REDUCTION);
- if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
- // If we are on Android O+ the Notifications preference should lead to the Android
-@@ -164,7 +165,7 @@ public class MainPreferences extends PreferenceFragment
+ updatePasswordsPreference();
+
+@@ -180,7 +179,7 @@ public class MainPreferences extends PreferenceFragment
Preference preference = getPreferenceScreen().getPreference(index);
mAllPreferences.put(preference.getKey(), preference);
}
@@ -169,7 +168,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/preferences/Mai
}
private void setManagedPreferenceDelegateForPreference(String key) {
-@@ -173,12 +174,6 @@ public class MainPreferences extends PreferenceFragment
+@@ -189,12 +188,6 @@ public class MainPreferences extends PreferenceFragment
}
private void updatePreferences() {
@@ -182,7 +181,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/preferences/Mai
updateSearchEnginePreference();
if (HomepageManager.shouldShowHomepageSetting()) {
-@@ -201,9 +196,11 @@ public class MainPreferences extends PreferenceFragment
+@@ -217,9 +210,11 @@ public class MainPreferences extends PreferenceFragment
removePreferenceIfPresent(PREF_CONTEXTUAL_SUGGESTIONS);
}
@@ -194,7 +193,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/preferences/Mai
}
private Preference addPreferenceIfAbsent(String key) {
-@@ -254,11 +251,11 @@ public class MainPreferences extends PreferenceFragment
+@@ -279,11 +274,11 @@ public class MainPreferences extends PreferenceFragment
private void onSignInPreferenceStateChanged() {
// Remove "Account" section header if the personalized sign-in promo is shown.
@@ -209,7 +208,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/preferences/Mai
}
// TemplateUrlService.LoadListener implementation.
-@@ -280,9 +277,11 @@ public class MainPreferences extends PreferenceFragment
+@@ -305,9 +300,11 @@ public class MainPreferences extends PreferenceFragment
if (PREF_SAVED_PASSWORDS.equals(preference.getKey())) {
return PrefServiceBridge.getInstance().isRememberPasswordsManaged();
}
@@ -221,7 +220,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/preferences/Mai
if (PREF_SEARCH_ENGINE.equals(preference.getKey())) {
return TemplateUrlService.getInstance().isDefaultSearchManaged();
}
-@@ -296,11 +295,13 @@ public class MainPreferences extends PreferenceFragment
+@@ -321,11 +318,13 @@ public class MainPreferences extends PreferenceFragment
return prefs.isRememberPasswordsManaged()
&& !prefs.isRememberPasswordsEnabled();
}
diff --git a/build/patches/Disable-signin-data-reduction-promos.patch b/build/patches/Disable-signin-data-reduction-promos.patch
index 111b9062..7b7e9b64 100644
--- a/build/patches/Disable-signin-data-reduction-promos.patch
+++ b/build/patches/Disable-signin-data-reduction-promos.patch
@@ -9,7 +9,7 @@ Subject: Disable signin/data reduction promos
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java b/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java
--- a/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java
-@@ -603,7 +603,7 @@ public class ChromeTabbedActivity
+@@ -604,7 +604,7 @@ public class ChromeTabbedActivity
// TODO(tedchoc): Unify promo dialog logic as the search engine promo dialog checks
// might not have completed at this point and we could show multiple
// promos.
@@ -18,7 +18,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedAct
// Promo dialogs in multiwindow mode are broken on some devices: http://crbug.com/354696
boolean isLegacyMultiWindow = MultiWindowUtils.getInstance().isLegacyMultiWindow(this);
if (!isShowingPromo && !mIntentWithEffect && FirstRunStatus.getFirstRunFlowComplete()
-@@ -621,7 +621,7 @@ public class ChromeTabbedActivity
+@@ -622,7 +622,7 @@ public class ChromeTabbedActivity
ChromePreferenceManager.PROMOS_SKIPPED_ON_FIRST_START, true);
}
diff --git a/build/patches/Do-not-grant-notifications-to-default-search-engine.patch b/build/patches/Do-not-grant-notifications-to-default-search-engine.patch
index ec09a3b7..38353ef8 100644
--- a/build/patches/Do-not-grant-notifications-to-default-search-engine.patch
+++ b/build/patches/Do-not-grant-notifications-to-default-search-engine.patch
@@ -9,7 +9,7 @@ Subject: Do not grant notifications to default search engine
diff --git a/chrome/common/chrome_features.cc b/chrome/common/chrome_features.cc
--- a/chrome/common/chrome_features.cc
+++ b/chrome/common/chrome_features.cc
-@@ -296,7 +296,7 @@ const base::Feature kGeoLanguage{"GeoLanguage",
+@@ -291,7 +291,7 @@ const base::Feature kGeoLanguage{"GeoLanguage",
#if defined(OS_ANDROID)
const base::Feature kGrantNotificationsToDSE{"GrantNotificationsToDSE",
@@ -17,7 +17,7 @@ diff --git a/chrome/common/chrome_features.cc b/chrome/common/chrome_features.cc
+ base::FEATURE_DISABLED_BY_DEFAULT};
#endif // defined(OS_ANDROID)
- #if defined (OS_CHROMEOS)
+ #if defined(OS_CHROMEOS)
--
2.11.0
diff --git a/build/patches/Do-not-ignore-download-location-prompt-setting.patch b/build/patches/Do-not-ignore-download-location-prompt-setting.patch
new file mode 100644
index 00000000..40133691
--- /dev/null
+++ b/build/patches/Do-not-ignore-download-location-prompt-setting.patch
@@ -0,0 +1,110 @@
+From: csagan5 <32685696+csagan5@users.noreply.github.com>
+Date: Sun, 20 Jan 2019 06:20:10 +0100
+Subject: Do not ignore download location prompt setting
+
+Upstream has decided that it works as intended (https://bugs.chromium.org/p/chromium/issues/detail?id=916606)
+but users would like to decide where to save a file even when there is no SD card available;
+do not skip the prompt in such cases.
+---
+ .../download/DownloadLocationDialogBridge.java | 71 +++++++---------------
+ 1 file changed, 21 insertions(+), 50 deletions(-)
+
+diff --git a/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadLocationDialogBridge.java b/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadLocationDialogBridge.java
+--- a/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadLocationDialogBridge.java
++++ b/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadLocationDialogBridge.java
+@@ -32,9 +32,6 @@ public class DownloadLocationDialogBridge implements ModalDialogView.Controller
+ private PropertyModel mDialogModel;
+ private DownloadLocationCustomView mCustomView;
+ private ModalDialogManager mModalDialogManager;
+- private long mTotalBytes;
+- private @DownloadLocationDialogType int mDialogType;
+- private String mSuggestedPath;
+ private Context mContext;
+
+ private DownloadLocationDialogBridge(long nativeDownloadLocationDialogBridge) {
+@@ -67,12 +64,28 @@ public class DownloadLocationDialogBridge implements ModalDialogView.Controller
+
+ mModalDialogManager = activity.getModalDialogManager();
+ mContext = activity;
+- mTotalBytes = totalBytes;
+- mDialogType = dialogType;
+- mSuggestedPath = suggestedPath;
+
+- DownloadDirectoryProvider.getInstance().getAllDirectoriesOptions(
+- (ArrayList dirs) -> { onDirectoryOptionsRetrieved(dirs); });
++ // Already showing the dialog.
++ if (mDialogModel != null) return;
++
++ // Actually show the dialog.
++ mCustomView = (DownloadLocationCustomView) LayoutInflater.from(mContext).inflate(
++ R.layout.download_location_dialog, null);
++ mCustomView.initialize(dialogType, new File(suggestedPath));
++
++ Resources resources = mContext.getResources();
++ mDialogModel =
++ new PropertyModel.Builder(ModalDialogProperties.ALL_KEYS)
++ .with(ModalDialogProperties.CONTROLLER, this)
++ .with(ModalDialogProperties.TITLE, getTitle(totalBytes, dialogType))
++ .with(ModalDialogProperties.CUSTOM_VIEW, mCustomView)
++ .with(ModalDialogProperties.POSITIVE_BUTTON_TEXT, resources,
++ R.string.duplicate_download_infobar_download_button)
++ .with(ModalDialogProperties.NEGATIVE_BUTTON_TEXT, resources,
++ R.string.cancel)
++ .build();
++
++ mModalDialogManager.showDialog(mDialogModel, ModalDialogManager.ModalDialogType.APP);
+ }
+
+ @Override
+@@ -105,48 +118,6 @@ public class DownloadLocationDialogBridge implements ModalDialogView.Controller
+ mCustomView = null;
+ }
+
+- /**
+- * Called after retrieved the download directory options.
+- * @param dirs An list of available download directories.
+- */
+- private void onDirectoryOptionsRetrieved(ArrayList dirs) {
+- // If there is only one directory available, don't show the default dialog, and set the
+- // download directory to default. Dialog will still show for other types of dialogs, like
+- // name conflict or disk error.
+- if (dirs.size() == 1 && mDialogType == DownloadLocationDialogType.DEFAULT) {
+- final DirectoryOption dir = dirs.get(0);
+- if (dir.type == DirectoryOption.DownloadLocationDirectoryType.DEFAULT) {
+- assert(!TextUtils.isEmpty(dir.location));
+- PrefServiceBridge.getInstance().setDownloadAndSaveFileDefaultDirectory(
+- dir.location);
+- nativeOnComplete(mNativeDownloadLocationDialogBridge, mSuggestedPath);
+- }
+- return;
+- }
+-
+- // Already showing the dialog.
+- if (mDialogModel != null) return;
+-
+- // Actually show the dialog.
+- mCustomView = (DownloadLocationCustomView) LayoutInflater.from(mContext).inflate(
+- R.layout.download_location_dialog, null);
+- mCustomView.initialize(mDialogType, new File(mSuggestedPath));
+-
+- Resources resources = mContext.getResources();
+- mDialogModel =
+- new PropertyModel.Builder(ModalDialogProperties.ALL_KEYS)
+- .with(ModalDialogProperties.CONTROLLER, this)
+- .with(ModalDialogProperties.TITLE, getTitle(mTotalBytes, mDialogType))
+- .with(ModalDialogProperties.CUSTOM_VIEW, mCustomView)
+- .with(ModalDialogProperties.POSITIVE_BUTTON_TEXT, resources,
+- R.string.duplicate_download_infobar_download_button)
+- .with(ModalDialogProperties.NEGATIVE_BUTTON_TEXT, resources,
+- R.string.cancel)
+- .build();
+-
+- mModalDialogManager.showDialog(mDialogModel, ModalDialogManager.ModalDialogType.APP);
+- }
+-
+ private String getTitle(long totalBytes, @DownloadLocationDialogType int dialogType) {
+ switch (dialogType) {
+ case DownloadLocationDialogType.LOCATION_FULL:
+--
+2.11.0
+
diff --git a/build/patches/Do-not-store-passwords-by-default.patch b/build/patches/Do-not-store-passwords-by-default.patch
index 35fa0cab..8b3c4fa5 100644
--- a/build/patches/Do-not-store-passwords-by-default.patch
+++ b/build/patches/Do-not-store-passwords-by-default.patch
@@ -9,7 +9,7 @@ Subject: Do not store passwords by default
diff --git a/components/password_manager/core/browser/password_manager.cc b/components/password_manager/core/browser/password_manager.cc
--- a/components/password_manager/core/browser/password_manager.cc
+++ b/components/password_manager/core/browser/password_manager.cc
-@@ -363,10 +363,10 @@ void RecordParsingOnSavingDifference(
+@@ -321,10 +321,10 @@ void RecordParsingOnSavingDifference(
void PasswordManager::RegisterProfilePrefs(
user_prefs::PrefRegistrySyncable* registry) {
registry->RegisterBooleanPref(
diff --git a/build/patches/Enable-TLS-1.3-final-by-default.patch b/build/patches/Enable-TLS-1.3-final-by-default.patch
index 92350a30..365aa3c1 100644
--- a/build/patches/Enable-TLS-1.3-final-by-default.patch
+++ b/build/patches/Enable-TLS-1.3-final-by-default.patch
@@ -9,7 +9,7 @@ Subject: Enable TLS 1.3 (final) by default
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
-@@ -180,7 +180,7 @@ SSLConfigServiceManagerPref::SSLConfigServiceManagerPref(
+@@ -179,7 +179,7 @@ SSLConfigServiceManagerPref::SSLConfigServiceManagerPref(
} else if (tls13_variant == "draft23") {
tls13_value = switches::kTLS13VariantDraft23;
version_value = switches::kSSLVersionTLSv13;
diff --git a/build/patches/Enable-history-requirement-of-user-gesture.patch b/build/patches/Enable-history-requirement-of-user-gesture.patch
index 238109f8..25a38b98 100644
--- a/build/patches/Enable-history-requirement-of-user-gesture.patch
+++ b/build/patches/Enable-history-requirement-of-user-gesture.patch
@@ -10,7 +10,7 @@ Set #enable-history-entry-requires-user-gesture to enabled 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
-@@ -1511,7 +1511,7 @@ const FeatureEntry kFeatureEntries[] = {
+@@ -1420,7 +1420,7 @@ const FeatureEntry kFeatureEntries[] = {
{"enable-history-entry-requires-user-gesture",
flag_descriptions::kHistoryRequiresUserGestureName,
flag_descriptions::kHistoryRequiresUserGestureDescription, kOsAll,
diff --git a/build/patches/Fix-crash-when-accessing-page-info-site-settings.patch b/build/patches/Fix-crash-when-accessing-page-info-site-settings.patch
index f0ca7ce6..9c8740d3 100644
--- a/build/patches/Fix-crash-when-accessing-page-info-site-settings.patch
+++ b/build/patches/Fix-crash-when-accessing-page-info-site-settings.patch
@@ -9,9 +9,9 @@ Subject: Fix crash when accessing page info / site settings
diff --git a/chrome/browser/permissions/permission_manager.cc b/chrome/browser/permissions/permission_manager.cc
--- a/chrome/browser/permissions/permission_manager.cc
+++ b/chrome/browser/permissions/permission_manager.cc
-@@ -677,6 +677,9 @@ PermissionResult PermissionManager::GetPermissionStatusHelper(
- GURL canonical_requesting_origin =
- GetCanonicalOrigin(requesting_origin, embedding_origin);
+@@ -689,6 +689,9 @@ PermissionResult PermissionManager::GetPermissionStatusHelper(
+ if (status != CONTENT_SETTING_DEFAULT)
+ return PermissionResult(status, PermissionStatusSource::UNSPECIFIED);
PermissionContextBase* context = GetPermissionContext(permission);
+ if (context == nullptr) {
+ return PermissionResult(CONTENT_SETTING_BLOCK, PermissionStatusSource::UNSPECIFIED);
diff --git a/build/patches/Hide-passwords-manager-link.patch b/build/patches/Hide-passwords-manager-link.patch
index 802bcee7..595c8989 100644
--- a/build/patches/Hide-passwords-manager-link.patch
+++ b/build/patches/Hide-passwords-manager-link.patch
@@ -9,7 +9,7 @@ Subject: Hide passwords manager link
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/preferences/password/SavePasswordsPreferences.java b/chrome/android/java/src/org/chromium/chrome/browser/preferences/password/SavePasswordsPreferences.java
--- a/chrome/android/java/src/org/chromium/chrome/browser/preferences/password/SavePasswordsPreferences.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/preferences/password/SavePasswordsPreferences.java
-@@ -252,7 +252,7 @@ public class SavePasswordsPreferences
+@@ -251,7 +251,7 @@ public class SavePasswordsPreferences
return;
}
@@ -18,7 +18,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/preferences/pas
PreferenceGroup passwordParent;
if (mSearchQuery == null) {
-@@ -327,7 +327,7 @@ public class SavePasswordsPreferences
+@@ -326,7 +326,7 @@ public class SavePasswordsPreferences
return;
}
diff --git a/build/patches/Hide-send-reports-checkbox.patch b/build/patches/Hide-send-reports-checkbox.patch
index 9270b6f1..13d599ec 100644
--- a/build/patches/Hide-send-reports-checkbox.patch
+++ b/build/patches/Hide-send-reports-checkbox.patch
@@ -9,7 +9,7 @@ Subject: Hide send reports checkbox
diff --git a/chrome/android/java/res/layout/fre_tosanduma.xml b/chrome/android/java/res/layout/fre_tosanduma.xml
--- a/chrome/android/java/res/layout/fre_tosanduma.xml
+++ b/chrome/android/java/res/layout/fre_tosanduma.xml
-@@ -71,7 +71,7 @@
+@@ -70,7 +70,7 @@
android:layout_height="wrap_content"
android:lineSpacingMultiplier="1.4"
android:text="@string/fre_send_report_check"
diff --git a/build/patches/Inject-scripts-for-AMP-tracking-ads-and-video-functionality.patch b/build/patches/Inject-scripts-for-AMP-tracking-ads-and-video-functionality.patch
index 4e676935..6d0a6ec2 100644
--- a/build/patches/Inject-scripts-for-AMP-tracking-ads-and-video-functionality.patch
+++ b/build/patches/Inject-scripts-for-AMP-tracking-ads-and-video-functionality.patch
@@ -11,14 +11,16 @@ Send a random key press to circumvent idle status detection
third_party/blink/renderer/core/dom/document.cc | 32 +++++++++++++++++++++-
.../renderer/core/dom/extensions/anti_amp_cure.h | 6 ++++
.../renderer/core/dom/extensions/video_bg_play.h | 6 ++++
- 4 files changed, 45 insertions(+), 1 deletion(-)
+ .../renderer/core/html/html_script_element.cc | 5 ++++
+ .../blink/renderer/core/html/html_script_element.h | 1 +
+ 6 files changed, 51 insertions(+), 1 deletion(-)
create mode 100644 third_party/blink/renderer/core/dom/extensions/anti_amp_cure.h
create mode 100644 third_party/blink/renderer/core/dom/extensions/video_bg_play.h
diff --git a/third_party/blink/renderer/core/dom/BUILD.gn b/third_party/blink/renderer/core/dom/BUILD.gn
--- a/third_party/blink/renderer/core/dom/BUILD.gn
+++ b/third_party/blink/renderer/core/dom/BUILD.gn
-@@ -146,6 +146,8 @@ blink_core_sources("dom") {
+@@ -148,6 +148,8 @@ blink_core_sources("dom") {
"global_event_handlers.h",
"icon_url.cc",
"icon_url.h",
@@ -30,7 +32,7 @@ diff --git a/third_party/blink/renderer/core/dom/BUILD.gn b/third_party/blink/re
diff --git a/third_party/blink/renderer/core/dom/document.cc b/third_party/blink/renderer/core/dom/document.cc
--- a/third_party/blink/renderer/core/dom/document.cc
+++ b/third_party/blink/renderer/core/dom/document.cc
-@@ -233,6 +233,7 @@
+@@ -234,6 +234,7 @@
#include "third_party/blink/renderer/core/page/scrolling/scrolling_coordinator.h"
#include "third_party/blink/renderer/core/page/scrolling/snap_coordinator.h"
#include "third_party/blink/renderer/core/page/scrolling/top_document_root_scroller_controller.h"
@@ -38,7 +40,7 @@ diff --git a/third_party/blink/renderer/core/dom/document.cc b/third_party/blink
#include "third_party/blink/renderer/core/paint/compositing/paint_layer_compositor.h"
#include "third_party/blink/renderer/core/paint/first_meaningful_paint_detector.h"
#include "third_party/blink/renderer/core/paint/paint_layer.h"
-@@ -291,6 +292,8 @@
+@@ -293,6 +294,8 @@
#include "third_party/blink/renderer/platform/wtf/text/text_encoding_registry.h"
#include "third_party/blink/renderer/platform/wtf/time.h"
@@ -47,7 +49,7 @@ diff --git a/third_party/blink/renderer/core/dom/document.cc b/third_party/blink
#ifndef NDEBUG
using WeakDocumentSet = blink::HeapHashSet>;
static WeakDocumentSet& liveDocumentSet();
-@@ -6088,8 +6091,35 @@ void Document::FinishedParsing() {
+@@ -6131,8 +6134,35 @@ void Document::FinishedParsing() {
fetcher_->ClearResourcesFromPreviousFetcher();
}
@@ -69,7 +71,7 @@ diff --git a/third_party/blink/renderer/core/dom/document.cc b/third_party/blink
+ if ((pos1 == 0) || (pos2 == 0)) {
+ LOG(INFO) << "injecting anti-AMP-cure Javascript payload, URL: " << url_.GetString();
+ HTMLScriptElement* e = HTMLScriptElement::Create(*this, CreateElementFlags());
-+ e->setText(ANTI_AMP_CURE_JS);
++ e->setTextDirect(ANTI_AMP_CURE_JS);
+ bodyElement->AppendChild(e);
+ }
+
@@ -77,7 +79,7 @@ diff --git a/third_party/blink/renderer/core/dom/document.cc b/third_party/blink
+ if ((WTF::kNotFound != host.Find("youtube.com")) || (WTF::kNotFound != host.Find("vimeo.com"))) {
+ LOG(INFO) << "injecting video-bg-play Javascript payload, URL: " << url_.GetString();
+ HTMLScriptElement* e = HTMLScriptElement::Create(*this, CreateElementFlags());
-+ e->setText(VIDEO_BG_PLAY_JS);
++ e->setTextDirect(VIDEO_BG_PLAY_JS);
+ bodyElement->AppendChild(e);
+ }
+ } // has origin and body element
@@ -106,6 +108,32 @@ new file mode 100644
+#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
+diff --git a/third_party/blink/renderer/core/html/html_script_element.cc b/third_party/blink/renderer/core/html/html_script_element.cc
+--- a/third_party/blink/renderer/core/html/html_script_element.cc
++++ b/third_party/blink/renderer/core/html/html_script_element.cc
+@@ -147,6 +147,11 @@ void HTMLScriptElement::setTextContent(
+ }
+ }
+
++void HTMLScriptElement::setTextDirect(
++ const char *s) {
++ Node::setTextContent(s);
++}
++
+ void HTMLScriptElement::setAsync(bool async) {
+ SetBooleanAttribute(kAsyncAttr, async);
+ loader_->HandleAsyncAttribute();
+diff --git a/third_party/blink/renderer/core/html/html_script_element.h b/third_party/blink/renderer/core/html/html_script_element.h
+--- a/third_party/blink/renderer/core/html/html_script_element.h
++++ b/third_party/blink/renderer/core/html/html_script_element.h
+@@ -53,6 +53,7 @@ class CORE_EXPORT HTMLScriptElement final : public HTMLElement,
+ void setText(const StringOrTrustedScript&, ExceptionState&);
+ void setInnerText(const StringOrTrustedScript&, ExceptionState&) override;
+ void setTextContent(const StringOrTrustedScript&, ExceptionState&) override;
++ void setTextDirect(const char*);
+
+ KURL Src() const;
+
--
2.11.0
diff --git a/build/patches/Modify-default-preferences.patch b/build/patches/Modify-default-preferences.patch
index 9b4c3cef..fca3f81e 100644
--- a/build/patches/Modify-default-preferences.patch
+++ b/build/patches/Modify-default-preferences.patch
@@ -3,23 +3,23 @@ Date: Thu, 12 Oct 2017 08:09:24 +0200
Subject: Modify default preferences
---
- chrome/browser/background/background_mode_manager.cc | 2 +-
- chrome/browser/chrome_content_browser_client.cc | 2 +-
- chrome/browser/net/prediction_options.cc | 2 +-
- chrome/browser/net/prediction_options.h | 2 +-
- chrome/browser/profiles/profile.cc | 2 +-
- .../resources/settings/reset_page/reset_profile_dialog.html | 2 +-
- chrome/browser/signin/signin_promo.cc | 4 ++--
- chrome/browser/ui/browser_ui_prefs.cc | 4 ++--
- chrome/browser/ui/navigation_correction_tab_observer.cc | 2 +-
- chrome/browser/ui/webui/local_discovery/local_discovery_ui.cc | 4 ----
- chrome/service/cloud_print/connector_settings.cc | 2 +-
- components/autofill/core/browser/autofill_manager.cc | 5 +----
- components/autofill/core/common/autofill_prefs.cc | 6 +++---
- components/bookmarks/browser/bookmark_utils.cc | 4 ++--
- components/safe_browsing/common/safe_browsing_prefs.cc | 4 ++--
- extensions/common/extension.cc | 8 --------
- 16 files changed, 20 insertions(+), 35 deletions(-)
+ chrome/browser/background/background_mode_manager.cc | 2 +-
+ chrome/browser/chrome_content_browser_client.cc | 2 +-
+ chrome/browser/net/prediction_options.cc | 2 +-
+ chrome/browser/net/prediction_options.h | 2 +-
+ chrome/browser/profiles/profile.cc | 2 +-
+ .../settings/reset_page/reset_profile_dialog.html | 2 +-
+ chrome/browser/signin/signin_promo.cc | 4 ++--
+ chrome/browser/ui/browser_ui_prefs.cc | 4 ++--
+ chrome/browser/ui/navigation_correction_tab_observer.cc | 2 +-
+ .../browser/ui/webui/local_discovery/local_discovery_ui.cc | 4 ----
+ chrome/service/cloud_print/connector_settings.cc | 2 +-
+ components/autofill/core/browser/autofill_manager.cc | 14 ++++----------
+ components/autofill/core/common/autofill_prefs.cc | 6 +++---
+ components/bookmarks/browser/bookmark_utils.cc | 4 ++--
+ components/safe_browsing/common/safe_browsing_prefs.cc | 4 ++--
+ extensions/common/extension.cc | 8 --------
+ 16 files changed, 23 insertions(+), 41 deletions(-)
diff --git a/chrome/browser/background/background_mode_manager.cc b/chrome/browser/background/background_mode_manager.cc
--- a/chrome/browser/background/background_mode_manager.cc
@@ -36,7 +36,7 @@ diff --git a/chrome/browser/background/background_mode_manager.cc b/chrome/brows
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
-@@ -1053,7 +1053,7 @@ void ChromeContentBrowserClient::RegisterLocalStatePrefs(
+@@ -1055,7 +1055,7 @@ void ChromeContentBrowserClient::RegisterLocalStatePrefs(
void ChromeContentBrowserClient::RegisterProfilePrefs(
user_prefs::PrefRegistrySyncable* registry) {
registry->RegisterBooleanPref(prefs::kDisable3DAPIs, false);
@@ -48,9 +48,9 @@ diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/ch
diff --git a/chrome/browser/net/prediction_options.cc b/chrome/browser/net/prediction_options.cc
--- a/chrome/browser/net/prediction_options.cc
+++ b/chrome/browser/net/prediction_options.cc
-@@ -30,7 +30,7 @@ NetworkPredictionStatus CanPrefetchAndPrerender(
- return NetworkPredictionStatus::ENABLED;
+@@ -32,7 +32,7 @@ NetworkPredictionStatus CanPrefetchAndPrerender(
}
+ return NetworkPredictionStatus::DISABLED_DUE_TO_NETWORK;
default:
- DCHECK_EQ(NETWORK_PREDICTION_NEVER, network_prediction_options);
+ //DCHECK_EQ(NETWORK_PREDICTION_NEVER, network_prediction_options);
@@ -165,22 +165,45 @@ diff --git a/chrome/service/cloud_print/connector_settings.cc b/chrome/service/c
diff --git a/components/autofill/core/browser/autofill_manager.cc b/components/autofill/core/browser/autofill_manager.cc
--- a/components/autofill/core/browser/autofill_manager.cc
+++ b/components/autofill/core/browser/autofill_manager.cc
-@@ -290,10 +290,7 @@ bool AutofillManager::ShouldShowCreditCardSigninPromo(
- bool AutofillManager::ShouldParseForms(const std::vector& forms,
- const base::TimeTicks timestamp) {
+@@ -351,10 +351,7 @@ bool AutofillManager::ShouldParseForms(const std::vector& forms,
bool enabled = IsAutofillEnabled();
+ sync_state_ = personal_data_ ? personal_data_->GetSyncSigninState()
+ : AutofillSyncSigninState::kNumSyncStates;
- if (!has_logged_autofill_enabled_) {
-- AutofillMetrics::LogIsAutofillEnabledAtPageLoad(enabled);
+- AutofillMetrics::LogIsAutofillEnabledAtPageLoad(enabled, sync_state_);
- has_logged_autofill_enabled_ = true;
- }
+ has_logged_autofill_enabled_ = true;
return enabled;
}
+@@ -621,10 +618,7 @@ void AutofillManager::OnQueryFormFieldAutofillImpl(
+ // suggestions available.
+ // TODO(mathp): Differentiate between number of suggestions available
+ // (current metric) and number shown to the user.
+- if (!has_logged_address_suggestions_count_) {
+- AutofillMetrics::LogAddressSuggestionsCount(suggestions.size());
+- has_logged_address_suggestions_count_ = true;
+- }
++ has_logged_address_suggestions_count_ = true;
+ }
+ }
+
+@@ -1216,8 +1210,8 @@ void AutofillManager::Reset() {
+ #if defined(OS_ANDROID) || defined(OS_IOS)
+ autofill_assistant_.Reset();
+ #endif
+- has_logged_autofill_enabled_ = false;
+- has_logged_address_suggestions_count_ = false;
++ has_logged_autofill_enabled_ = true;
++ has_logged_address_suggestions_count_ = true;
+ did_show_suggestions_ = false;
+ user_did_type_ = false;
+ user_did_autofill_ = false;
diff --git a/components/autofill/core/common/autofill_prefs.cc b/components/autofill/core/common/autofill_prefs.cc
--- a/components/autofill/core/common/autofill_prefs.cc
+++ b/components/autofill/core/common/autofill_prefs.cc
-@@ -91,10 +91,10 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry) {
+@@ -132,10 +132,10 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry) {
prefs::kAutofillBillingCustomerNumber, 0.0,
user_prefs::PrefRegistrySyncable::SYNCABLE_PRIORITY_PREF);
registry->RegisterBooleanPref(
@@ -193,7 +216,7 @@ diff --git a/components/autofill/core/common/autofill_prefs.cc b/components/auto
user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
registry->RegisterIntegerPref(
prefs::kAutofillLastVersionDeduped, 0,
-@@ -103,7 +103,7 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry) {
+@@ -148,7 +148,7 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry) {
prefs::kAutofillLastVersionDisusedAddressesDeleted, 0,
user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
registry->RegisterBooleanPref(
@@ -223,7 +246,7 @@ diff --git a/components/bookmarks/browser/bookmark_utils.cc b/components/bookmar
diff --git a/components/safe_browsing/common/safe_browsing_prefs.cc b/components/safe_browsing/common/safe_browsing_prefs.cc
--- a/components/safe_browsing/common/safe_browsing_prefs.cc
+++ b/components/safe_browsing/common/safe_browsing_prefs.cc
-@@ -229,9 +229,9 @@ void RegisterProfilePrefs(PrefRegistrySimple* registry) {
+@@ -149,9 +149,9 @@ void RegisterProfilePrefs(PrefRegistrySimple* registry) {
registry->RegisterBooleanPref(
prefs::kSafeBrowsingSawInterstitialScoutReporting, false);
registry->RegisterBooleanPref(
diff --git a/build/patches/Offer-builtin-autocomplete-for-chrome-flags.patch b/build/patches/Offer-builtin-autocomplete-for-chrome-flags.patch
index 4377e50f..9dba4eda 100644
--- a/build/patches/Offer-builtin-autocomplete-for-chrome-flags.patch
+++ b/build/patches/Offer-builtin-autocomplete-for-chrome-flags.patch
@@ -9,7 +9,7 @@ Subject: Offer builtin autocomplete for chrome://flags
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
-@@ -242,6 +242,8 @@ std::vector
+@@ -235,6 +235,8 @@ std::vector
ChromeAutocompleteProviderClient::GetBuiltinsToProvideAsUserTypes() {
std::vector builtins_to_provide;
builtins_to_provide.push_back(
diff --git a/build/patches/Open-YouTube-links-in-Bromite.patch b/build/patches/Open-YouTube-links-in-Bromite.patch
index 858b0def..297c5e48 100644
--- a/build/patches/Open-YouTube-links-in-Bromite.patch
+++ b/build/patches/Open-YouTube-links-in-Bromite.patch
@@ -9,7 +9,7 @@ Subject: Open YouTube links in Bromite
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/externalnav/ExternalNavigationHandler.java b/chrome/android/java/src/org/chromium/chrome/browser/externalnav/ExternalNavigationHandler.java
--- a/chrome/android/java/src/org/chromium/chrome/browser/externalnav/ExternalNavigationHandler.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/externalnav/ExternalNavigationHandler.java
-@@ -386,6 +386,13 @@ public class ExternalNavigationHandler {
+@@ -403,6 +403,13 @@ public class ExternalNavigationHandler {
return OverrideUrlLoadingResult.NO_OVERRIDE;
}
diff --git a/build/patches/Punt-the-Widevine-version-string.patch b/build/patches/Punt-the-Widevine-version-string.patch
index 102f05cd..104002e5 100644
--- a/build/patches/Punt-the-Widevine-version-string.patch
+++ b/build/patches/Punt-the-Widevine-version-string.patch
@@ -10,7 +10,7 @@ Originally from http://bazaar.launchpad.net/~saiarcot895/chromium-browser/chromi
diff --git a/chrome/common/chrome_content_client.cc b/chrome/common/chrome_content_client.cc
--- a/chrome/common/chrome_content_client.cc
+++ b/chrome/common/chrome_content_client.cc
-@@ -538,7 +538,7 @@ void ChromeContentClient::AddContentDecryptionModules(
+@@ -541,7 +541,7 @@ void ChromeContentClient::AddContentDecryptionModules(
base::FilePath cdm_path;
content::CdmCapability capability;
if (IsWidevineAvailable(&cdm_path, &capability)) {
diff --git a/build/patches/Remove-help-menu-item.patch b/build/patches/Remove-help-menu-item.patch
index bea0a8f9..ecb682a4 100644
--- a/build/patches/Remove-help-menu-item.patch
+++ b/build/patches/Remove-help-menu-item.patch
@@ -24,7 +24,7 @@ diff --git a/chrome/android/java/res/menu/main_menu.xml b/chrome/android/java/re
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ChromeActivity.java b/chrome/android/java/src/org/chromium/chrome/browser/ChromeActivity.java
--- a/chrome/android/java/src/org/chromium/chrome/browser/ChromeActivity.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/ChromeActivity.java
-@@ -2124,15 +2124,6 @@ public abstract class ChromeActivity
+@@ -2123,15 +2123,6 @@ public abstract class ChromeActivity
final Tab currentTab = getActivityTab();
@@ -56,7 +56,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/KeyboardShortcu
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabActivity.java b/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabActivity.java
--- a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabActivity.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabActivity.java
-@@ -1314,7 +1314,7 @@ public class CustomTabActivity extends ChromeActivity
diff --git a/build/patches/Restore-classic-new-tab-page.patch b/build/patches/Restore-classic-new-tab-page.patch
index c0a1bac3..0cfcf01f 100644
--- a/build/patches/Restore-classic-new-tab-page.patch
+++ b/build/patches/Restore-classic-new-tab-page.patch
@@ -9,18 +9,18 @@ Subject: Restore classic new tab page
diff --git a/chrome/browser/search/search.cc b/chrome/browser/search/search.cc
--- a/chrome/browser/search/search.cc
+++ b/chrome/browser/search/search.cc
-@@ -155,10 +155,7 @@ bool IsURLAllowedForSupervisedUser(const GURL& url, Profile* profile) {
- }
+@@ -156,10 +156,7 @@ bool IsURLAllowedForSupervisedUser(const GURL& url, Profile* profile) {
bool ShouldShowLocalNewTab(Profile* profile) {
+ #if !defined(OS_ANDROID)
- base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
- return command_line->HasSwitch(switches::kForceLocalNtp) ||
- (base::FeatureList::IsEnabled(features::kUseGoogleLocalNtp) &&
- profile && DefaultSearchProviderIsGoogle(profile));
+ return true;
+ #endif
+ return false;
}
-
- bool ShouldDelayRemoteNTP(const GURL& search_provider_url, Profile* profile) {
--
2.11.0
diff --git a/build/patches/Revert-Download-location-android-Check-SD-card-before-showing-location-dialog.patch b/build/patches/Revert-Download-location-android-Check-SD-card-before-showing-location-dialog.patch
deleted file mode 100644
index bc3b9c26..00000000
--- a/build/patches/Revert-Download-location-android-Check-SD-card-before-showing-location-dialog.patch
+++ /dev/null
@@ -1,109 +0,0 @@
-From: csagan5 <32685696+csagan5@users.noreply.github.com>
-Date: Thu, 20 Dec 2018 18:23:32 +0100
-Subject: Revert "Download location android: Check SD card before showing
- location dialog."
-
-This reverts commit 9ade596cc0b315f1f9c3292e1fd8d6182e32fde2.
----
- .../download/DownloadLocationDialogBridge.java | 50 +++-------------------
- 1 file changed, 6 insertions(+), 44 deletions(-)
-
-diff --git a/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadLocationDialogBridge.java b/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadLocationDialogBridge.java
---- a/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadLocationDialogBridge.java
-+++ b/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadLocationDialogBridge.java
-@@ -4,9 +4,6 @@
-
- package org.chromium.chrome.browser.download;
-
--import android.content.Context;
--import android.text.TextUtils;
--
- import org.chromium.base.annotations.CalledByNative;
- import org.chromium.base.metrics.RecordHistogram;
- import org.chromium.chrome.browser.ChromeActivity;
-@@ -17,7 +14,6 @@ import org.chromium.chrome.browser.preferences.PrefServiceBridge;
- import org.chromium.ui.base.WindowAndroid;
-
- import java.io.File;
--import java.util.ArrayList;
-
- /**
- * Helper class to handle communication between download location dialog and native.
-@@ -26,10 +22,6 @@ public class DownloadLocationDialogBridge implements ModalDialogView.Controller
- private long mNativeDownloadLocationDialogBridge;
- private DownloadLocationDialog mLocationDialog;
- private ModalDialogManager mModalDialogManager;
-- private long mTotalBytes;
-- private @DownloadLocationDialogType int mDialogType;
-- private String mSuggestedPath;
-- private Context mContext;
-
- private DownloadLocationDialogBridge(long nativeDownloadLocationDialogBridge) {
- mNativeDownloadLocationDialogBridge = nativeDownloadLocationDialogBridge;
-@@ -60,13 +52,12 @@ public class DownloadLocationDialogBridge implements ModalDialogView.Controller
- }
-
- mModalDialogManager = activity.getModalDialogManager();
-- mContext = activity;
-- mTotalBytes = totalBytes;
-- mDialogType = dialogType;
-- mSuggestedPath = suggestedPath;
-
-- DownloadDirectoryProvider.getInstance().getAllDirectoriesOptions(
-- (ArrayList dirs) -> { onDirectoryOptionsRetrieved(dirs); });
-+ if (mLocationDialog != null) return;
-+ mLocationDialog = DownloadLocationDialog.create(
-+ this, activity, totalBytes, dialogType, new File(suggestedPath));
-+
-+ mModalDialogManager.showDialog(mLocationDialog, ModalDialogManager.ModalDialogType.APP);
- }
-
- @Override
-@@ -101,34 +92,6 @@ public class DownloadLocationDialogBridge implements ModalDialogView.Controller
- }
-
- /**
-- * Called after retrieved the download directory options.
-- * @param dirs An list of available download directories.
-- */
-- private void onDirectoryOptionsRetrieved(ArrayList dirs) {
-- // If there is only one directory available, don't show the default dialog, and set the
-- // download directory to default. Dialog will still show for other types of dialogs, like
-- // name conflict or disk error.
-- if (dirs.size() == 1 && mDialogType == DownloadLocationDialogType.DEFAULT) {
-- final DirectoryOption dir = dirs.get(0);
-- if (dir.type == DirectoryOption.DownloadLocationDirectoryType.DEFAULT) {
-- assert(!TextUtils.isEmpty(dir.location));
-- PrefServiceBridge.getInstance().setDownloadAndSaveFileDefaultDirectory(
-- dir.location);
-- nativeOnComplete(mNativeDownloadLocationDialogBridge, mSuggestedPath);
-- }
-- return;
-- }
--
-- // Already showing the dialog.
-- if (mLocationDialog != null) return;
--
-- // Actually show the dialog.
-- mLocationDialog = DownloadLocationDialog.create(
-- this, mContext, mTotalBytes, mDialogType, new File(mSuggestedPath));
-- mModalDialogManager.showDialog(mLocationDialog, ModalDialogManager.ModalDialogType.APP);
-- }
--
-- /**
- * Pass along information from location dialog to native.
- *
- * @param fileName Name the user gave the file.
-@@ -156,8 +119,7 @@ public class DownloadLocationDialogBridge implements ModalDialogView.Controller
- nativeOnComplete(mNativeDownloadLocationDialogBridge, file.getAbsolutePath());
- }
-
-- // Update preference to show prompt based on whether checkbox is checked only when the user
-- // click the positive button.
-+ // Update preference to show prompt based on whether checkbox is checked.
- if (dontShowAgain) {
- PrefServiceBridge.getInstance().setPromptForDownloadAndroid(
- DownloadPromptStatus.DONT_SHOW);
---
-2.11.0
-
diff --git a/build/patches/User-Agent-anonymize.patch b/build/patches/User-Agent-anonymize.patch
index a2cfb1b4..43f5f121 100644
--- a/build/patches/User-Agent-anonymize.patch
+++ b/build/patches/User-Agent-anonymize.patch
@@ -5,10 +5,25 @@ Subject: User Agent: anonymize
Use a fixed device name and Chrome product version with the goal of not
disclosing the specific build of Bromite.
---
- components/version_info/version_info.cc | 13 +++++-
- content/common/user_agent.cc | 72 ++++++++++++++++++++-------------
- 2 files changed, 57 insertions(+), 28 deletions(-)
+ .../browser/ui/android/android_about_app_info.cc | 4 ++-
+ components/version_info/version_info.cc | 13 +++++++-
+ content/common/user_agent.cc | 37 +++++++++++++++++-----
+ content/public/common/user_agent.h | 2 +-
+ 4 files changed, 45 insertions(+), 11 deletions(-)
+diff --git a/chrome/browser/ui/android/android_about_app_info.cc b/chrome/browser/ui/android/android_about_app_info.cc
+--- a/chrome/browser/ui/android/android_about_app_info.cc
++++ b/chrome/browser/ui/android/android_about_app_info.cc
+@@ -20,6 +20,8 @@ std::string AndroidAboutAppInfo::GetGmsInfo() {
+ }
+
+ std::string AndroidAboutAppInfo::GetOsInfo() {
++ int32_t major_version = 4, minor_version, bugfix_version;
++ base::SysInfo::OperatingSystemVersionNumbers(&major_version, &minor_version, &bugfix_version);
+ return base::SysInfo::OperatingSystemVersion() +
+- content::GetAndroidOSInfo(/*include_android_build_number=*/true);
++ content::GetAndroidOSInfo(/*include_android_build_number=*/true, major_version);
+ }
diff --git a/components/version_info/version_info.cc b/components/version_info/version_info.cc
--- a/components/version_info/version_info.cc
+++ b/components/version_info/version_info.cc
@@ -16,7 +31,7 @@ diff --git a/components/version_info/version_info.cc b/components/version_info/v
#include "base/logging.h"
#include "base/no_destructor.h"
#include "base/version.h"
-+#include "base/sys_info.h"
++#include "base/system/sys_info.h"
#include "build/build_config.h"
#include "components/version_info/version_info_values.h"
@@ -34,124 +49,81 @@ diff --git a/components/version_info/version_info.cc b/components/version_info/v
+ }
+
+ // version 5 and above
-+ return "Chrome/70.0.3538.80";
++ return "Chrome/71.0.3578.99";
}
std::string GetProductName() {
diff --git a/content/common/user_agent.cc b/content/common/user_agent.cc
--- a/content/common/user_agent.cc
+++ b/content/common/user_agent.cc
-@@ -22,11 +22,6 @@
-
- namespace content {
-
--#if defined(OS_ANDROID)
--const base::Feature kAndroidUserAgentStringContainsBuildId{
-- "AndroidUserAgentStringContainsBuildId", base::FEATURE_DISABLED_BY_DEFAULT};
--#endif // defined(OS_ANDROID)
--
- std::string GetWebKitVersion() {
- return base::StringPrintf("%d.%d (%s)",
- WEBKIT_VERSION_MAJOR,
-@@ -66,7 +61,32 @@ std::string BuildOSCpuInfo(bool include_android_build_number) {
+@@ -85,7 +85,7 @@ std::string BuildOSCpuInfo(bool include_android_build_number) {
}
#elif defined(OS_ANDROID)
std::string android_version_str = base::SysInfo::OperatingSystemVersion();
- std::string android_info_str = GetAndroidOSInfo(include_android_build_number);
-+ std::string android_info_str;
++ std::string android_info_str = GetAndroidOSInfo(include_android_build_number, os_major_version);
+ #elif (defined(OS_POSIX) && !defined(OS_MACOSX)) || defined(OS_FUCHSIA)
+ // Should work on any Posix system.
+ struct utsname unixinfo;
+@@ -153,18 +153,39 @@ std::string BuildUserAgentFromProductAndExtraOSInfo(
+ return BuildUserAgentFromOSAndProduct(os_info, product);
+ }
+
+-std::string GetAndroidOSInfo(bool include_android_build_number) {
++std::string GetAndroidOSInfo(bool include_android_build_number, int32_t os_major_version) {
+ std::string android_info_str;
+
+- // Send information about the device.
++ // Send spoofed information about the device.
+ bool semicolon_inserted = false;
+- std::string android_build_codename = base::SysInfo::GetAndroidBuildCodename();
+- std::string android_device_name = base::SysInfo::HardwareModelName();
+- if (!android_device_name.empty() && "REL" == android_build_codename) {
+- android_info_str += "; " + android_device_name;
+- semicolon_inserted = true;
++ std::string android_device_name;
+
+ // Send information about the device and build ID.
+ // Use a common device/build ID based on Android major version.
+ switch (os_major_version) {
+ default: // version 9 and above
-+ android_info_str = "ONEPLUS A6000";
++ android_device_name = "ONEPLUS A6000";
+ break;
+ case 8:
-+ android_info_str = "FIG-LX3";
++ android_device_name = "FIG-LX3";
+ break;
+ case 7:
-+ android_info_str = "SM-G610M";
++ android_device_name = "SM-G610M";
+ break;
+ case 6:
-+ android_info_str = "SM-J700M";
++ android_device_name = "SM-J700M";
+ break;
+ case 5:
-+ android_info_str = "XT1033";
++ android_device_name = "XT1033";
+ break;
+ case 4:
-+ android_info_str = "ZTE Blade C370 Build/KOT49H";
++ android_device_name = "ZTE Blade C370";
+ break;
-+ }
-+
-+ android_info_str = " " + android_info_str;
- #elif (defined(OS_POSIX) && !defined(OS_MACOSX)) || defined(OS_FUCHSIA)
- // Should work on any Posix system.
- struct utsname unixinfo;
-@@ -102,7 +122,7 @@ std::string BuildOSCpuInfo(bool include_android_build_number) {
- os_minor_version,
- os_bugfix_version
- #elif defined(OS_ANDROID)
-- "Android %s%s",
-+ "Android %s;%s",
- android_version_str.c_str(),
- android_info_str.c_str()
- #elif defined(OS_POSIX) || defined(OS_FUCHSIA)
-@@ -137,18 +157,6 @@ std::string BuildUserAgentFromProduct(const std::string& product) {
- return BuildUserAgentFromOSAndProduct(os_info, product);
- }
-
--#if defined(OS_ANDROID)
--std::string BuildUserAgentFromProductAndExtraOSInfo(
-- const std::string& product,
-- const std::string& extra_os_info,
-- bool include_android_build_number) {
-- std::string os_info;
-- base::StringAppendF(&os_info, "%s%s%s", getUserAgentPlatform().c_str(),
-- BuildOSCpuInfo(include_android_build_number).c_str(),
-- extra_os_info.c_str());
-- return BuildUserAgentFromOSAndProduct(os_info, product);
--}
--
- std::string GetAndroidOSInfo(bool include_android_build_number) {
- std::string android_info_str;
-
-@@ -162,18 +170,28 @@ std::string GetAndroidOSInfo(bool include_android_build_number) {
}
++ android_info_str += "; " + android_device_name;
++ semicolon_inserted = true;
++
// Append the build ID.
-- if (base::FeatureList::IsEnabled(kAndroidUserAgentStringContainsBuildId) ||
-- include_android_build_number) {
-- std::string android_build_id = base::SysInfo::GetAndroidBuildID();
-- if (!android_build_id.empty()) {
-- if (!semicolon_inserted)
-- android_info_str += ";";
-- android_info_str += " Build/" + android_build_id;
-- }
-+ std::string android_build_id = base::SysInfo::GetAndroidBuildID();
-+ if (!android_build_id.empty()) {
-+ if (!semicolon_inserted)
-+ android_info_str += ";";
-+ android_info_str += " Build/" + android_build_id;
- }
+ if (base::FeatureList::IsEnabled(kAndroidUserAgentStringContainsBuildId) ||
+ include_android_build_number) {
+diff --git a/content/public/common/user_agent.h b/content/public/common/user_agent.h
+--- a/content/public/common/user_agent.h
++++ b/content/public/common/user_agent.h
+@@ -37,7 +37,7 @@ CONTENT_EXPORT std::string BuildUserAgentFromProductAndExtraOSInfo(
+ bool include_android_build_number);
- return android_info_str;
- }
-+
-+#if defined(OS_ANDROID)
-+std::string BuildUserAgentFromProductAndExtraOSInfo(
-+ const std::string& product,
-+ const std::string& extra_os_info,
-+ bool include_android_build_number) {
-+ std::string os_info;
-+ base::StringAppendF(&os_info, "%s%s%s", getUserAgentPlatform().c_str(),
-+ BuildOSCpuInfo(include_android_build_number).c_str(),
-+ extra_os_info.c_str());
-+ return BuildUserAgentFromOSAndProduct(os_info, product);
-+}
-+
- #endif // defined(OS_ANDROID)
+ // Helper function to generate just the OS info.
+-CONTENT_EXPORT std::string GetAndroidOSInfo(bool include_android_build_number);
++CONTENT_EXPORT std::string GetAndroidOSInfo(bool include_android_build_number, int32_t os_major_version);
+ #endif
- std::string BuildUserAgentFromOSAndProduct(const std::string& os_info,
+ // Builds a full user agent string given a string describing the OS and a
--
2.11.0
diff --git a/build/patches/autofill-disable-autofill-download-manager.patch b/build/patches/autofill-disable-autofill-download-manager.patch
index f661f057..d1fab7d4 100644
--- a/build/patches/autofill-disable-autofill-download-manager.patch
+++ b/build/patches/autofill-disable-autofill-download-manager.patch
@@ -4,14 +4,14 @@ Subject: autofill: disable autofill download manager
Disables the autofill download manager (trk:158).
---
- components/autofill/core/browser/autofill_download_manager.cc | 6 +++++-
- components/autofill/core/browser/autofill_manager.cc | 2 ++
- 2 files changed, 7 insertions(+), 1 deletion(-)
+ .../autofill/core/browser/autofill_download_manager.cc | 13 ++++++++++++-
+ components/autofill/core/browser/autofill_manager.cc | 18 ------------------
+ 2 files changed, 12 insertions(+), 19 deletions(-)
diff --git a/components/autofill/core/browser/autofill_download_manager.cc b/components/autofill/core/browser/autofill_download_manager.cc
--- a/components/autofill/core/browser/autofill_download_manager.cc
+++ b/components/autofill/core/browser/autofill_download_manager.cc
-@@ -49,7 +49,6 @@ namespace autofill {
+@@ -52,7 +52,6 @@ namespace autofill {
namespace {
@@ -19,7 +19,23 @@ diff --git a/components/autofill/core/browser/autofill_download_manager.cc b/com
const size_t kAutofillDownloadManagerMaxFormCacheSize = 16;
const size_t kMaxFieldsPerQueryRequest = 100;
-@@ -491,6 +490,7 @@ void AutofillDownloadManager::ClearUploadHistory(PrefService* pref_service) {
+@@ -418,6 +417,7 @@ bool GetUploadPayloadForApi(const AutofillUploadContents& upload,
+ return upload_request.SerializeToString(payload);
+ }
+
++/*
+ // Gets an API method URL given its type (query or upload) and an optional
+ // resource ID.
+ // Example usage:
+@@ -440,6 +440,7 @@ std::string GetAPIMethodUrl(AutofillDownloadManager::RequestType type,
+ }
+ return base::StrCat({api_method_url, "/", resource_id});
+ }
++*/
+
+ } // namespace
+
+@@ -565,6 +566,7 @@ void AutofillDownloadManager::ClearUploadHistory(PrefService* pref_service) {
std::tuple AutofillDownloadManager::GetRequestURLAndMethod(
const FormRequestData& request_data) const {
@@ -27,13 +43,31 @@ diff --git a/components/autofill/core/browser/autofill_download_manager.cc b/com
std::string method("POST");
std::string query_str;
-@@ -513,6 +513,10 @@ std::tuple AutofillDownloadManager::GetRequestURLAndMethod(
+@@ -587,12 +589,17 @@ std::tuple AutofillDownloadManager::GetRequestURLAndMethod(
GURL url = autofill_server_url_
.Resolve(RequestTypeToString(request_data.request_type))
.ReplaceComponents(replacements);
+#else
+ std::string method("GET");
+ GURL url = GURL("about:blank");
++#endif
+ return std::make_tuple(std::move(url), std::move(method));
+ }
+
+ std::tuple
+ AutofillDownloadManager::GetRequestURLAndMethodForApi(
+ const FormRequestData& request_data) const {
++#if 0
+ // ID of the resource to add to the API request URL. Nothing will be added if
+ // |resource_id| is empty.
+ std::string resource_id;
+@@ -621,6 +628,10 @@ AutofillDownloadManager::GetRequestURLAndMethodForApi(
+ (request_data.request_type == AutofillDownloadManager::REQUEST_QUERY)
+ ? "GET"
+ : "POST";
++#else
++ std::string method("GET");
++ GURL url = GURL("about:blank");
+#endif
return std::make_tuple(std::move(url), std::move(method));
}
@@ -41,15 +75,35 @@ diff --git a/components/autofill/core/browser/autofill_download_manager.cc b/com
diff --git a/components/autofill/core/browser/autofill_manager.cc b/components/autofill/core/browser/autofill_manager.cc
--- a/components/autofill/core/browser/autofill_manager.cc
+++ b/components/autofill/core/browser/autofill_manager.cc
-@@ -1166,9 +1166,11 @@ AutofillManager::AutofillManager(
+@@ -171,19 +171,6 @@ void LogDeveloperEngagementUkm(ukm::UkmRecorder* ukm_recorder,
+ }
+ }
+
+-std::string GetAPIKeyForUrl(version_info::Channel channel) {
+- // First look if we can get API key from command line flag.
+- const base::CommandLine& command_line =
+- *base::CommandLine::ForCurrentProcess();
+- if (command_line.HasSwitch(switches::kAutofillAPIKey))
+- return command_line.GetSwitchValueASCII(switches::kAutofillAPIKey);
+-
+- // Get the API key from Chrome baked keys.
+- if (channel == version_info::Channel::STABLE)
+- return google_apis::GetAPIKey();
+- return google_apis::GetNonStableAPIKey();
+-}
+-
+ } // namespace
+
+ AutofillManager::FillingContext::FillingContext() = default;
+@@ -1260,11 +1247,6 @@ AutofillManager::AutofillManager(
weak_ptr_factory_(this) {
DCHECK(driver);
DCHECK(client_);
-+#if 0
- if (enable_download_manager == ENABLE_AUTOFILL_DOWNLOAD_MANAGER) {
- download_manager_.reset(new AutofillDownloadManager(driver, this));
- }
-+#endif
+- if (enable_download_manager == ENABLE_AUTOFILL_DOWNLOAD_MANAGER) {
+- version_info::Channel channel = client_->GetChannel();
+- download_manager_.reset(
+- new AutofillDownloadManager(driver, this, GetAPIKeyForUrl(channel)));
+- }
CountryNames::SetLocaleString(app_locale_);
if (personal_data_ && client_)
personal_data_->OnSyncServiceInitialized(client_->GetSyncService());
diff --git a/build/patches/dns-send-IPv6-connectivity-probes-to-RIPE-DNS.patch b/build/patches/dns-send-IPv6-connectivity-probes-to-RIPE-DNS.patch
index 6e2ead87..0dd5de46 100644
--- a/build/patches/dns-send-IPv6-connectivity-probes-to-RIPE-DNS.patch
+++ b/build/patches/dns-send-IPv6-connectivity-probes-to-RIPE-DNS.patch
@@ -11,7 +11,7 @@ anyway), avoid sending to Google.
diff --git a/net/dns/host_resolver_impl.cc b/net/dns/host_resolver_impl.cc
--- a/net/dns/host_resolver_impl.cc
+++ b/net/dns/host_resolver_impl.cc
-@@ -115,10 +115,10 @@ const unsigned kMinimumTTLSeconds = kCacheEntryTTLSeconds;
+@@ -118,10 +118,10 @@ const unsigned kMinimumTTLSeconds = kCacheEntryTTLSeconds;
// cached.
const int kIPv6ProbePeriodMs = 1000;
@@ -23,8 +23,8 @@ diff --git a/net/dns/host_resolver_impl.cc b/net/dns/host_resolver_impl.cc
+ { 0x20, 0x01, 0x07, 0xfd, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01 };
- // We use a separate histogram name for each platform to facilitate the
- // display of error codes by their symbolic name (since each platform has
+ enum DnsResolveStatus {
+ RESOLVE_STATUS_DNS_SUCCESS = 0,
--
2.11.0
diff --git a/build/patches/getClientRects-getBoundingClientRect-measureText-add-fingerprinting-mitigation.patch b/build/patches/getClientRects-getBoundingClientRect-measureText-add-fingerprinting-mitigation.patch
index 7fd5e95a..8669bcdc 100644
--- a/build/patches/getClientRects-getBoundingClientRect-measureText-add-fingerprinting-mitigation.patch
+++ b/build/patches/getClientRects-getBoundingClientRect-measureText-add-fingerprinting-mitigation.patch
@@ -33,7 +33,7 @@ diff --git a/third_party/blink/renderer/core/dom/document.cc b/third_party/blink
#include "services/metrics/public/cpp/mojo_ukm_recorder.h"
#include "services/metrics/public/cpp/ukm_builders.h"
#include "services/metrics/public/cpp/ukm_source_id.h"
-@@ -725,6 +726,10 @@ Document::Document(const DocumentInit& initializer,
+@@ -722,6 +723,10 @@ Document::Document(const DocumentInit& initializer,
}
DCHECK(fetcher_);
@@ -44,7 +44,7 @@ diff --git a/third_party/blink/renderer/core/dom/document.cc b/third_party/blink
root_scroller_controller_ = RootScrollerController::Create(*this);
// We depend on the url getting immediately set in subframes, but we
-@@ -790,6 +795,14 @@ Range* Document::CreateRangeAdjustedToTreeScope(const TreeScope& tree_scope,
+@@ -787,6 +792,14 @@ Range* Document::CreateRangeAdjustedToTreeScope(const TreeScope& tree_scope,
Position::BeforeNode(*shadow_host));
}
@@ -62,7 +62,7 @@ diff --git a/third_party/blink/renderer/core/dom/document.cc b/third_party/blink
diff --git a/third_party/blink/renderer/core/dom/document.h b/third_party/blink/renderer/core/dom/document.h
--- a/third_party/blink/renderer/core/dom/document.h
+++ b/third_party/blink/renderer/core/dom/document.h
-@@ -427,6 +427,9 @@ class CORE_EXPORT Document : public ContainerNode,
+@@ -418,6 +418,9 @@ class CORE_EXPORT Document : public ContainerNode,
has_xml_declaration_ = has_xml_declaration ? 1 : 0;
}
@@ -72,7 +72,7 @@ diff --git a/third_party/blink/renderer/core/dom/document.h b/third_party/blink/
String visibilityState() const;
mojom::PageVisibilityState GetPageVisibilityState() const;
bool hidden() const;
-@@ -1780,6 +1783,8 @@ class CORE_EXPORT Document : public ContainerNode,
+@@ -1776,6 +1779,8 @@ class CORE_EXPORT Document : public ContainerNode,
double start_time_;
@@ -84,7 +84,7 @@ diff --git a/third_party/blink/renderer/core/dom/document.h b/third_party/blink/
diff --git a/third_party/blink/renderer/core/dom/element.cc b/third_party/blink/renderer/core/dom/element.cc
--- a/third_party/blink/renderer/core/dom/element.cc
+++ b/third_party/blink/renderer/core/dom/element.cc
-@@ -1363,6 +1363,15 @@ DOMRectList* Element::getClientRects() {
+@@ -1202,6 +1202,15 @@ DOMRectList* Element::getClientRects() {
DCHECK(element_layout_object);
GetDocument().AdjustFloatQuadsForScrollAndAbsoluteZoom(
quads, *element_layout_object);
@@ -100,7 +100,7 @@ diff --git a/third_party/blink/renderer/core/dom/element.cc b/third_party/blink/
return DOMRectList::Create(quads);
}
-@@ -1380,6 +1389,13 @@ DOMRect* Element::getBoundingClientRect() {
+@@ -1219,6 +1228,13 @@ DOMRect* Element::getBoundingClientRect() {
DCHECK(element_layout_object);
GetDocument().AdjustFloatRectForScrollAndAbsoluteZoom(result,
*element_layout_object);
@@ -117,7 +117,7 @@ diff --git a/third_party/blink/renderer/core/dom/element.cc b/third_party/blink/
diff --git a/third_party/blink/renderer/core/dom/range.cc b/third_party/blink/renderer/core/dom/range.cc
--- a/third_party/blink/renderer/core/dom/range.cc
+++ b/third_party/blink/renderer/core/dom/range.cc
-@@ -1606,11 +1606,27 @@ DOMRectList* Range::getClientRects() const {
+@@ -1646,11 +1646,27 @@ DOMRectList* Range::getClientRects() const {
Vector quads;
GetBorderAndTextQuads(quads);
@@ -149,9 +149,9 @@ diff --git a/third_party/blink/renderer/core/dom/range.cc b/third_party/blink/re
diff --git a/third_party/blink/renderer/core/html/canvas/text_metrics.cc b/third_party/blink/renderer/core/html/canvas/text_metrics.cc
--- a/third_party/blink/renderer/core/html/canvas/text_metrics.cc
+++ b/third_party/blink/renderer/core/html/canvas/text_metrics.cc
-@@ -38,6 +38,24 @@ float TextMetrics::GetFontBaseline(const TextBaseline& text_baseline,
- return 0;
- }
+@@ -45,6 +45,24 @@ void TextMetrics::Trace(blink::Visitor* visitor) {
+
+ TextMetrics::TextMetrics() : baselines_(Baselines::Create()) {}
+void TextMetrics::Shuffle(const double factor) {
+ // x-direction
@@ -166,9 +166,9 @@ diff --git a/third_party/blink/renderer/core/html/canvas/text_metrics.cc b/third
+ actual_bounding_box_descent_ *= factor;
+ em_height_ascent_ *= factor;
+ em_height_descent_ *= factor;
-+ baselines_.setAlphabetic(baselines_.alphabetic() * factor);
-+ baselines_.setHanging(baselines_.hanging() * factor);
-+ baselines_.setIdeographic(baselines_.ideographic() * factor);
++ baselines_->setAlphabetic(baselines_->alphabetic() * factor);
++ baselines_->setHanging(baselines_->hanging() * factor);
++ baselines_->setIdeographic(baselines_->ideographic() * factor);
+}
+
void TextMetrics::Update(const Font& font,
@@ -177,9 +177,9 @@ diff --git a/third_party/blink/renderer/core/html/canvas/text_metrics.cc b/third
diff --git a/third_party/blink/renderer/core/html/canvas/text_metrics.h b/third_party/blink/renderer/core/html/canvas/text_metrics.h
--- a/third_party/blink/renderer/core/html/canvas/text_metrics.h
+++ b/third_party/blink/renderer/core/html/canvas/text_metrics.h
-@@ -68,6 +68,8 @@ class CORE_EXPORT TextMetrics final : public ScriptWrappable {
+@@ -71,6 +71,8 @@ class CORE_EXPORT TextMetrics final : public ScriptWrappable {
- static float GetFontBaseline(const TextBaseline&, const SimpleFontData&);
+ void Trace(blink::Visitor*) override;
+ void Shuffle(const double factor);
+
@@ -198,7 +198,7 @@ diff --git a/third_party/blink/renderer/modules/canvas/canvas2d/canvas_rendering
#include "third_party/blink/public/platform/platform.h"
#include "third_party/blink/public/platform/task_type.h"
#include "third_party/blink/public/platform/web_scroll_into_view_params.h"
-@@ -782,8 +784,14 @@ TextMetrics* CanvasRenderingContext2D::measureText(const String& text) {
+@@ -783,8 +785,14 @@ TextMetrics* CanvasRenderingContext2D::measureText(const String& text) {
else
direction = ToTextDirection(GetState().GetDirection(), canvas());
diff --git a/build/patches/kill-GCM.patch b/build/patches/kill-GCM.patch
index 2346df1b..633a24f6 100644
--- a/build/patches/kill-GCM.patch
+++ b/build/patches/kill-GCM.patch
@@ -10,24 +10,24 @@ Subject: kill GCM
.../chrome/browser/ChromeBackgroundService.java | 1 -
.../invalidation/InvalidationController.java | 13 --
.../browser/ntp/snippets/SnippetsLauncher.java | 44 -------
- .../browser/services/gcm/GCMBackgroundTask.java | 2 -
+ .../browser/services/gcm/GCMBackgroundTask.java | 2 +-
.../gcm/InvalidationGcmUpstreamSender.java | 15 ---
chrome/android/java_sources.gni | 2 -
components/background_task_scheduler/BUILD.gn | 1 -
.../BackgroundTaskSchedulerGcmNetworkManager.java | 146 +--------------------
components/gcm_driver/android/BUILD.gn | 1 -
components/gcm_driver/instance_id/android/BUILD.gn | 1 -
- .../gcm_driver/instance_id/InstanceIDBridge.java | 31 +----
+ .../gcm_driver/instance_id/InstanceIDBridge.java | 40 +-----
components/sync/android/BUILD.gn | 1 -
third_party/cacheinvalidation/BUILD.gn | 6 -
.../client/contrib/MultiplexingGcmListener.java | 92 +------------
.../android2/channel/AndroidNetworkChannel.java | 18 +--
- 19 files changed, 14 insertions(+), 523 deletions(-)
+ 19 files changed, 15 insertions(+), 531 deletions(-)
diff --git a/build/secondary/third_party/android_tools/BUILD.gn b/build/secondary/third_party/android_tools/BUILD.gn
--- a/build/secondary/third_party/android_tools/BUILD.gn
+++ b/build/secondary/third_party/android_tools/BUILD.gn
-@@ -53,9 +53,6 @@ if (enable_java_templates) {
+@@ -83,9 +83,6 @@ if (enable_java_templates) {
testonly = true
java_files = [ "//third_party/android_tools/sdk/extras/chromium/support/src/org/chromium/android/support/PackageManagerWrapper.java" ]
}
@@ -40,7 +40,7 @@ diff --git a/build/secondary/third_party/android_tools/BUILD.gn b/build/secondar
diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn
--- a/chrome/android/BUILD.gn
+++ b/chrome/android/BUILD.gn
-@@ -308,7 +308,6 @@ android_library("chrome_java") {
+@@ -317,7 +317,6 @@ android_library("chrome_java") {
"//third_party/android_deps:javax_inject_javax_inject_java",
"//third_party/android_media:android_media_java",
"//third_party/android_swipe_refresh:android_swipe_refresh_java",
@@ -74,7 +74,7 @@ diff --git a/chrome/android/java/AndroidManifest.xml b/chrome/android/java/Andro
-@@ -911,43 +906,6 @@ by a child template that "extends" this file.
+@@ -961,43 +956,6 @@ by a child template that "extends" this file.
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|mcc|mnc|screenLayout|smallestScreenSize"
android:hardwareAccelerated="false" />
@@ -118,7 +118,7 @@ diff --git a/chrome/android/java/AndroidManifest.xml b/chrome/android/java/Andro
-@@ -959,8 +917,6 @@ by a child template that "extends" this file.
+@@ -1009,8 +967,6 @@ by a child template that "extends" this file.
@@ -127,7 +127,7 @@ diff --git a/chrome/android/java/AndroidManifest.xml b/chrome/android/java/Andro
@@ -290,7 +290,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/BackgroundSyncL
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ChromeBackgroundService.java b/chrome/android/java/src/org/chromium/chrome/browser/ChromeBackgroundService.java
--- a/chrome/android/java/src/org/chromium/chrome/browser/ChromeBackgroundService.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/ChromeBackgroundService.java
-@@ -106,7 +106,6 @@ public class ChromeBackgroundService extends GcmTaskService {
+@@ -116,7 +116,6 @@ public class ChromeBackgroundService extends GcmTaskService {
@VisibleForTesting
protected void rescheduleBackgroundSyncTasksOnUpgrade() {
@@ -310,7 +310,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/invalidation/In
import org.chromium.base.ApplicationState;
import org.chromium.base.ApplicationStatus;
import org.chromium.base.ContextUtils;
-@@ -198,18 +196,7 @@ public class InvalidationController implements ApplicationStatus.ApplicationStat
+@@ -192,18 +190,7 @@ public class InvalidationController implements ApplicationStatus.ApplicationStat
* Registers for Google Cloud Messaging (GCM) for Invalidations.
*/
private void ensureGcmIsInitialized() {
@@ -425,12 +425,12 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ntp/snippets/Sn
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/services/gcm/GCMBackgroundTask.java b/chrome/android/java/src/org/chromium/chrome/browser/services/gcm/GCMBackgroundTask.java
--- a/chrome/android/java/src/org/chromium/chrome/browser/services/gcm/GCMBackgroundTask.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/services/gcm/GCMBackgroundTask.java
-@@ -39,8 +39,6 @@ public class GCMBackgroundTask implements BackgroundTask {
- Log.e(TAG, "The received bundle containing message data could not be validated.");
+@@ -41,7 +41,7 @@ public class GCMBackgroundTask implements BackgroundTask {
return false;
}
--
-- ChromeGcmListenerService.dispatchMessageToDriver(context, new GCMMessage(extras));
+
+- ChromeGcmListenerService.dispatchMessageToDriver(context, message);
++ //ChromeGcmListenerService.dispatchMessageToDriver(context, message);
return false;
}
@@ -469,7 +469,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/services/gcm/In
diff --git a/chrome/android/java_sources.gni b/chrome/android/java_sources.gni
--- a/chrome/android/java_sources.gni
+++ b/chrome/android/java_sources.gni
-@@ -27,7 +27,6 @@ chrome_java_sources = [
+@@ -28,7 +28,6 @@ chrome_java_sources = [
"java/src/org/chromium/chrome/browser/ChromeActivity.java",
"java/src/org/chromium/chrome/browser/ChromeActivitySessionTracker.java",
"java/src/org/chromium/chrome/browser/ChromeApplication.java",
@@ -477,7 +477,7 @@ diff --git a/chrome/android/java_sources.gni b/chrome/android/java_sources.gni
"java/src/org/chromium/chrome/browser/ChromeBackupAgent.java",
"java/src/org/chromium/chrome/browser/ChromeBackupWatcher.java",
"java/src/org/chromium/chrome/browser/ChromeFeatureList.java",
-@@ -1344,7 +1343,6 @@ chrome_java_sources = [
+@@ -1417,7 +1416,6 @@ chrome_java_sources = [
"java/src/org/chromium/chrome/browser/services/AndroidEduAndChildAccountHelper.java",
"java/src/org/chromium/chrome/browser/services/AndroidEduOwnerCheckCallback.java",
"java/src/org/chromium/chrome/browser/services/GoogleServicesManager.java",
@@ -685,7 +685,7 @@ diff --git a/components/gcm_driver/android/BUILD.gn b/components/gcm_driver/andr
diff --git a/components/gcm_driver/instance_id/android/BUILD.gn b/components/gcm_driver/instance_id/android/BUILD.gn
--- a/components/gcm_driver/instance_id/android/BUILD.gn
+++ b/components/gcm_driver/instance_id/android/BUILD.gn
-@@ -26,7 +26,6 @@ android_library("instance_id_driver_java") {
+@@ -27,7 +27,6 @@ android_library("instance_id_driver_java") {
java_files = [
"java/src/org/chromium/components/gcm_driver/instance_id/InstanceIDBridge.java",
@@ -696,7 +696,7 @@ diff --git a/components/gcm_driver/instance_id/android/BUILD.gn b/components/gcm
diff --git a/components/gcm_driver/instance_id/android/java/src/org/chromium/components/gcm_driver/instance_id/InstanceIDBridge.java b/components/gcm_driver/instance_id/android/java/src/org/chromium/components/gcm_driver/instance_id/InstanceIDBridge.java
--- a/components/gcm_driver/instance_id/android/java/src/org/chromium/components/gcm_driver/instance_id/InstanceIDBridge.java
+++ b/components/gcm_driver/instance_id/android/java/src/org/chromium/components/gcm_driver/instance_id/InstanceIDBridge.java
-@@ -32,7 +32,6 @@ public class InstanceIDBridge {
+@@ -26,7 +26,6 @@ public class InstanceIDBridge {
* Underlying InstanceIDWithSubtype. May be shared by multiple InstanceIDBridges. Must be
* initialized on a background thread.
*/
@@ -704,7 +704,7 @@ diff --git a/components/gcm_driver/instance_id/android/java/src/org/chromium/com
private static boolean sBlockOnAsyncTasksForTesting;
-@@ -108,7 +107,7 @@ public class InstanceIDBridge {
+@@ -71,7 +70,7 @@ public class InstanceIDBridge {
new BridgeAsyncTask() {
@Override
protected String doBackgroundWork() {
@@ -713,7 +713,7 @@ diff --git a/components/gcm_driver/instance_id/android/java/src/org/chromium/com
}
@Override
protected void sendResultToNative(String id) {
-@@ -123,7 +122,7 @@ public class InstanceIDBridge {
+@@ -86,7 +85,7 @@ public class InstanceIDBridge {
new BridgeAsyncTask() {
@Override
protected Long doBackgroundWork() {
@@ -722,12 +722,15 @@ diff --git a/components/gcm_driver/instance_id/android/java/src/org/chromium/com
}
@Override
protected void sendResultToNative(Long creationTime) {
-@@ -148,12 +147,7 @@ public class InstanceIDBridge {
+@@ -111,15 +110,7 @@ public class InstanceIDBridge {
new BridgeAsyncTask() {
@Override
protected String doBackgroundWork() {
- try {
-- storeLazinessInformation(authorizedEntity, isLazy);
+- LazySubscriptionsManager.storeLazinessInformation(
+- LazySubscriptionsManager.buildSubscriptionUniqueId(
+- mSubtype, authorizedEntity),
+- isLazy);
- return mInstanceID.getToken(authorizedEntity, scope, extras);
- } catch (IOException ex) {
- return "";
@@ -736,21 +739,27 @@ diff --git a/components/gcm_driver/instance_id/android/java/src/org/chromium/com
}
@Override
protected void sendResultToNative(String token) {
-@@ -169,12 +163,7 @@ public class InstanceIDBridge {
+@@ -135,18 +126,7 @@ public class InstanceIDBridge {
new BridgeAsyncTask() {
@Override
protected Boolean doBackgroundWork() {
- try {
- mInstanceID.deleteToken(authorizedEntity, scope);
+- String subscriptionId = LazySubscriptionsManager.buildSubscriptionUniqueId(
+- mSubtype, authorizedEntity);
+- if (LazySubscriptionsManager.isSubscriptionLazy(subscriptionId)) {
+- LazySubscriptionsManager.deletePersistedMessagesForSubscriptionId(
+- subscriptionId);
+- }
- return true;
- } catch (IOException ex) {
- return false;
- }
-+ return true;
++ return false;
}
@Override
protected void sendResultToNative(Boolean success) {
-@@ -189,12 +178,7 @@ public class InstanceIDBridge {
+@@ -161,12 +141,7 @@ public class InstanceIDBridge {
new BridgeAsyncTask() {
@Override
protected Boolean doBackgroundWork() {
@@ -764,7 +773,7 @@ diff --git a/components/gcm_driver/instance_id/android/java/src/org/chromium/com
}
@Override
protected void sendResultToNative(Boolean success) {
-@@ -233,11 +217,6 @@ public class InstanceIDBridge {
+@@ -205,11 +180,6 @@ public class InstanceIDBridge {
@Override
@SuppressWarnings("NoSynchronizedThisCheck") // Only used/accessible by native.
protected Result doInBackground() {
diff --git a/build/patches/kill-TOS-and-metrics-opt-out.patch b/build/patches/kill-TOS-and-metrics-opt-out.patch
index 17a0bdbe..9ee8f49a 100644
--- a/build/patches/kill-TOS-and-metrics-opt-out.patch
+++ b/build/patches/kill-TOS-and-metrics-opt-out.patch
@@ -11,7 +11,7 @@ Subject: kill TOS and metrics opt-out
diff --git a/chrome/android/java/res/layout/fre_tosanduma.xml b/chrome/android/java/res/layout/fre_tosanduma.xml
--- a/chrome/android/java/res/layout/fre_tosanduma.xml
+++ b/chrome/android/java/res/layout/fre_tosanduma.xml
-@@ -63,7 +63,8 @@
+@@ -62,7 +62,8 @@
android:layout_marginBottom="@dimen/fre_vertical_spacing"
android:gravity="center"
android:lineSpacingMultiplier="1.4"
@@ -24,8 +24,8 @@ diff --git a/chrome/android/java/res/layout/fre_tosanduma.xml b/chrome/android/j
diff --git a/chrome/android/java/res/values/dimens.xml b/chrome/android/java/res/values/dimens.xml
--- a/chrome/android/java/res/values/dimens.xml
+++ b/chrome/android/java/res/values/dimens.xml
-@@ -181,7 +181,6 @@
- 8dp
+@@ -182,7 +182,6 @@
+ 12dp
24dp
120dp
- 12dp
diff --git a/build/patches/kill-Vision.patch b/build/patches/kill-Vision.patch
index 9736f3b1..d746bce9 100644
--- a/build/patches/kill-Vision.patch
+++ b/build/patches/kill-Vision.patch
@@ -13,7 +13,7 @@ Barcode, face and text detection APIs
diff --git a/services/shape_detection/BUILD.gn b/services/shape_detection/BUILD.gn
--- a/services/shape_detection/BUILD.gn
+++ b/services/shape_detection/BUILD.gn
-@@ -86,14 +86,10 @@ if (is_android) {
+@@ -85,14 +85,10 @@ if (is_android) {
android_library("shape_detection_java") {
java_files = [
diff --git a/build/patches/openH264-enable-ARM-ARM64-optimizations.patch b/build/patches/openH264-enable-ARM-ARM64-optimizations.patch
index 674832e0..01ebe2a1 100644
--- a/build/patches/openH264-enable-ARM-ARM64-optimizations.patch
+++ b/build/patches/openH264-enable-ARM-ARM64-optimizations.patch
@@ -5,9 +5,9 @@ Subject: openH264: enable ARM/ARM64 optimizations
Enable the optimizations not only for ChromeOS but for all compatbile ARM/ARM64 architectures
Limit threads auto-detect only for iOS
---
- content/renderer/media_recorder/h264_encoder.cc | 6 ++--
- third_party/openh264/BUILD.gn | 39 +++++++++++++++++++++++++
- 2 files changed, 42 insertions(+), 3 deletions(-)
+ content/renderer/media_recorder/h264_encoder.cc | 6 ++---
+ third_party/openh264/BUILD.gn | 31 +++++++++++++++++++------
+ 2 files changed, 27 insertions(+), 10 deletions(-)
diff --git a/content/renderer/media_recorder/h264_encoder.cc b/content/renderer/media_recorder/h264_encoder.cc
--- a/content/renderer/media_recorder/h264_encoder.cc
@@ -30,26 +30,15 @@ diff --git a/content/renderer/media_recorder/h264_encoder.cc b/content/renderer/
diff --git a/third_party/openh264/BUILD.gn b/third_party/openh264/BUILD.gn
--- a/third_party/openh264/BUILD.gn
+++ b/third_party/openh264/BUILD.gn
-@@ -10,6 +10,7 @@ import("//third_party/yasm/yasm_assemble.gni")
- # Config shared by all openh264 targets.
- config("config") {
- cflags = []
-+ defines = []
-
- if (is_chromeos && target_cpu == "arm") {
+@@ -16,11 +16,16 @@ config("config") {
# HAVE_NEON and __chromeos__ are needed for enabling NEON on ChromeOS
-@@ -20,6 +21,20 @@ config("config") {
+ # devices.
+ defines += [
+- "HAVE_NEON",
+ "__chromeos__",
]
}
-+ # HAVE_NEON and __chromeos__ are needed for enabling NEON on ChromeOS
-+ # devices.
-+ if (is_chromeos && target_cpu == "arm") {
-+ defines += [
-+ "__chromeos__",
-+ ]
-+ }
-+
+ if (target_cpu == "arm" || target_cpu == "arm64") {
+ defines += [
+ "HAVE_NEON",
@@ -59,51 +48,51 @@ diff --git a/third_party/openh264/BUILD.gn b/third_party/openh264/BUILD.gn
# GCC and clang flags. MSVS (is_win && !is_clang) does not use cflags.
if (!is_win || is_clang) {
cflags += [
-@@ -129,6 +144,14 @@ source_set("common") {
+@@ -125,8 +130,12 @@ if (use_assembler) {
+
+ source_set("common") {
+ sources = openh264_common_sources
+- if (is_chromeos && target_cpu == "arm") {
+- sources += openh264_common_sources_asm_arm
++ if (is_chromeos || is_android) {
++ if (target_cpu == "arm") {
++ sources += openh264_common_sources_asm_arm
++ } else if (target_cpu == "arm64") {
++ sources += openh264_common_sources_asm_arm64
++ }
}
include_dirs = openh264_common_include_dirs
-+ # enable ARM optimizations
-+ if (target_cpu == "arm") {
-+ sources += openh264_common_sources_asm_arm
-+ }
-+ if (target_cpu == "arm64") {
-+ sources += openh264_common_sources_asm_arm64
-+ }
-+
- configs -= [ "//build/config/compiler:chromium_code" ]
- configs += [ "//build/config/compiler:no_chromium_code" ]
- configs += [ ":config" ]
-@@ -155,6 +178,14 @@ source_set("processing") {
+@@ -151,8 +160,12 @@ source_set("common") {
+
+ source_set("processing") {
+ sources = openh264_processing_sources
+- if (is_chromeos && target_cpu == "arm") {
+- sources += openh264_processing_sources_asm_arm
++ if (is_chromeos || is_android) {
++ if (target_cpu == "arm") {
++ sources += openh264_processing_sources_asm_arm
++ } else if (target_cpu == "arm64") {
++ sources += openh264_processing_sources_asm_arm64
++ }
}
include_dirs = openh264_processing_include_dirs
-+ # enable ARM optimizations
-+ if (target_cpu == "arm") {
-+ sources += openh264_common_sources_asm_arm
-+ }
-+ if (target_cpu == "arm64") {
-+ sources += openh264_common_sources_asm_arm64
-+ }
-+
- configs -= [ "//build/config/compiler:chromium_code" ]
- configs += [ "//build/config/compiler:no_chromium_code" ]
- configs += [ ":config" ]
-@@ -174,6 +205,14 @@ source_set("encoder") {
+@@ -170,8 +183,12 @@ source_set("processing") {
+
+ source_set("encoder") {
+ sources = openh264_encoder_sources
+- if (is_chromeos && target_cpu == "arm") {
+- sources += openh264_encoder_sources_asm_arm
++ if (is_chromeos || is_android) {
++ if (target_cpu == "arm") {
++ sources += openh264_encoder_sources_asm_arm
++ } else if (target_cpu == "arm64") {
++ sources += openh264_encoder_sources_asm_arm64
++ }
}
include_dirs = openh264_encoder_include_dirs
-+ # enable ARM optimizations
-+ if (target_cpu == "arm") {
-+ sources += openh264_common_sources_asm_arm
-+ }
-+ if (target_cpu == "arm64") {
-+ sources += openh264_common_sources_asm_arm64
-+ }
-+
- configs -= [ "//build/config/compiler:chromium_code" ]
- configs += [ "//build/config/compiler:no_chromium_code" ]
- configs += [ ":config" ]
--
2.11.0
diff --git a/build/patches/safe_browsing-disable-cookie-transmission.patch b/build/patches/safe_browsing-disable-cookie-transmission.patch
index c6c30e86..13bc83a1 100644
--- a/build/patches/safe_browsing-disable-cookie-transmission.patch
+++ b/build/patches/safe_browsing-disable-cookie-transmission.patch
@@ -17,7 +17,7 @@ References: https://github.com/iridium-browser/iridium-browser/issues/37
diff --git a/chrome/browser/safe_browsing/client_side_detection_service.cc b/chrome/browser/safe_browsing/client_side_detection_service.cc
--- a/chrome/browser/safe_browsing/client_side_detection_service.cc
+++ b/chrome/browser/safe_browsing/client_side_detection_service.cc
-@@ -358,7 +358,7 @@ void ClientSideDetectionService::StartClientReportPhishingRequest(
+@@ -359,7 +359,7 @@ void ClientSideDetectionService::StartClientReportPhishingRequest(
auto resource_request = std::make_unique();
resource_request->url = GetClientReportUrl(kClientReportPhishingUrl);
resource_request->method = "POST";
@@ -26,7 +26,7 @@ diff --git a/chrome/browser/safe_browsing/client_side_detection_service.cc b/chr
auto loader = network::SimpleURLLoader::Create(std::move(resource_request),
traffic_annotation);
loader->AttachStringForUpload(request_data, "application/octet-stream");
-@@ -440,7 +440,7 @@ void ClientSideDetectionService::StartClientReportMalwareRequest(
+@@ -441,7 +441,7 @@ void ClientSideDetectionService::StartClientReportMalwareRequest(
auto resource_request = std::make_unique();
resource_request->url = GetClientReportUrl(kClientReportMalwareUrl);
resource_request->method = "POST";
@@ -38,7 +38,7 @@ diff --git a/chrome/browser/safe_browsing/client_side_detection_service.cc b/chr
diff --git a/chrome/browser/safe_browsing/download_protection/check_client_download_request.cc b/chrome/browser/safe_browsing/download_protection/check_client_download_request.cc
--- a/chrome/browser/safe_browsing/download_protection/check_client_download_request.cc
+++ b/chrome/browser/safe_browsing/download_protection/check_client_download_request.cc
-@@ -1067,7 +1067,7 @@ void CheckClientDownloadRequest::SendRequest() {
+@@ -759,7 +759,7 @@ void CheckClientDownloadRequest::SendRequest() {
auto resource_request = std::make_unique();
resource_request->url = PPAPIDownloadRequest::GetDownloadRequestUrl();
resource_request->method = "POST";
diff --git a/build/patches/safe_browsing-disable-incident-reporting.patch b/build/patches/safe_browsing-disable-incident-reporting.patch
index bfeaaa49..d9d3d305 100644
--- a/build/patches/safe_browsing-disable-incident-reporting.patch
+++ b/build/patches/safe_browsing-disable-incident-reporting.patch
@@ -46,7 +46,7 @@ diff --git a/chrome/browser/safe_browsing/incident_reporting/incident_reporting_
diff --git a/chrome/browser/safe_browsing/safe_browsing_blocking_page.cc b/chrome/browser/safe_browsing/safe_browsing_blocking_page.cc
--- a/chrome/browser/safe_browsing/safe_browsing_blocking_page.cc
+++ b/chrome/browser/safe_browsing/safe_browsing_blocking_page.cc
-@@ -61,8 +61,7 @@ class SafeBrowsingBlockingPageFactoryImpl
+@@ -59,8 +59,7 @@ class SafeBrowsingBlockingPageFactoryImpl
Profile* profile =
Profile::FromBrowserContext(web_contents->GetBrowserContext());
PrefService* prefs = profile->GetPrefs();
@@ -55,11 +55,11 @@ diff --git a/chrome/browser/safe_browsing/safe_browsing_blocking_page.cc b/chrom
+ bool is_extended_reporting_opt_in_allowed = false;
bool is_proceed_anyway_disabled =
prefs->GetBoolean(prefs::kSafeBrowsingProceedAnywayDisabled);
- unified_consent::UnifiedConsentService* consent_service =
+
diff --git a/chrome/browser/safe_browsing/safe_browsing_service.cc b/chrome/browser/safe_browsing/safe_browsing_service.cc
--- a/chrome/browser/safe_browsing/safe_browsing_service.cc
+++ b/chrome/browser/safe_browsing/safe_browsing_service.cc
-@@ -329,8 +329,10 @@ SafeBrowsingUIManager* SafeBrowsingService::CreateUIManager() {
+@@ -359,8 +359,10 @@ SafeBrowsingUIManager* SafeBrowsingService::CreateUIManager() {
void SafeBrowsingService::RegisterAllDelayedAnalysis() {
#if defined(FULL_SAFE_BROWSING)
diff --git a/build/patches/safe_browsing-disable-reporting-of-safebrowsing-override.patch b/build/patches/safe_browsing-disable-reporting-of-safebrowsing-override.patch
index b4577de7..5a07c720 100644
--- a/build/patches/safe_browsing-disable-reporting-of-safebrowsing-override.patch
+++ b/build/patches/safe_browsing-disable-reporting-of-safebrowsing-override.patch
@@ -26,7 +26,7 @@ diff --git a/chrome/browser/safe_browsing/client_side_detection_service.cc b/chr
} // namespace
-@@ -289,6 +291,10 @@ void ClientSideDetectionService::StartClientReportPhishingRequest(
+@@ -290,6 +292,10 @@ void ClientSideDetectionService::StartClientReportPhishingRequest(
return;
}
@@ -37,7 +37,7 @@ diff --git a/chrome/browser/safe_browsing/client_side_detection_service.cc b/chr
// Fill in metadata about which model we used.
if (is_extended_reporting) {
request->set_model_filename(model_loader_extended_->name());
-@@ -371,6 +377,7 @@ void ClientSideDetectionService::StartClientReportPhishingRequest(
+@@ -372,6 +378,7 @@ void ClientSideDetectionService::StartClientReportPhishingRequest(
// Record that we made a request
phishing_report_times_.push(base::Time::Now());
@@ -45,7 +45,7 @@ diff --git a/chrome/browser/safe_browsing/client_side_detection_service.cc b/chr
}
void ClientSideDetectionService::StartClientReportMalwareRequest(
-@@ -385,6 +392,10 @@ void ClientSideDetectionService::StartClientReportMalwareRequest(
+@@ -386,6 +393,10 @@ void ClientSideDetectionService::StartClientReportMalwareRequest(
return;
}
@@ -56,7 +56,7 @@ diff --git a/chrome/browser/safe_browsing/client_side_detection_service.cc b/chr
std::string request_data;
if (!request->SerializeToString(&request_data)) {
UpdateEnumUMAHistogram(REPORT_FAILED_SERIALIZATION);
-@@ -454,6 +465,7 @@ void ClientSideDetectionService::StartClientReportMalwareRequest(
+@@ -455,6 +466,7 @@ void ClientSideDetectionService::StartClientReportMalwareRequest(
// Record that we made a malware request
malware_report_times_.push(base::Time::Now());
diff --git a/build/patches/ungoogled-chromium-Always-use-local-DevTools-files-instead-of-remote-files-from-Google.patch b/build/patches/ungoogled-chromium-Always-use-local-DevTools-files-instead-of-remote-files-from-Google.patch
index cdb7be45..0fbac462 100644
--- a/build/patches/ungoogled-chromium-Always-use-local-DevTools-files-instead-of-remote-files-from-Google.patch
+++ b/build/patches/ungoogled-chromium-Always-use-local-DevTools-files-instead-of-remote-files-from-Google.patch
@@ -17,7 +17,7 @@ Related comment: https://bugs.chromium.org/p/chromium/issues/detail?id=710701#c1
diff --git a/third_party/blink/renderer/devtools/BUILD.gn b/third_party/blink/renderer/devtools/BUILD.gn
--- a/third_party/blink/renderer/devtools/BUILD.gn
+++ b/third_party/blink/renderer/devtools/BUILD.gn
-@@ -1162,10 +1162,8 @@ action("generate_devtools_grd") {
+@@ -1161,10 +1161,8 @@ action("generate_devtools_grd") {
devtools_embedder_scripts +
[ "$resources_out_dir/devtools_extension_api.js" ]
@@ -44,7 +44,7 @@ diff --git a/third_party/blink/renderer/devtools/front_end/audits2_worker.json b
diff --git a/third_party/blink/renderer/devtools/front_end/devtools_app.json b/third_party/blink/renderer/devtools/front_end/devtools_app.json
--- a/third_party/blink/renderer/devtools/front_end/devtools_app.json
+++ b/third_party/blink/renderer/devtools/front_end/devtools_app.json
-@@ -4,7 +4,7 @@
+@@ -4,21 +4,21 @@
{ "name": "inspector_main", "type": "autostart" },
{ "name": "mobile_throttling", "type": "autostart" },
@@ -52,8 +52,7 @@ diff --git a/third_party/blink/renderer/devtools/front_end/devtools_app.json b/t
+ { "name": "accessibility" },
{ "name": "animation" },
{ "name": "audits2" },
- { "name": "browser_console" },
-@@ -12,14 +12,14 @@
+ { "name": "browser_debugger" },
{ "name": "cookie_table" },
{ "name": "devices" },
{ "name": "elements" },
@@ -94,7 +93,7 @@ diff --git a/third_party/blink/renderer/devtools/front_end/shell.json b/third_pa
diff --git a/third_party/blink/renderer/devtools/front_end/worker_app.json b/third_party/blink/renderer/devtools/front_end/worker_app.json
--- a/third_party/blink/renderer/devtools/front_end/worker_app.json
+++ b/third_party/blink/renderer/devtools/front_end/worker_app.json
-@@ -11,7 +11,7 @@
+@@ -10,7 +10,7 @@
{ "name": "help" },
{ "name": "layer_viewer" },
{ "name": "network" },
diff --git a/build/patches/ungoogled-chromium-Disable-Gaia.patch b/build/patches/ungoogled-chromium-Disable-Gaia.patch
index 93ee9582..2aded352 100644
--- a/build/patches/ungoogled-chromium-Disable-Gaia.patch
+++ b/build/patches/ungoogled-chromium-Disable-Gaia.patch
@@ -18,7 +18,7 @@ See also: https://github.com/Eloston/ungoogled-chromium/issues/104
diff --git a/chrome/browser/browser_resources.grd b/chrome/browser/browser_resources.grd
--- a/chrome/browser/browser_resources.grd
+++ b/chrome/browser/browser_resources.grd
-@@ -348,7 +348,6 @@
+@@ -332,7 +332,6 @@
@@ -26,7 +26,7 @@ diff --git a/chrome/browser/browser_resources.grd b/chrome/browser/browser_resou
-@@ -492,7 +491,6 @@
+@@ -453,7 +452,6 @@
@@ -100,7 +100,7 @@ diff --git a/google_apis/gaia/gaia_auth_fetcher.cc b/google_apis/gaia/gaia_auth_
std::unique_ptr
ExtractOAuth2TokenPairResponse(const std::string& data) {
-@@ -240,6 +240,7 @@ void GaiaAuthFetcher::CreateAndStartGaiaFetcher(
+@@ -270,6 +270,7 @@ void GaiaAuthFetcher::CreateAndStartGaiaFetcher(
const net::NetworkTrafficAnnotationTag& traffic_annotation) {
DCHECK(!fetch_pending_) << "Tried to fetch two things at once!";
@@ -108,7 +108,7 @@ diff --git a/google_apis/gaia/gaia_auth_fetcher.cc b/google_apis/gaia/gaia_auth_
auto resource_request = std::make_unique();
resource_request->url = gaia_gurl;
original_url_ = gaia_gurl;
-@@ -294,6 +295,7 @@ void GaiaAuthFetcher::CreateAndStartGaiaFetcher(
+@@ -324,6 +325,7 @@ void GaiaAuthFetcher::CreateAndStartGaiaFetcher(
base::BindOnce(&GaiaAuthFetcher::OnURLLoadComplete,
base::Unretained(this)),
kMaxMessageSize);
diff --git a/build/patches/ungoogled-chromium-Disable-Google-host-detection.patch b/build/patches/ungoogled-chromium-Disable-Google-host-detection.patch
index f23c14d5..e57d91a8 100644
--- a/build/patches/ungoogled-chromium-Disable-Google-host-detection.patch
+++ b/build/patches/ungoogled-chromium-Disable-Google-host-detection.patch
@@ -6,10 +6,10 @@ Disables various detections of Google hosts and functionality specific to them
---
.../page_load_metrics/page_load_metrics_util.cc | 4 +-
.../page_load_metrics/page_load_metrics_util.cc | 33 +---
- components/google/core/common/google_util.cc | 194 ++-------------------
+ components/google/core/common/google_util.cc | 196 ++-------------------
components/search_engines/template_url.cc | 6 +-
net/base/url_util.cc | 22 ---
- 5 files changed, 14 insertions(+), 245 deletions(-)
+ 5 files changed, 14 insertions(+), 247 deletions(-)
diff --git a/chrome/browser/page_load_metrics/page_load_metrics_util.cc b/chrome/browser/page_load_metrics/page_load_metrics_util.cc
--- a/chrome/browser/page_load_metrics/page_load_metrics_util.cc
@@ -71,9 +71,9 @@ diff --git a/chrome/common/page_load_metrics/page_load_metrics_util.cc b/chrome/
diff --git a/components/google/core/common/google_util.cc b/components/google/core/common/google_util.cc
--- a/components/google/core/common/google_util.cc
+++ b/components/google/core/common/google_util.cc
-@@ -43,118 +43,16 @@ namespace {
+@@ -45,120 +45,16 @@ bool gUseMockLinkDoctorBaseURLForTesting = false;
- bool gUseMockLinkDoctorBaseURLForTesting = false;
+ bool g_ignore_port_numbers = false;
-bool IsPathHomePageBase(base::StringPiece path) {
- return (path == "/") || (path == "/webhp");
@@ -131,7 +131,8 @@ diff --git a/components/google/core/common/google_util.cc b/components/google/co
-// port for its scheme (80 for HTTP, 443 for HTTPS).
-bool IsValidURL(const GURL& url, PortPermission port_permission) {
- return url.is_valid() && url.SchemeIsHTTPOrHTTPS() &&
-- (url.port().empty() || (port_permission == ALLOW_NON_STANDARD_PORTS));
+- (url.port().empty() || g_ignore_port_numbers ||
+- (port_permission == ALLOW_NON_STANDARD_PORTS));
-}
-
-bool IsCanonicalHostGoogleHostname(base::StringPiece canonical_host,
@@ -148,9 +149,9 @@ diff --git a/components/google/core/common/google_util.cc b/components/google/co
- // same page.
- StripTrailingDot(&tld);
-
-- static base::NoDestructor> google_tlds(
-- {GOOGLE_TLD_LIST});
-- return base::ContainsKey(*google_tlds, tld.as_string());
+- static const base::NoDestructor>
+- google_tlds(std::initializer_list({GOOGLE_TLD_LIST}));
+- return google_tlds->contains(tld);
-}
-
-// True if |url| is a valid URL with a host that is in the static list of
@@ -163,10 +164,11 @@ diff --git a/components/google/core/common/google_util.cc b/components/google/co
- base::StringPiece host(url.host_piece());
- StripTrailingDot(&host);
-
-- static base::NoDestructor> google_subdomains(
-- {"ipv4.google.com", "ipv6.google.com"});
+- static const base::NoDestructor>
+- google_subdomains(std::initializer_list(
+- {"ipv4.google.com", "ipv6.google.com"}));
-
-- return base::ContainsKey(*google_subdomains, host.as_string());
+- return google_subdomains->contains(host);
-}
-
} // namespace
@@ -191,7 +193,7 @@ diff --git a/components/google/core/common/google_util.cc b/components/google/co
}
void SetMockLinkDoctorBaseURLForTesting() {
-@@ -168,120 +66,50 @@ std::string GetGoogleLocale(const std::string& application_locale) {
+@@ -172,120 +68,50 @@ std::string GetGoogleLocale(const std::string& application_locale) {
GURL AppendGoogleLocaleParam(const GURL& url,
const std::string& application_locale) {
diff --git a/build/patches/ungoogled-chromium-Disable-domain-reliability.patch b/build/patches/ungoogled-chromium-Disable-domain-reliability.patch
index eab367a1..ba1a3b37 100644
--- a/build/patches/ungoogled-chromium-Disable-domain-reliability.patch
+++ b/build/patches/ungoogled-chromium-Disable-domain-reliability.patch
@@ -668,7 +668,7 @@ diff --git a/components/domain_reliability/uploader.cc b/components/domain_relia
- if (discard_uploads_ || shutdown_) {
+ if (true) {
- VLOG(1) << "Discarding report instead of uploading.";
+ DVLOG(1) << "Discarding report instead of uploading.";
UploadResult result;
result.status = UploadResult::SUCCESS;
--
diff --git a/build/patches/ungoogled-chromium-Disable-profile-avatar-downloading.patch b/build/patches/ungoogled-chromium-Disable-profile-avatar-downloading.patch
index 37320bb7..b70b0b73 100644
--- a/build/patches/ungoogled-chromium-Disable-profile-avatar-downloading.patch
+++ b/build/patches/ungoogled-chromium-Disable-profile-avatar-downloading.patch
@@ -12,7 +12,7 @@ Added some Bromite-specific further improvements
diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
--- a/chrome/browser/BUILD.gn
+++ b/chrome/browser/BUILD.gn
-@@ -1270,8 +1270,6 @@ jumbo_split_static_library("browser") {
+@@ -1271,8 +1271,6 @@ jumbo_split_static_library("browser") {
"profiles/profile_attributes_entry.h",
"profiles/profile_attributes_storage.cc",
"profiles/profile_attributes_storage.h",
@@ -24,7 +24,7 @@ diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
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 {
+@@ -94,20 +94,6 @@ base::string16 ProfileAttributesEntry::GetUserName() const {
}
const gfx::Image& ProfileAttributesEntry::GetAvatarIcon() const {
diff --git a/build/patches/ungoogled-chromium-Disable-signin.patch b/build/patches/ungoogled-chromium-Disable-signin.patch
index cc974027..8b49a1fe 100644
--- a/build/patches/ungoogled-chromium-Disable-signin.patch
+++ b/build/patches/ungoogled-chromium-Disable-signin.patch
@@ -42,7 +42,7 @@ diff --git a/chrome/browser/ui/chrome_pages.cc b/chrome/browser/ui/chrome_pages.
diff --git a/components/signin/core/browser/signin_manager_base.cc b/components/signin/core/browser/signin_manager_base.cc
--- a/components/signin/core/browser/signin_manager_base.cc
+++ b/components/signin/core/browser/signin_manager_base.cc
-@@ -155,7 +155,7 @@ void SigninManagerBase::Initialize(PrefService* local_state) {
+@@ -152,7 +152,7 @@ void SigninManagerBase::Initialize(PrefService* local_state) {
bool SigninManagerBase::IsInitialized() const { return initialized_; }
bool SigninManagerBase::IsSigninAllowed() const {
diff --git a/build/patches/ungoogled-chromium-Disable-translate-integration.patch b/build/patches/ungoogled-chromium-Disable-translate-integration.patch
index 20508bb1..9f11a235 100644
--- a/build/patches/ungoogled-chromium-Disable-translate-integration.patch
+++ b/build/patches/ungoogled-chromium-Disable-translate-integration.patch
@@ -3,25 +3,10 @@ Date: Mon, 12 Feb 2018 21:28:53 +0100
Subject: ungoogled-chromium: Disable translate integration
---
- components/translate/content/renderer/translate_helper.cc | 4 +++-
- components/translate/core/browser/translate_manager.cc | 5 +++--
- components/translate/core/browser/translate_script.cc | 3 +--
- 3 files changed, 7 insertions(+), 5 deletions(-)
+ components/translate/core/browser/translate_manager.cc | 5 +++--
+ components/translate/core/browser/translate_script.cc | 3 +--
+ 2 files changed, 4 insertions(+), 4 deletions(-)
-diff --git a/components/translate/content/renderer/translate_helper.cc b/components/translate/content/renderer/translate_helper.cc
---- a/components/translate/content/renderer/translate_helper.cc
-+++ b/components/translate/content/renderer/translate_helper.cc
-@@ -74,7 +74,9 @@ TranslateHelper::TranslateHelper(content::RenderFrame* render_frame,
- world_id_(world_id),
- extension_scheme_(extension_scheme),
- binding_(this),
-- weak_method_factory_(this) {}
-+ weak_method_factory_(this) {
-+ CancelPendingTranslation();
-+}
-
- TranslateHelper::~TranslateHelper() {
- }
diff --git a/components/translate/core/browser/translate_manager.cc b/components/translate/core/browser/translate_manager.cc
--- a/components/translate/core/browser/translate_manager.cc
+++ b/components/translate/core/browser/translate_manager.cc
diff --git a/build/patches/ungoogled-chromium-Disable-webRTC-log-uploader.patch b/build/patches/ungoogled-chromium-Disable-webRTC-log-uploader.patch
index b5fab093..4c8c1536 100644
--- a/build/patches/ungoogled-chromium-Disable-webRTC-log-uploader.patch
+++ b/build/patches/ungoogled-chromium-Disable-webRTC-log-uploader.patch
@@ -9,7 +9,7 @@ Subject: ungoogled-chromium: Disable webRTC log uploader
diff --git a/chrome/browser/media/webrtc/webrtc_log_uploader.cc b/chrome/browser/media/webrtc/webrtc_log_uploader.cc
--- a/chrome/browser/media/webrtc/webrtc_log_uploader.cc
+++ b/chrome/browser/media/webrtc/webrtc_log_uploader.cc
-@@ -119,30 +119,7 @@ void WebRtcLogUploader::LoggingStoppedDoUpload(
+@@ -121,30 +121,7 @@ void WebRtcLogUploader::LoggingStoppedDoUpload(
DCHECK(meta_data.get());
DCHECK(!upload_done_data.log_path.empty());
@@ -41,7 +41,7 @@ diff --git a/chrome/browser/media/webrtc/webrtc_log_uploader.cc b/chrome/browser
}
void WebRtcLogUploader::PrepareMultipartPostData(
-@@ -153,6 +130,9 @@ void WebRtcLogUploader::PrepareMultipartPostData(
+@@ -155,6 +132,9 @@ void WebRtcLogUploader::PrepareMultipartPostData(
DCHECK(!compressed_log.empty());
DCHECK(meta_data.get());
diff --git a/build/patches/ungoogled-chromium-Remove-third_party-analytics.patch b/build/patches/ungoogled-chromium-Remove-third_party-analytics.patch
deleted file mode 100644
index 7280a50a..00000000
--- a/build/patches/ungoogled-chromium-Remove-third_party-analytics.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-From: csagan5 <32685696+csagan5@users.noreply.github.com>
-Date: Mon, 17 Sep 2018 21:55:33 +0200
-Subject: ungoogled-chromium: Remove third_party/analytics
-
----
- ui/webui/resources/webui_resources.grd | 1 -
- 1 file changed, 1 deletion(-)
-
-diff --git a/ui/webui/resources/webui_resources.grd b/ui/webui/resources/webui_resources.grd
---- a/ui/webui/resources/webui_resources.grd
-+++ b/ui/webui/resources/webui_resources.grd
-@@ -15,7 +15,6 @@ without changes to the corresponding grd file. -->
-
-
-
--
-
---
-2.11.0
-
diff --git a/build/patches/ungoogled-chromium-disable-safe-browsing.patch b/build/patches/ungoogled-chromium-disable-safe-browsing.patch
index 49f76ccc..2d9b1620 100644
--- a/build/patches/ungoogled-chromium-disable-safe-browsing.patch
+++ b/build/patches/ungoogled-chromium-disable-safe-browsing.patch
@@ -41,7 +41,7 @@ Subject: ungoogled-chromium: disable safe browsing
diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
--- a/chrome/browser/BUILD.gn
+++ b/chrome/browser/BUILD.gn
-@@ -2621,8 +2621,6 @@ jumbo_split_static_library("browser") {
+@@ -2647,8 +2647,6 @@ jumbo_split_static_library("browser") {
"download/download_commands.h",
"download/download_crx_util.cc",
"download/download_crx_util.h",
@@ -62,9 +62,9 @@ diff --git a/chrome/browser/browser_process.h b/chrome/browser/browser_process.h
-}
-
namespace subresource_filter {
- class ContentRulesetService;
+ class RulesetService;
}
-@@ -116,10 +112,6 @@ namespace resource_coordinator {
+@@ -117,10 +113,6 @@ class ResourceCoordinatorParts;
class TabManager;
}
@@ -75,7 +75,7 @@ diff --git a/chrome/browser/browser_process.h b/chrome/browser/browser_process.h
// NOT THREAD SAFE, call only from the main thread.
// These functions shouldn't return NULL unless otherwise noted.
class BrowserProcess {
-@@ -234,14 +226,6 @@ class BrowserProcess {
+@@ -235,14 +227,6 @@ class BrowserProcess {
// on this platform (or this is a unit test).
virtual StatusTray* status_tray() = 0;
@@ -89,19 +89,19 @@ diff --git a/chrome/browser/browser_process.h b/chrome/browser/browser_process.h
-
// Returns the service providing versioned storage for rules used by the Safe
// Browsing subresource filter.
- virtual subresource_filter::ContentRulesetService*
+ virtual subresource_filter::RulesetService*
diff --git a/chrome/browser/browser_process_impl.cc b/chrome/browser/browser_process_impl.cc
--- a/chrome/browser/browser_process_impl.cc
+++ b/chrome/browser/browser_process_impl.cc
-@@ -72,7 +72,6 @@
+@@ -73,7 +73,6 @@
#include "chrome/browser/printing/print_preview_dialog_controller.h"
#include "chrome/browser/profiles/profile_manager.h"
- #include "chrome/browser/resource_coordinator/tab_lifecycle_unit_source.h"
+ #include "chrome/browser/resource_coordinator/resource_coordinator_parts.h"
-#include "chrome/browser/safe_browsing/safe_browsing_service.h"
#include "chrome/browser/shell_integration.h"
#include "chrome/browser/status_icons/status_tray.h"
#include "chrome/browser/ui/browser_dialogs.h"
-@@ -373,8 +372,6 @@ void BrowserProcessImpl::StartTearDown() {
+@@ -371,8 +370,6 @@ void BrowserProcessImpl::StartTearDown() {
// that URLFetcher operation before going away.)
metrics_services_manager_.reset();
intranet_redirect_detector_.reset();
@@ -110,7 +110,7 @@ diff --git a/chrome/browser/browser_process_impl.cc b/chrome/browser/browser_pro
network_time_tracker_.reset();
#if BUILDFLAG(ENABLE_PLUGINS)
plugins_resource_service_.reset();
-@@ -994,22 +991,6 @@ StatusTray* BrowserProcessImpl::status_tray() {
+@@ -992,22 +989,6 @@ StatusTray* BrowserProcessImpl::status_tray() {
return status_tray_.get();
}
@@ -130,10 +130,10 @@ diff --git a/chrome/browser/browser_process_impl.cc b/chrome/browser/browser_pro
- return NULL;
-}
-
- subresource_filter::ContentRulesetService*
+ subresource_filter::RulesetService*
BrowserProcessImpl::subresource_filter_ruleset_service() {
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
-@@ -1300,16 +1281,6 @@ void BrowserProcessImpl::CreateBackgroundPrintingManager() {
+@@ -1298,16 +1279,6 @@ void BrowserProcessImpl::CreateBackgroundPrintingManager() {
#endif
}
@@ -153,17 +153,17 @@ diff --git a/chrome/browser/browser_process_impl.cc b/chrome/browser/browser_pro
diff --git a/chrome/browser/browser_process_impl.h b/chrome/browser/browser_process_impl.h
--- a/chrome/browser/browser_process_impl.h
+++ b/chrome/browser/browser_process_impl.h
-@@ -175,9 +175,6 @@ class BrowserProcessImpl : public BrowserProcess,
+@@ -172,9 +172,6 @@ class BrowserProcessImpl : public BrowserProcess,
void set_background_mode_manager_for_test(
std::unique_ptr manager) override;
StatusTray* status_tray() override;
- safe_browsing::SafeBrowsingService* safe_browsing_service() override;
- safe_browsing::ClientSideDetectionService* safe_browsing_detection_service()
- override;
- subresource_filter::ContentRulesetService*
- subresource_filter_ruleset_service() override;
+ subresource_filter::RulesetService* subresource_filter_ruleset_service()
+ override;
optimization_guide::OptimizationGuideService* optimization_guide_service()
-@@ -324,9 +321,6 @@ class BrowserProcessImpl : public BrowserProcess,
+@@ -326,9 +323,6 @@ class BrowserProcessImpl : public BrowserProcess,
std::unique_ptr background_mode_manager_;
#endif
@@ -171,14 +171,14 @@ diff --git a/chrome/browser/browser_process_impl.h b/chrome/browser/browser_proc
- scoped_refptr safe_browsing_service_;
-
bool created_subresource_filter_ruleset_service_ = false;
- std::unique_ptr
+ std::unique_ptr
subresource_filter_ruleset_service_;
diff --git a/chrome/browser/browsing_data/chrome_browsing_data_remover_delegate.cc b/chrome/browser/browsing_data/chrome_browsing_data_remover_delegate.cc
--- a/chrome/browser/browsing_data/chrome_browsing_data_remover_delegate.cc
+++ b/chrome/browser/browsing_data/chrome_browsing_data_remover_delegate.cc
-@@ -649,35 +649,6 @@ void ChromeBrowsingDataRemoverDelegate::RemoveEmbedderData(
+@@ -617,35 +617,6 @@ void ChromeBrowsingDataRemoverDelegate::RemoveEmbedderData(
CONTENT_SETTINGS_TYPE_CLIENT_HINTS, base::Time(), base::Time::Max(),
- base::BindRepeating(&WebsiteSettingsFilterAdapter, filter));
+ website_settings_filter);
- // Clear the safebrowsing cookies only if time period is for "all time". It
- // doesn't make sense to apply the time period of deleting in the last X
@@ -215,8 +215,8 @@ diff --git a/chrome/browser/browsing_data/chrome_browsing_data_remover_delegate.
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
-@@ -812,30 +812,6 @@ void SetApplicationLocaleOnIOThread(const std::string& locale) {
- g_io_thread_application_locale.Get() = locale;
+@@ -830,30 +830,6 @@ void SetApplicationLocaleOnIOThread(const std::string& locale) {
+ GetIOThreadApplicationLocale() = locale;
}
-// An implementation of the SSLCertReporter interface used by
@@ -246,7 +246,7 @@ diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/ch
#if defined(OS_ANDROID)
float GetDeviceScaleAdjustment() {
static const float kMinFSM = 1.05f;
-@@ -1988,7 +1964,7 @@ void ChromeContentBrowserClient::AppendExtraCommandLineSwitches(
+@@ -2004,7 +1980,7 @@ void ChromeContentBrowserClient::AppendExtraCommandLineSwitches(
// Disable client-side phishing detection in the renderer if it is
// disabled in the Profile preferences or the browser process.
if (!prefs->GetBoolean(prefs::kSafeBrowsingEnabled) ||
@@ -255,7 +255,7 @@ diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/ch
command_line->AppendSwitch(
switches::kDisableClientSidePhishingDetection);
}
-@@ -2666,7 +2642,7 @@ void ChromeContentBrowserClient::AllowCertificateError(
+@@ -2694,7 +2670,7 @@ void ChromeContentBrowserClient::AllowCertificateError(
SSLErrorHandler::HandleSSLError(
web_contents, cert_error, ssl_info, request_url,
expired_previous_decision,
@@ -264,7 +264,7 @@ diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/ch
callback, SSLErrorHandler::BlockingPageReadyCallback());
}
-@@ -2936,8 +2912,6 @@ bool ChromeContentBrowserClient::CanCreateWindow(
+@@ -2974,8 +2950,6 @@ bool ChromeContentBrowserClient::CanCreateWindow(
void ChromeContentBrowserClient::ResourceDispatcherHostCreated() {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
@@ -273,7 +273,7 @@ diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/ch
for (size_t i = 0; i < extra_parts_.size(); ++i)
extra_parts_[i]->ResourceDispatcherHostCreated();
-@@ -4103,7 +4077,7 @@ ChromeContentBrowserClient::CreateThrottlesForNavigation(
+@@ -4181,7 +4155,7 @@ ChromeContentBrowserClient::CreateThrottlesForNavigation(
if (base::FeatureList::IsEnabled(features::kSSLCommittedInterstitials)) {
throttles.push_back(std::make_unique(
handle,
@@ -323,7 +323,7 @@ diff --git a/chrome/browser/download/chrome_download_manager_delegate.cc b/chrom
}
#if defined(OS_ANDROID)
-@@ -618,16 +611,6 @@ void ChromeDownloadManagerDelegate::ChooseSavePath(
+@@ -616,16 +609,6 @@ void ChromeDownloadManagerDelegate::ChooseSavePath(
void ChromeDownloadManagerDelegate::SanitizeSavePackageResourceName(
base::FilePath* filename) {
@@ -343,7 +343,7 @@ diff --git a/chrome/browser/download/chrome_download_manager_delegate.cc b/chrom
diff --git a/chrome/browser/download/download_item_model.cc b/chrome/browser/download/download_item_model.cc
--- a/chrome/browser/download/download_item_model.cc
+++ b/chrome/browser/download/download_item_model.cc
-@@ -534,9 +534,6 @@ bool DownloadItemModel::IsCommandEnabled(
+@@ -526,9 +526,6 @@ bool DownloadItemModel::IsCommandEnabled(
// filename. Don't base an "Always open" decision based on it. Also
// exclude extensions.
return download_->CanOpenDownload() &&
@@ -372,7 +372,7 @@ diff --git a/chrome/browser/download/download_prefs.cc b/chrome/browser/download
}
}
-@@ -382,10 +375,6 @@ bool DownloadPrefs::IsAutoOpenEnabledBasedOnExtension(
+@@ -371,10 +364,6 @@ bool DownloadPrefs::IsAutoOpenEnabledBasedOnExtension(
bool DownloadPrefs::EnableAutoOpenBasedOnExtension(
const base::FilePath& file_name) {
base::FilePath::StringType extension = file_name.Extension();
@@ -651,7 +651,7 @@ diff --git a/chrome/browser/extensions/blacklist_state_fetcher.h b/chrome/browse
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
-@@ -326,8 +326,7 @@ void LogCommittedPreviewsDecision(
+@@ -296,8 +296,7 @@ void NotifyUIThreadOfRequestComplete(
} // namespace
ChromeResourceDispatcherHostDelegate::ChromeResourceDispatcherHostDelegate()
@@ -661,7 +661,7 @@ diff --git a/chrome/browser/loader/chrome_resource_dispatcher_host_delegate.cc b
ChromeResourceDispatcherHostDelegate::~ChromeResourceDispatcherHostDelegate() {
#if BUILDFLAG(ENABLE_EXTENSIONS)
-@@ -341,8 +340,6 @@ void ChromeResourceDispatcherHostDelegate::RequestBeginning(
+@@ -311,8 +310,6 @@ void ChromeResourceDispatcherHostDelegate::RequestBeginning(
content::AppCacheService* appcache_service,
ResourceType resource_type,
std::vector>* throttles) {
@@ -670,7 +670,7 @@ diff --git a/chrome/browser/loader/chrome_resource_dispatcher_host_delegate.cc b
ProfileIOData* io_data = ProfileIOData::FromResourceContext(resource_context);
#if BUILDFLAG(ENABLE_OFFLINE_PAGES) || BUILDFLAG(ENABLE_NACL)
-@@ -461,7 +458,7 @@ void ChromeResourceDispatcherHostDelegate::AppendStandardResourceThrottles(
+@@ -431,7 +428,7 @@ void ChromeResourceDispatcherHostDelegate::AppendStandardResourceThrottles(
content::ResourceThrottle* first_throttle = NULL;
#if defined(OS_ANDROID)
first_throttle = DataReductionProxyResourceThrottle::MaybeCreate(
@@ -682,7 +682,7 @@ diff --git a/chrome/browser/loader/chrome_resource_dispatcher_host_delegate.cc b
diff --git a/chrome/browser/metrics/chrome_metrics_service_client.cc b/chrome/browser/metrics/chrome_metrics_service_client.cc
--- a/chrome/browser/metrics/chrome_metrics_service_client.cc
+++ b/chrome/browser/metrics/chrome_metrics_service_client.cc
-@@ -713,9 +713,6 @@ void ChromeMetricsServiceClient::RegisterMetricsServiceProviders() {
+@@ -714,9 +714,6 @@ void ChromeMetricsServiceClient::RegisterMetricsServiceProviders() {
metrics_service_->RegisterMetricsProvider(
std::make_unique());
@@ -708,7 +708,7 @@ diff --git a/chrome/browser/net/trial_comparison_cert_verifier.cc b/chrome/brows
diff --git a/chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc b/chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc
--- a/chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc
+++ b/chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc
-@@ -230,7 +230,6 @@ void ChromeBrowserMainExtraPartsProfiles::
+@@ -233,7 +233,6 @@ void ChromeBrowserMainExtraPartsProfiles::
#if BUILDFLAG(ENABLE_CAPTIVE_PORTAL_DETECTION)
CaptivePortalServiceFactory::GetInstance();
#endif
@@ -719,7 +719,7 @@ diff --git a/chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc
diff --git a/chrome/browser/profiles/profile_impl.cc b/chrome/browser/profiles/profile_impl.cc
--- a/chrome/browser/profiles/profile_impl.cc
+++ b/chrome/browser/profiles/profile_impl.cc
-@@ -536,18 +536,6 @@ ProfileImpl::ProfileImpl(
+@@ -549,18 +549,6 @@ ProfileImpl::ProfileImpl(
create_mode == CREATE_MODE_SYNCHRONOUS);
#endif
@@ -738,7 +738,7 @@ diff --git a/chrome/browser/profiles/profile_impl.cc b/chrome/browser/profiles/p
content::BrowserContext::Initialize(this, path_);
{
-@@ -556,7 +544,7 @@ ProfileImpl::ProfileImpl(
+@@ -569,7 +557,7 @@ ProfileImpl::ProfileImpl(
->CreateDelegate();
delegate->InitPrefRegistry(pref_registry_.get());
prefs_ = chrome_prefs::CreateProfilePrefs(
@@ -758,7 +758,7 @@ diff --git a/chrome/browser/safe_browsing/BUILD.gn b/chrome/browser/safe_browsin
sources = [
"safe_browsing_controller_client.cc",
"safe_browsing_controller_client.h",
-@@ -74,6 +75,7 @@ static_library("safe_browsing") {
+@@ -75,6 +76,7 @@ static_library("safe_browsing") {
} else {
sources += [ "chrome_cleaner/chrome_cleaner_extension_util_win_noop.cc" ]
}
@@ -801,7 +801,7 @@ diff --git a/chrome/browser/ssl/cert_report_helper.cc b/chrome/browser/ssl/cert_
- ssl_cert_reporter_->ReportInvalidCertificateChain(serialized_report);
}
- bool CertReportHelper::IsShowingReportingCheckboxOrReportingAllowed() {
+ bool CertReportHelper::ShouldShowCertificateReporterCheckbox() {
diff --git a/chrome/browser/ssl/security_state_tab_helper.cc b/chrome/browser/ssl/security_state_tab_helper.cc
--- a/chrome/browser/ssl/security_state_tab_helper.cc
+++ b/chrome/browser/ssl/security_state_tab_helper.cc
@@ -911,7 +911,7 @@ diff --git a/chrome/browser/subresource_filter/chrome_subresource_filter_client.
diff --git a/chrome/browser/ui/BUILD.gn b/chrome/browser/ui/BUILD.gn
--- a/chrome/browser/ui/BUILD.gn
+++ b/chrome/browser/ui/BUILD.gn
-@@ -2444,7 +2444,6 @@ jumbo_split_static_library("ui") {
+@@ -2420,7 +2420,6 @@ jumbo_split_static_library("ui") {
"views/cookie_info_view.h",
"views/device_chooser_content_view.cc",
"views/device_chooser_content_view.h",
@@ -922,7 +922,7 @@ diff --git a/chrome/browser/ui/BUILD.gn b/chrome/browser/ui/BUILD.gn
diff --git a/chrome/browser/ui/tab_helpers.cc b/chrome/browser/ui/tab_helpers.cc
--- a/chrome/browser/ui/tab_helpers.cc
+++ b/chrome/browser/ui/tab_helpers.cc
-@@ -242,8 +242,6 @@ void TabHelpers::AttachTabHelpers(WebContents* web_contents) {
+@@ -244,8 +244,6 @@ void TabHelpers::AttachTabHelpers(WebContents* web_contents) {
PreviewsUITabHelper::CreateForWebContents(web_contents);
RecentlyAudibleHelper::CreateForWebContents(web_contents);
ResourceLoadingHintsWebContentsObserver::CreateForWebContents(web_contents);
@@ -931,7 +931,7 @@ diff --git a/chrome/browser/ui/tab_helpers.cc b/chrome/browser/ui/tab_helpers.cc
SearchEngineTabHelper::CreateForWebContents(web_contents);
SecurityStateTabHelper::CreateForWebContents(web_contents);
if (SiteEngagementService::IsEnabled())
-@@ -297,9 +295,6 @@ void TabHelpers::AttachTabHelpers(WebContents* web_contents) {
+@@ -298,9 +296,6 @@ void TabHelpers::AttachTabHelpers(WebContents* web_contents) {
new ChromePDFWebContentsHelperClient()));
PluginObserver::CreateForWebContents(web_contents);
SadTabHelper::CreateForWebContents(web_contents);
@@ -944,7 +944,7 @@ diff --git a/chrome/browser/ui/tab_helpers.cc b/chrome/browser/ui/tab_helpers.cc
diff --git a/chrome/browser/ui/webui/interstitials/interstitial_ui.cc b/chrome/browser/ui/webui/interstitials/interstitial_ui.cc
--- a/chrome/browser/ui/webui/interstitials/interstitial_ui.cc
+++ b/chrome/browser/ui/webui/interstitials/interstitial_ui.cc
-@@ -251,6 +251,7 @@ BadClockBlockingPage* CreateBadClockBlockingPage(
+@@ -250,6 +250,7 @@ BadClockBlockingPage* CreateBadClockBlockingPage(
base::Callback());
}
@@ -952,7 +952,7 @@ diff --git a/chrome/browser/ui/webui/interstitials/interstitial_ui.cc b/chrome/b
safe_browsing::SafeBrowsingBlockingPage* CreateSafeBrowsingBlockingPage(
content::WebContents* web_contents) {
safe_browsing::SBThreatType threat_type =
-@@ -309,7 +310,9 @@ safe_browsing::SafeBrowsingBlockingPage* CreateSafeBrowsingBlockingPage(
+@@ -308,7 +309,9 @@ safe_browsing::SafeBrowsingBlockingPage* CreateSafeBrowsingBlockingPage(
g_browser_process->safe_browsing_service()->ui_manager().get(),
web_contents, main_frame_url, resource);
}
@@ -962,7 +962,7 @@ diff --git a/chrome/browser/ui/webui/interstitials/interstitial_ui.cc b/chrome/b
TestSafeBrowsingBlockingPageQuiet* CreateSafeBrowsingQuietBlockingPage(
content::WebContents* web_contents) {
safe_browsing::SBThreatType threat_type =
-@@ -361,6 +364,7 @@ TestSafeBrowsingBlockingPageQuiet* CreateSafeBrowsingQuietBlockingPage(
+@@ -360,6 +363,7 @@ TestSafeBrowsingBlockingPageQuiet* CreateSafeBrowsingQuietBlockingPage(
g_browser_process->safe_browsing_service()->ui_manager().get(),
web_contents, main_frame_url, resource, is_giant_webview);
}
@@ -970,8 +970,8 @@ diff --git a/chrome/browser/ui/webui/interstitials/interstitial_ui.cc b/chrome/b
#if BUILDFLAG(ENABLE_CAPTIVE_PORTAL_DETECTION)
CaptivePortalBlockingPage* CreateCaptivePortalBlockingPage(
-@@ -465,8 +469,6 @@ void InterstitialHTMLSource::StartDataRequest(
- CreateSSLBlockingPage(web_contents, true /* is superfish */));
+@@ -460,8 +464,6 @@ void InterstitialHTMLSource::StartDataRequest(
+ interstitial_delegate.reset(CreateSSLBlockingPage(web_contents));
} else if (path_without_query == "/mitm-software-ssl") {
interstitial_delegate.reset(CreateMITMSoftwareBlockingPage(web_contents));
- } else if (path_without_query == "/safebrowsing") {
@@ -979,7 +979,7 @@ diff --git a/chrome/browser/ui/webui/interstitials/interstitial_ui.cc b/chrome/b
} else if (path_without_query == "/clock") {
interstitial_delegate.reset(CreateBadClockBlockingPage(web_contents));
#if BUILDFLAG(ENABLE_CAPTIVE_PORTAL_DETECTION)
-@@ -477,11 +479,6 @@ void InterstitialHTMLSource::StartDataRequest(
+@@ -472,11 +474,6 @@ void InterstitialHTMLSource::StartDataRequest(
if (path_without_query == "/supervised_user") {
html = GetSupervisedUserInterstitialHTML(path);
@@ -1092,7 +1092,7 @@ diff --git a/chrome/browser/ui/webui/md_downloads/md_downloads_dom_handler.h b/c
diff --git a/chrome/renderer/chrome_content_renderer_client.cc b/chrome/renderer/chrome_content_renderer_client.cc
--- a/chrome/renderer/chrome_content_renderer_client.cc
+++ b/chrome/renderer/chrome_content_renderer_client.cc
-@@ -79,7 +79,6 @@
+@@ -80,7 +80,6 @@
#include "components/error_page/common/localized_error.h"
#include "components/network_hints/renderer/prescient_networking_dispatcher.h"
#include "components/pdf/renderer/pepper_pdf_host.h"
@@ -1103,8 +1103,8 @@ diff --git a/chrome/renderer/chrome_content_renderer_client.cc b/chrome/renderer
diff --git a/components/safe_browsing/features.cc b/components/safe_browsing/features.cc
--- a/components/safe_browsing/features.cc
+++ b/components/safe_browsing/features.cc
-@@ -46,7 +46,7 @@ const base::Feature kInspectDownloadedRarFiles{
- "InspectDownloadedRarFiles", base::FEATURE_DISABLED_BY_DEFAULT};
+@@ -40,7 +40,7 @@ const base::Feature kForceEnableResetPasswordWebUI{
+ "ForceEnableResetPasswordWebUI", base::FEATURE_DISABLED_BY_DEFAULT};
const base::Feature kSuspiciousSiteTriggerQuotaFeature{
- "SafeBrowsingSuspiciousSiteTriggerQuota", base::FEATURE_ENABLED_BY_DEFAULT};
diff --git a/build/patches/updater-disable-updater-pings.patch b/build/patches/updater-disable-updater-pings.patch
index a1c2b93e..f729ba9b 100644
--- a/build/patches/updater-disable-updater-pings.patch
+++ b/build/patches/updater-disable-updater-pings.patch
@@ -14,7 +14,7 @@ Chromium would still send background requests. Kill it.
diff --git a/components/component_updater/component_updater_url_constants.cc b/components/component_updater/component_updater_url_constants.cc
--- a/components/component_updater/component_updater_url_constants.cc
+++ b/components/component_updater/component_updater_url_constants.cc
-@@ -15,9 +15,9 @@ namespace component_updater {
+@@ -15,10 +15,10 @@ namespace component_updater {
// The value of |kDefaultUrlSource| can be overridden with
// --component-updater=url-source=someurl.
const char kUpdaterDefaultUrl[] =
@@ -25,11 +25,12 @@ diff --git a/components/component_updater/component_updater_url_constants.cc b/c
- "http://update.googleapis.com/service/update2";
+ "about:blank";
- } // namespace component_updater
+ extern const char kUpdaterJSONDefaultUrl[] =
+ "https://update.googleapis.com/service/update2/json";
diff --git a/components/component_updater/configurator_impl.cc b/components/component_updater/configurator_impl.cc
--- a/components/component_updater/configurator_impl.cc
+++ b/components/component_updater/configurator_impl.cc
-@@ -39,8 +39,7 @@ ConfiguratorImpl::ConfiguratorImpl(
+@@ -48,8 +48,7 @@ ConfiguratorImpl::ConfiguratorImpl(
: background_downloads_enabled_(config_policy.BackgroundDownloadsEnabled()),
deltas_enabled_(config_policy.DeltaUpdatesEnabled()),
fast_update_(config_policy.FastUpdate()),
@@ -38,11 +39,11 @@ diff --git a/components/component_updater/configurator_impl.cc b/components/comp
+ pings_enabled_(false),
url_source_override_(config_policy.UrlSourceOverride()),
initial_delay_(config_policy.InitialDelay()) {
- if (config_policy.TestRequest())
-@@ -73,8 +72,6 @@ std::vector ConfiguratorImpl::UpdateUrl() const {
- }
-
- std::vector urls{GURL(kUpdaterDefaultUrl), GURL(kUpdaterFallbackUrl)};
+ if (config_policy.TestRequest()) {
+@@ -88,8 +87,6 @@ std::vector ConfiguratorImpl::UpdateUrl() const {
+ GURL(kUpdaterJSONFallbackUrl)}
+ : std::vector{GURL(kUpdaterDefaultUrl),
+ GURL(kUpdaterFallbackUrl)};
- if (require_encryption_)
- update_client::RemoveUnsecureUrls(&urls);
@@ -51,7 +52,7 @@ diff --git a/components/component_updater/configurator_impl.cc b/components/comp
diff --git a/components/component_updater/configurator_impl.h b/components/component_updater/configurator_impl.h
--- a/components/component_updater/configurator_impl.h
+++ b/components/component_updater/configurator_impl.h
-@@ -95,7 +95,6 @@ class ConfiguratorImpl {
+@@ -102,7 +102,6 @@ class ConfiguratorImpl {
const bool deltas_enabled_;
const bool fast_update_;
const bool pings_enabled_;
diff --git a/build/patches_list.txt b/build/patches_list.txt
index b8fc55a6..8c718720 100644
--- a/build/patches_list.txt
+++ b/build/patches_list.txt
@@ -7,7 +7,7 @@ updater-disable-updater-pings.patch
prefs-only-keep-cookies-until-exit.patch
Remove-EV-certificates.patch
promo-disable-Google-promotion-fetching.patch
-Disables-omission-of-URL-elements-in-Omnibox.patch
+Disable-omission-of-URL-elements-in-Omnibox.patch
Modify-default-preferences.patch
Disable-contextual-search-by-default.patch
Disable-hyperlink-auditing-by-default.patch
@@ -35,7 +35,6 @@ ungoogled-chromium-Disable-GCM.patch
ungoogled-chromium-Disable-Gaia.patch
ungoogled-chromium-Disable-domain-reliability.patch
ungoogled-chromium-Disable-Network-Time-Tracker.patch
-ungoogled-chromium-Remove-third_party-analytics.patch
ungoogled-chromium-Always-use-local-DevTools-files-instead-of-remote-files-from-Google.patch
safe_browsing-disable-incident-reporting.patch
safe_browsing-disable-reporting-of-safebrowsing-override.patch
@@ -106,5 +105,5 @@ Enable-TLS-1.3-final-by-default.patch
Do-not-grant-notifications-to-default-search-engine.patch
Add-flag-to-disable-IPv6-probes.patch
Add-a-proxy-configuration-page.patch
-Revert-Download-location-android-Check-SD-card-before-showing-location-dialog.patch
+Do-not-ignore-download-location-prompt-setting.patch
Disable-previews-by-default.patch