From c81b17388b25c9d2340a6cacc6462e5f95afa75f Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Tue, 30 Jul 2019 17:29:13 +0300 Subject: [PATCH] chromium: Cherrypick patches from ungoogled-chromium and friends. --- testing/chromium/build | 52 +- testing/chromium/checksums | 34 + ...03-disable-autofill-download-manager.patch | 73 ++ .../0004-disable-google-url-tracker.patch | 98 +++ .../0005-disable-default-extensions.patch | 121 ++++ .../patches/0006-modify-default-prefs.patch | 248 +++++++ .../0007-disable-web-resource-service.patch | 52 ++ .../patches/0008-restore-classic-ntp.patch | 53 ++ .../0009-disable-google-ipv6-probes.patch | 16 + .../0010-disable-gcm-status-check.patch | 87 +++ .../0014-disable-translation-lang-fetch.patch | 61 ++ .../patches/0015-disable-update-pings.patch | 18 + .../0019-disable-battery-status-service.patch | 102 +++ .../chromium/patches/0021-disable-rlz.patch | 12 + testing/chromium/patches/android.patch | 24 + .../patches/device-notifications.patch | 16 + .../patches/disable-crash-reporter.patch | 56 ++ .../patches/disable-domain-reliability.patch | 660 ++++++++++++++++++ .../patches/disable-download-quarantine.patch | 98 +++ .../disable-fetching-field-trials.patch | 66 ++ .../disable-fonts-googleapis-references.patch | 107 +++ testing/chromium/patches/disable-gaia.patch | 138 ++++ testing/chromium/patches/disable-gcm.patch | 28 + .../disable-google-host-detection.patch | 588 ++++++++++++++++ .../patches/disable-mei-preload.patch | 25 + .../disable-network-time-tracker.patch | 16 + .../patches/disable-webrtc-log-uploader.patch | 112 +++ ...g-without-mdns-and-service-discovery.patch | 53 ++ .../fix-building-without-safebrowsing.patch | 74 ++ testing/chromium/patches/fuzzers.patch | 40 ++ .../chromium/patches/google-api-warning.patch | 16 + testing/chromium/patches/perfetto.patch | 14 + ..._browsing-disable-incident-reporting.patch | 75 ++ ...sable-reporting-of-safebrowsing-over.patch | 209 ++++++ testing/chromium/patches/unrar.patch | 87 +++ testing/chromium/patches/welcome-page.patch | 15 + testing/chromium/sources | 34 + 37 files changed, 3575 insertions(+), 3 deletions(-) create mode 100644 testing/chromium/patches/0003-disable-autofill-download-manager.patch create mode 100644 testing/chromium/patches/0004-disable-google-url-tracker.patch create mode 100644 testing/chromium/patches/0005-disable-default-extensions.patch create mode 100644 testing/chromium/patches/0006-modify-default-prefs.patch create mode 100644 testing/chromium/patches/0007-disable-web-resource-service.patch create mode 100644 testing/chromium/patches/0008-restore-classic-ntp.patch create mode 100644 testing/chromium/patches/0009-disable-google-ipv6-probes.patch create mode 100644 testing/chromium/patches/0010-disable-gcm-status-check.patch create mode 100644 testing/chromium/patches/0014-disable-translation-lang-fetch.patch create mode 100644 testing/chromium/patches/0015-disable-update-pings.patch create mode 100644 testing/chromium/patches/0019-disable-battery-status-service.patch create mode 100644 testing/chromium/patches/0021-disable-rlz.patch create mode 100644 testing/chromium/patches/android.patch create mode 100644 testing/chromium/patches/device-notifications.patch create mode 100644 testing/chromium/patches/disable-crash-reporter.patch create mode 100644 testing/chromium/patches/disable-domain-reliability.patch create mode 100644 testing/chromium/patches/disable-download-quarantine.patch create mode 100644 testing/chromium/patches/disable-fetching-field-trials.patch create mode 100644 testing/chromium/patches/disable-fonts-googleapis-references.patch create mode 100644 testing/chromium/patches/disable-gaia.patch create mode 100644 testing/chromium/patches/disable-gcm.patch create mode 100644 testing/chromium/patches/disable-google-host-detection.patch create mode 100644 testing/chromium/patches/disable-mei-preload.patch create mode 100644 testing/chromium/patches/disable-network-time-tracker.patch create mode 100644 testing/chromium/patches/disable-webrtc-log-uploader.patch create mode 100644 testing/chromium/patches/fix-building-without-mdns-and-service-discovery.patch create mode 100644 testing/chromium/patches/fix-building-without-safebrowsing.patch create mode 100644 testing/chromium/patches/fuzzers.patch create mode 100644 testing/chromium/patches/google-api-warning.patch create mode 100644 testing/chromium/patches/perfetto.patch create mode 100644 testing/chromium/patches/safe_browsing-disable-incident-reporting.patch create mode 100644 testing/chromium/patches/safe_browsing-disable-reporting-of-safebrowsing-over.patch create mode 100644 testing/chromium/patches/unrar.patch create mode 100644 testing/chromium/patches/welcome-page.patch diff --git a/testing/chromium/build b/testing/chromium/build index 98aab161..1e2f69f5 100755 --- a/testing/chromium/build +++ b/testing/chromium/build @@ -1,5 +1,48 @@ #!/bin/sh -e +pkg_dir=$1 + +set -- \ + blink_symbol_level=0 \ + clang_use_chrome_plugins=false \ + closure_compile=false \ + custom_toolchain=\"//build/toolchain/linux/unbundle:default\" \ + enable_mds=false \ + enable_nacl=false \ + enable_nacl_nonsfi=false \ + enable_reading_list=false \ + enable_remoting=false \ + enable_reporting=false \ + enable_service_discovery=false \ + enable_swiftshader=false \ + fatal_linker_warnings=false \ + host_toolchain=\"//build/toolchain/linux/unbundle:default\" \ + is_clang=false \ + is_debug=false \ + linux_use_bundled_binutils=false \ + rtc_use_x11=true \ + safe_browsing_mode=0 \ + symbol_level=0 \ + treat_warnings_as_errors=false \ + use_allocator=\"none\" \ + use_allocator_shim=false \ + use_atk=false \ + use_cups=false \ + use_custom_libcxx=false \ + use_dbus=false \ + use_gio=false \ + use_gnome_keyring=false \ + use_gold=false \ + use_jumbo_build=true \ + jumbo_file_merge_limit=8 \ + use_kerberos=false \ + use_lld=false \ + use_pulseaudio=false \ + use_sysroot=false \ + use_system_harfbuzz=true \ + use_official_google_api_keys=false \ + use_unofficial_version_number=false + for patch in *.patch; do patch -p1 < "$patch" done @@ -40,8 +83,7 @@ done python2 build/linux/unbundle/replace_gn_files.py \ --system-libraries ffmpeg fontconfig harfbuzz-ng libdrm libevent libjpeg libpng libwebp libxml libxslt opus re2 snappy yasm -python2 tools/gn/bootstrap/bootstrap.py -s -v \ - --gn-gen-args 'is_debug=false use_jumbo_build=true enable_nacl=false symbol_level=0 blink_symbol_level=0 enable_nacl_nonsfi=false use_gold=false treat_warnings_as_errors=false fatal_linker_warnings=false use_sysroot=false use_cups=false rtc_use_x11=true is_clang=false use_atk=false use_dbus=false safe_browsing_mode=0 use_pulseaudio=false use_gio=false use_gnome_keyring=false use_kerberos=false use_allocator="none" use_allocator_shim=false use_system_harfbuzz=true clang_use_chrome_plugins=false custom_toolchain="//build/toolchain/linux/unbundle:default" host_toolchain="//build/toolchain/linux/unbundle:default" linux_use_bundled_binutils=false use_custom_libcxx=false use_lld=false closure_compile=false' +python2 tools/gn/bootstrap/bootstrap.py -s -v --gn-gen-args "$*" out/Release/gn gen out/Release \ --script-executable=/usr/bin/python2 @@ -51,5 +93,9 @@ ninja -C out/Release chrome chromedriver cd out/Release for bin in chrome chromedriver *.bin; do - install -Dm755 "$bin" "$1/usr/lib/chromium/$bin" + install -Dm755 "$bin" "$pkg_dir/usr/lib/chromium/$bin" done + +mkdir -p "$pkg_dir/usr/bin" +ln -s /usr/lib/chromium/chrome "$pkg_dir/usr/bin/chrome" +ln -s /usr/lib/chromium/chromedriver "$pkg_dir/usr/bin/chromedriver" diff --git a/testing/chromium/checksums b/testing/chromium/checksums index c8f012b8..a61eb3d4 100644 --- a/testing/chromium/checksums +++ b/testing/chromium/checksums @@ -1,4 +1,17 @@ 510e6ca7ccc218b401b375c13656f6aecab196b03142026dc3602b9d1804a5ac chromium-75.0.3770.142.tar.xz +bc2a44c2f3574f5997e54e4088e1644bcffaa6f541cd729a32bf94ea05dd10bb 0003-disable-autofill-download-manager.patch +4a27dea88e61e1ba607cc9868ecba60882759ea608299c42ce59b821f0e17d8a 0004-disable-google-url-tracker.patch +1dc7e3f22cd81ca85ea9f3240cc6adb90f111477c9cc05efcfe4943a2dcf9f6e 0005-disable-default-extensions.patch +a15de5b30ad7d77358116faf1e40a82dec2f43da25f51a44e8e265b161ab8da0 0006-modify-default-prefs.patch +22cc3b5e1032a170c958213f546a1dc48fd9433823767b0159d40f930a0b3029 0007-disable-web-resource-service.patch +a7728ea22805f69ce9a16a35ae067fe570825e8154bdb66b18bb072289c5589e 0008-restore-classic-ntp.patch +e7d182028feb9d6790e7a849671c4c79a833909fdb2c48f3b11272ea53c127cc 0009-disable-google-ipv6-probes.patch +3f40d4f1a0f7a03945c80e6ffd417ca93e4f7f22ee09faaa71a058e6e246786f 0010-disable-gcm-status-check.patch +52dc08f76953323413eefded936b7fa3e3bc69ba75e2a74b80455d3da5e708a8 0014-disable-translation-lang-fetch.patch +b5e0f354ebf44075899d3161f808e2e070194377c7f801935e49200ca4bae9c0 0015-disable-update-pings.patch +ed7c8ebaa0ee44d4775c0bfb097a22340e30d2d78546f223fbc8e8da4e457686 0019-disable-battery-status-service.patch +80e6512b928082a0b59465e1dcbab5e6284b545933f42d262194b1a86811a243 0021-disable-rlz.patch +45e970e285ceb599c15aa7184f6f86061abd4de6c58a985678bfb6cc68464c77 android.patch ece2d462169429541a7fa1cc7f3f72698e883292500dde6f1c64ce165dd6abd9 chromium-75-fix-gn-gen.patch b386cb54d0229c640cc44012a9dbb0b822c979810a62be92dc44e1a3c8a457d3 chromium-75-gcc-angle-fix.patch 1830b37534e2adf7fd22569c1bbe10eb29bcf85bd9437dc5039c91e7097dc627 chromium-75-llvm8.patch @@ -12,6 +25,22 @@ daa26bab3a3a9f8b8539dffefa7a07f6d7ac07476d7ae762e3f0169985e429ff chromium-fix-c 6592a17ac557d4cdd5dbb9cd2445c95c1668f17d8c95a7f5ebf42ebbde35430e chromium-optional-dbus-r5.patch f0e59aee57bffc87ab8d51f1f893ec8ed561769328352a9124f717e886b8054f chromium-url-formatter.patch 8c6ecc26aab9f4acc911350d9bb1e40f32cad144b6a08c9d7b188e9598d0f2de chromium-widevine-r4.patch +85f819beee54b6a87d63d59dd0094885dccf0b7cbed7efe6b90b9f6b5cbb78e9 device-notifications.patch +2907556a180098f02e945ee4f8dce1f0ff6f84362328700a4a23fb195b324266 disable-crash-reporter.patch +13ee937555d20af557a18029a7cfde0f387c542f2bfe75bdb9b9b85187cec9ee disable-domain-reliability.patch +a1422d23da46e2dc39974dbe25787e5040e0dd1104806a796d5776af80cf0bb4 disable-download-quarantine.patch +cba503f5d3d776c951c5ee20eaa0a17d48fb5981823dd8118f9d48e61b42d411 disable-fetching-field-trials.patch +3ab3ef00886f89da2802b16ad8cebde881b26dbcbb0f1b1b6563dcede0a627d3 disable-fonts-googleapis-references.patch +39ea6f6e39f91249f5a89324f083863b934171eeb67667e26a2863e91af2b578 disable-gaia.patch +64d6c33f565c6fc1702fcc97af56ecbc3564fa8b5591d73f554ec48d97fc73fd disable-gcm.patch +ef924778ebfc2462b8b12f49e32dff00adc2883af344c3895e5026b11d36c4f1 disable-google-host-detection.patch +ce6a00f2c31dfc6b06154ca9db9ccda5b42bc9965f861d9978bc202ee2549c01 disable-mei-preload.patch +599ba1f2bb26b6afd81fc207181dfd95368ad10992b40a6752999fe12f7ea837 disable-network-time-tracker.patch +a4d5cc75a9979d13a368d22c8281c80a2c025629b6145ee0aacafef56da4c5d9 disable-webrtc-log-uploader.patch +d0059ab268e3d2030f9e2d2b36b16f3e68bdb3353a98b07f974d3c353fa7238f fix-building-without-mdns-and-service-discovery.patch +5b698ada72c4afe56271d6397c49367ec8614c664fd294cc7d43705eb4306ac6 fix-building-without-safebrowsing.patch +760a9fd65492138fa9ccf57aa5579f8f66d0e593582ac930dcc0cbe54076b166 fuzzers.patch +9248bae6df77f701afc9ecd36a6e2901649a4a5edf106475e4f26f623cd31892 google-api-warning.patch 6d921355eaef7101a0713e0e7a88b7a7c4e8aa28391325399fdd0a59f2358d13 musl-cdefs-r2.patch fec5590225bf3d0238ee45f8f67fcb032946abe351383653c3026ce4e706d48f musl-dlopen.patch f1375a3acd205ee46dd5d7c729e09d19982833f71e5eb1fb9c3ec5d3de5ffe90 musl-dns-r2.patch @@ -33,3 +62,8 @@ ebde3be74f0db9486cf99cd7faafb29f1472f432046b8801c494cff5713c8d94 musl-sandbox-r a4b0374c536128483cdaeb706f2b1a7144168ae6e44d9ca2df7445d1be780afc musl-ucontext-r1.patch 72d806af57a729d36b1eb482419245fba4c58d035fc20e58dbbcf88c35d50e97 musl-v8-monotonic-pthread-cont_timedwait.patch e191334207865e43b831492913d58cae4c89449d32b362b9f9aa7e1d196837a9 musl-wordsize-r1.patch +b07a4903f150da643320012880622b6d52c0ccf1e85d3425240188277ee546ef perfetto.patch +77ece26615320e5ffbda4ba2dcfc3a184cba923a1be19fc031fa5edb56e59632 safe_browsing-disable-incident-reporting.patch +5f8d6876420bd9a5c208d432a82a4faa78f43d24fe5b425a8f6a0a475bc4e8dd safe_browsing-disable-reporting-of-safebrowsing-over.patch +3f55f3ed81f4d967b8eb45655ddbdd3a59da3d69dbf1999a9335b199c84d1c9d unrar.patch +815a2a41003747bb6b44df192af4650e9ea0fe2dc87bb689a9bbb6e7a2c3eddd welcome-page.patch diff --git a/testing/chromium/patches/0003-disable-autofill-download-manager.patch b/testing/chromium/patches/0003-disable-autofill-download-manager.patch new file mode 100644 index 00000000..8d06f132 --- /dev/null +++ b/testing/chromium/patches/0003-disable-autofill-download-manager.patch @@ -0,0 +1,73 @@ +--- a/components/autofill/core/browser/autofill_download_manager.cc ++++ b/components/autofill/core/browser/autofill_download_manager.cc +@@ -703,70 +703,6 @@ AutofillDownloadManager::GetRequestURLAn + } + + bool AutofillDownloadManager::StartRequest(FormRequestData request_data) { +- scoped_refptr url_loader_factory = +- driver_->GetURLLoaderFactory(); +- DCHECK(url_loader_factory); +- +- // Get the URL and method to use for this request. +- std::string method; +- GURL request_url; +- std::tie(request_url, method) = +- UseApi() ? GetRequestURLAndMethodForApi(request_data) +- : GetRequestURLAndMethod(request_data); +- +- auto resource_request = std::make_unique(); +- resource_request->url = request_url; +- resource_request->load_flags = +- net::LOAD_DO_NOT_SEND_COOKIES | net::LOAD_DO_NOT_SAVE_COOKIES; +- resource_request->method = method; +- +- // Add Chrome experiment state to the request headers. +- variations::AppendVariationsHeaderUnknownSignedIn( +- request_url, +- driver_->IsIncognito() ? variations::InIncognito::kYes +- : variations::InIncognito::kNo, +- resource_request.get()); +- +- // Set headers specific to the API if using it. +- if (UseApi()) +- // Encode response serialized proto in base64 for safety. +- resource_request->headers.SetHeader(kGoogEncodeResponseIfExecutable, +- "base64"); +- +- // Put API key in request's header if a key exists, and the endpoint is +- // trusted by Google. +- if (!api_key_.empty() && request_url.SchemeIs(url::kHttpsScheme) && +- google_util::IsGoogleAssociatedDomainUrl(request_url)) { +- resource_request->headers.SetHeader(kGoogApiKey, api_key_); +- } +- +- auto simple_loader = network::SimpleURLLoader::Create( +- std::move(resource_request), +- GetNetworkTrafficAnnotation(request_data.request_type)); +- +- // This allows reading the error message within the API response when status +- // is not 200 (e.g., 400). Otherwise, URL loader will not give any content in +- // the response when there is a failure, which makes debugging hard. +- simple_loader->SetAllowHttpErrorResults(true); +- +- if (method == "POST") { +- const std::string content_type = +- UseApi() ? "application/x-protobuf" : "text/proto"; +- // Attach payload data and add data format header. +- simple_loader->AttachStringForUpload(request_data.payload, content_type); +- } +- +- // Transfer ownership of the loader into url_loaders_. Temporarily hang +- // onto the raw pointer to use it as a key and to kick off the request; +- // transferring ownership (std::move) invalidates the |simple_loader| +- // variable. +- auto* raw_simple_loader = simple_loader.get(); +- url_loaders_.push_back(std::move(simple_loader)); +- raw_simple_loader->DownloadToStringOfUnboundedSizeUntilCrashAndDie( +- url_loader_factory.get(), +- base::BindOnce(&AutofillDownloadManager::OnSimpleLoaderComplete, +- base::Unretained(this), std::move(--url_loaders_.end()), +- std::move(request_data), base::TimeTicks::Now())); + return true; + } + diff --git a/testing/chromium/patches/0004-disable-google-url-tracker.patch b/testing/chromium/patches/0004-disable-google-url-tracker.patch new file mode 100644 index 00000000..0d46ade8 --- /dev/null +++ b/testing/chromium/patches/0004-disable-google-url-tracker.patch @@ -0,0 +1,98 @@ +--- a/components/google/core/browser/google_url_tracker.cc ++++ b/components/google/core/browser/google_url_tracker.cc +@@ -25,9 +25,9 @@ + #include "services/network/public/cpp/simple_url_loader.h" + + const char GoogleURLTracker::kDefaultGoogleHomepage[] = +- "https://www.google.com/"; ++ ""; + const char GoogleURLTracker::kSearchDomainCheckURL[] = +- "https://www.google.com/searchdomaincheck?format=domain&type=chrome"; ++ ""; + const base::Feature GoogleURLTracker::kNoSearchDomainCheck{ + "NoSearchDomainCheck", base::FEATURE_DISABLED_BY_DEFAULT}; + +@@ -148,83 +148,4 @@ void GoogleURLTracker::FinishSleep() { + } + + void GoogleURLTracker::StartLoadIfDesirable() { +- // Bail if a load isn't appropriate right now. This function will be called +- // again each time one of the preconditions changes, so we'll load +- // immediately once all of them are met. +- // +- // See comments in header on the class, on RequestServerCheck(), and on the +- // various members here for more detail on exactly what the conditions are. +- if (in_startup_sleep_ || already_loaded_ || !need_to_load_) +- return; +- +- // Some switches should disable the Google URL tracker entirely. If we can't +- // do background networking, we can't do the necessary load, and if the user +- // specified a Google base URL manually, we shouldn't bother to look up any +- // alternatives or offer to switch to them. +- if (!client_->IsBackgroundNetworkingEnabled() || +- base::CommandLine::ForCurrentProcess()->HasSwitch( +- switches::kGoogleBaseURL)) +- return; +- +- already_loaded_ = true; +- net::NetworkTrafficAnnotationTag traffic_annotation = +- net::DefineNetworkTrafficAnnotation("google_url_tracker", R"( +- semantics { +- sender: "Google URL Tracker" +- description: +- "When the user's default search engine is Google, or Google " +- "services are used to resolve navigation errors, the browser needs " +- "to know the ideal origin for requests to Google services. In " +- "these cases the browser makes a request to a global Google " +- "service that returns this origin, potentially taking into account " +- "the user's cookies or IP address." +- trigger: "Browser startup or network change." +- data: "None." +- destination: GOOGLE_OWNED_SERVICE +- } +- policy { +- cookies_allowed: YES +- cookies_store: "user" +- setting: +- "To disable this check, users can change the default search engine " +- "to something other than Google, and disable 'Use a web service to " +- "help resolve navigation errors' in Chromium's settings under " +- "Privacy.\nAlternately, running Chromium with " +- "--google-base-url=\"https://www.google.com/\" will disable this, " +- "and force Chromium to use the specified URL for Google service " +- "requests.\nFinally, running Chromium with " +- "--disable-background-networking will disable this, as well as " +- "various other features that make network requests automatically." +- policy_exception_justification: +- "Setting DefaultSearchProviderEnabled Chrome settings policy to " +- "false suffices as a way of setting the default search engine to " +- "not be Google. But there is no policy that controls navigation " +- "error resolution." +- })"); +- auto resource_request = std::make_unique(); +- resource_request->url = GURL(kSearchDomainCheckURL); +- // We don't want this load to set new entries in the cache or cookies, lest +- // we alarm the user. +- resource_request->load_flags = +- (net::LOAD_DISABLE_CACHE | net::LOAD_DO_NOT_SAVE_COOKIES); +- simple_loader_ = network::SimpleURLLoader::Create(std::move(resource_request), +- traffic_annotation); +- // Configure to retry at most kMaxRetries times for 5xx errors and network +- // changes. +- // A network change can propagate through Chrome in various stages, so it's +- // possible for this code to be reached via OnNetworkChanged(), and then have +- // the load we kick off be canceled due to e.g. the DNS server changing at a +- // later time. In general it's not possible to ensure that by the time we +- // reach here any requests we start won't be canceled in this fashion, so +- // retrying is the best we can do. +- static const int kMaxRetries = 5; +- simple_loader_->SetRetryOptions( +- kMaxRetries, +- network::SimpleURLLoader::RetryMode::RETRY_ON_5XX | +- network::SimpleURLLoader::RetryMode::RETRY_ON_NETWORK_CHANGE); +- simple_loader_->DownloadToString( +- client_->GetURLLoaderFactory(), +- base::BindOnce(&GoogleURLTracker::OnURLLoaderComplete, +- base::Unretained(this)), +- 2 * 1024 /* max_body_size */); + } diff --git a/testing/chromium/patches/0005-disable-default-extensions.patch b/testing/chromium/patches/0005-disable-default-extensions.patch new file mode 100644 index 00000000..d40615e0 --- /dev/null +++ b/testing/chromium/patches/0005-disable-default-extensions.patch @@ -0,0 +1,121 @@ +--- a/chrome/browser/extensions/component_loader.cc ++++ b/chrome/browser/extensions/component_loader.cc +@@ -345,11 +345,6 @@ void ComponentLoader::AddWebStoreApp() { + if (!IsNormalSession()) + return; + #endif +- +- AddWithNameAndDescription( +- IDR_WEBSTORE_MANIFEST, base::FilePath(FILE_PATH_LITERAL("web_store")), +- l10n_util::GetStringUTF8(IDS_WEBSTORE_NAME_STORE), +- l10n_util::GetStringUTF8(IDS_WEBSTORE_APP_DESCRIPTION)); + } + + #if defined(OS_CHROMEOS) +@@ -447,11 +442,6 @@ void ComponentLoader::AddDefaultComponen + AddKeyboardApp(); + #else // defined(OS_CHROMEOS) + DCHECK(!skip_session_components); +-#if BUILDFLAG(ENABLE_PRINTING) +- // Cloud Print component app. Not required on Chrome OS. +- Add(IDR_CLOUDPRINT_MANIFEST, +- base::FilePath(FILE_PATH_LITERAL("cloud_print"))); +-#endif // BUILDFLAG(ENABLE_PRINTING) + #endif // defined(OS_CHROMEOS) + + if (!skip_session_components) { +@@ -536,12 +526,6 @@ void ComponentLoader::AddDefaultComponen + #if BUILDFLAG(ENABLE_HANGOUT_SERVICES_EXTENSION) + AddHangoutServicesExtension(); + #endif // BUILDFLAG(ENABLE_HANGOUT_SERVICES_EXTENSION) +- bool install_feedback = enable_background_extensions_during_testing; +-#if defined(GOOGLE_CHROME_BUILD) +- install_feedback = true; +-#endif // defined(GOOGLE_CHROME_BUILD) +- if (install_feedback) +- Add(IDR_FEEDBACK_MANIFEST, base::FilePath(FILE_PATH_LITERAL("feedback"))); + } + + #if defined(OS_CHROMEOS) +--- a/chrome/browser/extensions/external_component_loader.cc ++++ b/chrome/browser/extensions/external_component_loader.cc +@@ -29,9 +29,6 @@ ExternalComponentLoader::~ExternalCompon + + void ExternalComponentLoader::StartLoading() { + auto prefs = std::make_unique(); +-#if defined(GOOGLE_CHROME_BUILD) +- AddExternalExtension(extension_misc::kInAppPaymentsSupportAppId, prefs.get()); +-#endif // defined(GOOGLE_CHROME_BUILD) + + #if defined(OS_CHROMEOS) + { +--- a/chrome/browser/extensions/webstore_installer.cc ++++ b/chrome/browser/extensions/webstore_installer.cc +@@ -568,28 +568,6 @@ void WebstoreInstaller::DownloadNextPend + void WebstoreInstaller::DownloadCrx( + const std::string& extension_id, + InstallSource source) { +- download_url_ = GetWebstoreInstallURL(extension_id, source); +- MaybeAppendAuthUserParameter(approval_->authuser, &download_url_); +- +- base::FilePath user_data_dir; +- base::PathService::Get(chrome::DIR_USER_DATA, &user_data_dir); +- base::FilePath download_path = user_data_dir.Append(kWebstoreDownloadFolder); +- +- base::FilePath download_directory(g_download_directory_for_tests ? +- *g_download_directory_for_tests : download_path); +- +-#if defined(OS_CHROMEOS) +- // Do not use drive for extension downloads. +- if (drive::util::IsUnderDriveMountPoint(download_directory)) { +- download_directory = DownloadPrefs::FromBrowserContext( +- profile_)->GetDefaultDownloadDirectoryForProfile(); +- } +-#endif +- +- base::PostTaskAndReplyWithResult( +- GetExtensionFileTaskRunner().get(), FROM_HERE, +- base::BindOnce(&GetDownloadFilePath, download_directory, extension_id), +- base::BindOnce(&WebstoreInstaller::StartDownload, this, extension_id)); + } + + // http://crbug.com/165634 +@@ -735,28 +713,6 @@ void WebstoreInstaller::UpdateDownloadPr + } + + void WebstoreInstaller::StartCrxInstaller(const DownloadItem& download) { +- DCHECK_CURRENTLY_ON(BrowserThread::UI); +- DCHECK(!crx_installer_.get()); +- +- // The clock may be backward, e.g. daylight savings time just happenned. +- if (download.GetEndTime() >= download.GetStartTime()) { +- UMA_HISTOGRAM_TIMES("Extensions.WebstoreDownload.FileDownload", +- download.GetEndTime() - download.GetStartTime()); +- } +- ExtensionService* service = ExtensionSystem::Get(profile_)-> +- extension_service(); +- CHECK(service); +- +- const Approval* approval = GetAssociatedApproval(download); +- DCHECK(approval); +- +- crx_installer_ = download_crx_util::CreateCrxInstaller(profile_, download); +- +- crx_installer_->set_expected_id(approval->extension_id); +- crx_installer_->set_is_gallery_install(true); +- crx_installer_->set_allow_silent_install(true); +- +- crx_installer_->InstallCrx(download.GetFullPath()); + } + + void WebstoreInstaller::ReportFailure(const std::string& error, +--- a/chrome/browser/extensions/component_extensions_whitelist/whitelist.cc ++++ b/chrome/browser/extensions/component_extensions_whitelist/whitelist.cc +@@ -25,7 +25,6 @@ namespace extensions { + + bool IsComponentExtensionWhitelisted(const std::string& extension_id) { + const char* const kAllowed[] = { +- extension_misc::kInAppPaymentsSupportAppId, + extension_misc::kMediaRouterStableExtensionId, + extension_misc::kPdfExtensionId, + #if defined(OS_CHROMEOS) diff --git a/testing/chromium/patches/0006-modify-default-prefs.patch b/testing/chromium/patches/0006-modify-default-prefs.patch new file mode 100644 index 00000000..776ad42b --- /dev/null +++ b/testing/chromium/patches/0006-modify-default-prefs.patch @@ -0,0 +1,248 @@ +--- a/chrome/browser/chrome_content_browser_client.cc ++++ b/chrome/browser/chrome_content_browser_client.cc +@@ -1125,7 +1125,7 @@ void ChromeContentBrowserClient::Registe + void ChromeContentBrowserClient::RegisterProfilePrefs( + user_prefs::PrefRegistrySyncable* registry) { + registry->RegisterBooleanPref(prefs::kDisable3DAPIs, false); +- registry->RegisterBooleanPref(prefs::kEnableHyperlinkAuditing, true); ++ registry->RegisterBooleanPref(prefs::kEnableHyperlinkAuditing, false); + registry->RegisterListPref(prefs::kEnableDeprecatedWebPlatformFeatures); + // Register user prefs for mapping SitePerProcess and IsolateOrigins in + // user policy in addition to the same named ones in Local State (which are +--- a/chrome/browser/ui/browser_ui_prefs.cc ++++ b/chrome/browser/ui/browser_ui_prefs.cc +@@ -66,11 +66,11 @@ void RegisterBrowserUserPrefs(user_prefs + registry->RegisterBooleanPref(prefs::kWebAppCreateInAppsMenu, true); + registry->RegisterBooleanPref(prefs::kWebAppCreateInQuickLaunchBar, true); + registry->RegisterBooleanPref( +- prefs::kOfferTranslateEnabled, true, ++ prefs::kOfferTranslateEnabled, false, + user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); + registry->RegisterStringPref(prefs::kCloudPrintEmail, std::string()); + registry->RegisterBooleanPref(prefs::kCloudPrintProxyEnabled, true); +- registry->RegisterBooleanPref(prefs::kCloudPrintSubmitEnabled, true); ++ registry->RegisterBooleanPref(prefs::kCloudPrintSubmitEnabled, false); + registry->RegisterDictionaryPref(prefs::kBrowserWindowPlacement); + registry->RegisterDictionaryPref(prefs::kBrowserWindowPlacementPopup); + registry->RegisterDictionaryPref(prefs::kAppWindowPlacement); +--- a/chrome/browser/net/prediction_options.cc ++++ b/chrome/browser/net/prediction_options.cc +@@ -32,7 +32,7 @@ NetworkPredictionStatus CanPrefetchAndPr + } + return NetworkPredictionStatus::DISABLED_DUE_TO_NETWORK; + default: +- DCHECK_EQ(NETWORK_PREDICTION_NEVER, network_prediction_options); ++ //DCHECK_EQ(NETWORK_PREDICTION_NEVER, network_prediction_options); + return NetworkPredictionStatus::DISABLED_ALWAYS; + } + } +--- a/chrome/browser/net/prediction_options.h ++++ b/chrome/browser/net/prediction_options.h +@@ -23,7 +23,7 @@ enum NetworkPredictionOptions { + NETWORK_PREDICTION_ALWAYS, + NETWORK_PREDICTION_WIFI_ONLY, + NETWORK_PREDICTION_NEVER, +- NETWORK_PREDICTION_DEFAULT = NETWORK_PREDICTION_WIFI_ONLY, ++ NETWORK_PREDICTION_DEFAULT = NETWORK_PREDICTION_NEVER, + }; + + enum class NetworkPredictionStatus { +--- a/chrome/browser/background/background_mode_manager.cc ++++ b/chrome/browser/background/background_mode_manager.cc +@@ -352,7 +352,7 @@ void BackgroundModeManager::RegisterPref + registry->RegisterBooleanPref(prefs::kChromeCreatedLoginItem, false); + registry->RegisterBooleanPref(prefs::kMigratedLoginItemPref, false); + #endif +- registry->RegisterBooleanPref(prefs::kBackgroundModeEnabled, true); ++ registry->RegisterBooleanPref(prefs::kBackgroundModeEnabled, false); + } + + void BackgroundModeManager::RegisterProfile(Profile* profile) { +--- a/components/content_settings/core/browser/cookie_settings.cc ++++ b/components/content_settings/core/browser/cookie_settings.cc +@@ -50,7 +50,7 @@ void CookieSettings::GetCookieSettings( + void CookieSettings::RegisterProfilePrefs( + user_prefs::PrefRegistrySyncable* registry) { + registry->RegisterBooleanPref( +- prefs::kBlockThirdPartyCookies, false, ++ prefs::kBlockThirdPartyCookies, true, + user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); + } + +--- a/chrome/browser/ui/navigation_correction_tab_observer.cc ++++ b/chrome/browser/ui/navigation_correction_tab_observer.cc +@@ -55,7 +55,7 @@ NavigationCorrectionTabObserver::~Naviga + // static + void NavigationCorrectionTabObserver::RegisterProfilePrefs( + user_prefs::PrefRegistrySyncable* prefs) { +- prefs->RegisterBooleanPref(prefs::kAlternateErrorPagesEnabled, true, ++ prefs->RegisterBooleanPref(prefs::kAlternateErrorPagesEnabled, false, + user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); + } + +--- a/components/autofill/core/common/autofill_prefs.cc ++++ b/components/autofill/core/common/autofill_prefs.cc +@@ -130,10 +130,10 @@ const char kAutocompleteLastVersionReten + void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry) { + // Synced prefs. Used for cross-device choices, e.g., credit card Autofill. + registry->RegisterBooleanPref( +- prefs::kAutofillEnabledDeprecated, true, ++ prefs::kAutofillEnabledDeprecated, false, + user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); + registry->RegisterBooleanPref( +- prefs::kAutofillProfileEnabled, true, ++ prefs::kAutofillProfileEnabled, false, + user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); + registry->RegisterIntegerPref( + prefs::kAutofillLastVersionDeduped, 0, +@@ -146,7 +146,7 @@ void RegisterProfilePrefs(user_prefs::Pr + prefs::kAutofillLastVersionDisusedAddressesDeleted, 0, + user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); + registry->RegisterBooleanPref( +- prefs::kAutofillCreditCardEnabled, true, ++ prefs::kAutofillCreditCardEnabled, false, + user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); + registry->RegisterStringPref( + prefs::kAutofillProfileValidity, "", +--- a/chrome/browser/resources/settings/reset_page/reset_profile_dialog.html ++++ b/chrome/browser/resources/settings/reset_page/reset_profile_dialog.html +@@ -52,7 +52,7 @@ + + +
+- ++ + $i18nRaw{resetPageFeedback} +
+ +--- a/chrome/browser/signin/signin_promo.cc ++++ b/chrome/browser/signin/signin_promo.cc +@@ -171,7 +171,7 @@ bool IsAutoCloseEnabledInEmbeddedURL(con + + void RegisterProfilePrefs( + user_prefs::PrefRegistrySyncable* registry) { +- registry->RegisterBooleanPref(prefs::kSignInPromoShowOnFirstRunAllowed, true); ++ registry->RegisterBooleanPref(prefs::kSignInPromoShowOnFirstRunAllowed, false); + registry->RegisterBooleanPref(prefs::kSignInPromoShowNTPBubble, false); + registry->RegisterIntegerPref(prefs::kDiceSigninUserMenuPromoCount, 0); + } +--- a/components/bookmarks/browser/bookmark_utils.cc ++++ b/components/bookmarks/browser/bookmark_utils.cc +@@ -440,12 +440,12 @@ void GetBookmarksMatchingProperties(Book + void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry) { + registry->RegisterBooleanPref( + prefs::kShowBookmarkBar, +- false, ++ true, + user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); + registry->RegisterBooleanPref(prefs::kEditBookmarksEnabled, true); + registry->RegisterBooleanPref( + prefs::kShowAppsShortcutInBookmarkBar, +- true, ++ false, + user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); + registry->RegisterBooleanPref( + prefs::kShowManagedBookmarksInBookmarkBar, +--- a/chrome/browser/profiles/profile.cc ++++ b/chrome/browser/profiles/profile.cc +@@ -148,7 +148,7 @@ const char Profile::kProfileKey[] = "__P + void Profile::RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry) { + registry->RegisterBooleanPref( + prefs::kSearchSuggestEnabled, +- true, ++ false, + user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); + #if defined(OS_ANDROID) + registry->RegisterStringPref( +--- a/chrome/service/cloud_print/connector_settings.cc ++++ b/chrome/service/cloud_print/connector_settings.cc +@@ -60,7 +60,7 @@ void ConnectorSettings::InitFrom(Service + DCHECK(server_url_.is_valid()); + + connect_new_printers_ = prefs->GetBoolean( +- prefs::kCloudPrintConnectNewPrinters, true); ++ prefs::kCloudPrintConnectNewPrinters, false); + + xmpp_ping_enabled_ = prefs->GetBoolean( + prefs::kCloudPrintXmppPingEnabled, false); +--- a/chrome/browser/ui/webui/local_discovery/local_discovery_ui.cc ++++ b/chrome/browser/ui/webui/local_discovery/local_discovery_ui.cc +@@ -127,10 +127,6 @@ void LocalDiscoveryUI::RegisterProfilePr + user_prefs::PrefRegistrySyncable* registry) { + registry->RegisterBooleanPref( + prefs::kLocalDiscoveryNotificationsEnabled, +-#if defined(OS_WIN) + false, +-#else +- true, +-#endif + user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); + } +--- a/extensions/common/extension.cc ++++ b/extensions/common/extension.cc +@@ -382,14 +382,6 @@ bool Extension::ShouldDisplayInExtension + if (is_theme()) + return false; + +- // Hide component extensions because they are only extensions as an +- // implementation detail of Chrome. +- if (extensions::Manifest::IsComponentLocation(location()) && +- !base::CommandLine::ForCurrentProcess()->HasSwitch( +- switches::kShowComponentExtensionOptions)) { +- return false; +- } +- + // Unless they are unpacked, never show hosted apps. Note: We intentionally + // show packaged apps and platform apps because there are some pieces of + // functionality that are only available in chrome://extensions/ but which +--- a/components/safe_browsing/common/safe_browsing_prefs.cc ++++ b/components/safe_browsing/common/safe_browsing_prefs.cc +@@ -149,9 +149,9 @@ void RegisterProfilePrefs(PrefRegistrySi + registry->RegisterBooleanPref( + prefs::kSafeBrowsingSawInterstitialScoutReporting, false); + registry->RegisterBooleanPref( +- prefs::kSafeBrowsingExtendedReportingOptInAllowed, true); ++ prefs::kSafeBrowsingExtendedReportingOptInAllowed, false); + registry->RegisterBooleanPref( +- prefs::kSafeBrowsingEnabled, true, ++ prefs::kSafeBrowsingEnabled, false, + user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); + registry->RegisterBooleanPref(prefs::kSafeBrowsingProceedAnywayDisabled, + false); +--- a/components/password_manager/core/browser/password_manager.cc ++++ b/components/password_manager/core/browser/password_manager.cc +@@ -354,10 +354,10 @@ bool IsOnlyNewParserEnabled() { + void PasswordManager::RegisterProfilePrefs( + user_prefs::PrefRegistrySyncable* registry) { + registry->RegisterBooleanPref( +- prefs::kCredentialsEnableService, true, ++ prefs::kCredentialsEnableService, false, + user_prefs::PrefRegistrySyncable::SYNCABLE_PRIORITY_PREF); + registry->RegisterBooleanPref( +- prefs::kCredentialsEnableAutosignin, true, ++ prefs::kCredentialsEnableAutosignin, false, + user_prefs::PrefRegistrySyncable::SYNCABLE_PRIORITY_PREF); + registry->RegisterStringPref(prefs::kSyncPasswordHash, std::string(), + PrefRegistry::NO_REGISTRATION_FLAGS); +--- a/components/payments/core/payment_prefs.cc ++++ b/components/payments/core/payment_prefs.cc +@@ -16,7 +16,7 @@ const char kCanMakePaymentEnabled[] = "p + void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry) { + registry->RegisterBooleanPref(kPaymentsFirstTransactionCompleted, false); + registry->RegisterBooleanPref( +- kCanMakePaymentEnabled, true, ++ kCanMakePaymentEnabled, false, + user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); + } + +--- a/chrome/browser/signin/account_consistency_mode_manager.cc ++++ b/chrome/browser/signin/account_consistency_mode_manager.cc +@@ -126,7 +126,7 @@ void AccountConsistencyModeManager::Regi + registry->RegisterBooleanPref(prefs::kAccountConsistencyMirrorRequired, + false); + #endif +- registry->RegisterBooleanPref(prefs::kSigninAllowedOnNextStartup, true); ++ registry->RegisterBooleanPref(prefs::kSigninAllowedOnNextStartup, false); + } + + // static diff --git a/testing/chromium/patches/0007-disable-web-resource-service.patch b/testing/chromium/patches/0007-disable-web-resource-service.patch new file mode 100644 index 00000000..a3b7f06f --- /dev/null +++ b/testing/chromium/patches/0007-disable-web-resource-service.patch @@ -0,0 +1,52 @@ +--- a/components/web_resource/web_resource_service.cc ++++ b/components/web_resource/web_resource_service.cc +@@ -128,48 +128,7 @@ bool WebResourceService::GetFetchSchedul + // Initializes the fetching of data from the resource server. Data + // load calls OnSimpleLoaderComplete. + void WebResourceService::StartFetch() { +- // Set to false so that next fetch can be scheduled after this fetch or +- // if we receive notification that resource is allowed. +- fetch_scheduled_ = false; +- // Check whether fetching is allowed. +- if (!resource_request_allowed_notifier_->ResourceRequestsAllowed()) +- return; +- +- // First, put our next cache load on the MessageLoop. +- ScheduleFetch(cache_update_delay_ms_); +- +- // Set cache update time in preferences. +- prefs_->SetString(last_update_time_pref_name_, +- base::NumberToString(base::Time::Now().ToDoubleT())); +- +- // If we are still fetching data, exit. +- if (in_fetch_) +- return; +- in_fetch_ = true; +- +- GURL web_resource_server = +- application_locale_.empty() +- ? web_resource_server_ +- : google_util::AppendGoogleLocaleParam(web_resource_server_, +- application_locale_); +- +- DVLOG(1) << "WebResourceService StartFetch " << web_resource_server; +- auto resource_request = std::make_unique(); +- resource_request->url = web_resource_server; +- // Do not let url fetcher affect existing state in system context +- // (by setting cookies, for example). +- resource_request->load_flags = net::LOAD_DISABLE_CACHE | +- net::LOAD_DO_NOT_SEND_COOKIES | +- net::LOAD_DO_NOT_SAVE_COOKIES; +- // TODO(https://crbug.com/808498): Re-add data use measurement once +- // SimpleURLLoader supports it. +- // ID=data_use_measurement::DataUseUserData::WEB_RESOURCE_SERVICE +- simple_url_loader_ = network::SimpleURLLoader::Create( +- std::move(resource_request), traffic_annotation_); +- simple_url_loader_->DownloadToStringOfUnboundedSizeUntilCrashAndDie( +- url_loader_factory_.get(), +- base::BindOnce(&WebResourceService::OnSimpleLoaderComplete, +- base::Unretained(this))); ++ in_fetch_ = false; + } + + void WebResourceService::EndFetch() { diff --git a/testing/chromium/patches/0008-restore-classic-ntp.patch b/testing/chromium/patches/0008-restore-classic-ntp.patch new file mode 100644 index 00000000..c474e1c0 --- /dev/null +++ b/testing/chromium/patches/0008-restore-classic-ntp.patch @@ -0,0 +1,53 @@ +--- a/chrome/browser/search/search.cc ++++ b/chrome/browser/search/search.cc +@@ -196,29 +196,7 @@ struct NewTabURLDetails { + + const GURL local_url(chrome::kChromeSearchLocalNtpUrl); + +- if (ShouldShowLocalNewTab(profile)) +- return NewTabURLDetails(local_url, NEW_TAB_URL_VALID); +- +- const TemplateURL* template_url = +- GetDefaultSearchProviderTemplateURL(profile); +- if (!profile || !template_url) +- return NewTabURLDetails(local_url, NEW_TAB_URL_BAD); +- +- GURL search_provider_url(template_url->new_tab_url_ref().ReplaceSearchTerms( +- TemplateURLRef::SearchTermsArgs(base::string16()), +- UIThreadSearchTermsData(profile))); +- +- if (ShouldDelayRemoteNTP(search_provider_url, profile)) +- return NewTabURLDetails(local_url, NEW_TAB_URL_VALID); +- +- if (!search_provider_url.is_valid()) +- return NewTabURLDetails(local_url, NEW_TAB_URL_NOT_SET); +- if (!search_provider_url.SchemeIsCryptographic()) +- return NewTabURLDetails(local_url, NEW_TAB_URL_INSECURE); +- if (!IsURLAllowedForSupervisedUser(search_provider_url, profile)) +- return NewTabURLDetails(local_url, NEW_TAB_URL_BLOCKED); +- +- return NewTabURLDetails(search_provider_url, NEW_TAB_URL_VALID); ++ return NewTabURLDetails(local_url, NEW_TAB_URL_VALID); + } + + const GURL url; +--- a/components/ntp_snippets/features.cc ++++ b/components/ntp_snippets/features.cc +@@ -41,7 +41,7 @@ const base::Feature* const kAllFeatures[ + &kRemoteSuggestionsBackendFeature}; + + const base::Feature kArticleSuggestionsFeature{ +- "NTPArticleSuggestions", base::FEATURE_ENABLED_BY_DEFAULT}; ++ "NTPArticleSuggestions", base::FEATURE_DISABLED_BY_DEFAULT}; + + const base::Feature kRemoteSuggestionsEmulateM58FetchingSchedule{ + "RemoteSuggestionsEmulateM58FetchingSchedule", +@@ -71,7 +71,7 @@ const char kNotificationsDailyLimit[] = + const char kNotificationsIgnoredLimitParam[] = "ignored_limit"; + + const base::Feature kKeepPrefetchedContentSuggestions{ +- "KeepPrefetchedContentSuggestions", base::FEATURE_ENABLED_BY_DEFAULT}; ++ "KeepPrefetchedContentSuggestions", base::FEATURE_DISABLED_BY_DEFAULT}; + + const base::Feature kContentSuggestionsDebugLog{ + "ContentSuggestionsDebugLog", base::FEATURE_DISABLED_BY_DEFAULT}; diff --git a/testing/chromium/patches/0009-disable-google-ipv6-probes.patch b/testing/chromium/patches/0009-disable-google-ipv6-probes.patch new file mode 100644 index 00000000..f1a1dd99 --- /dev/null +++ b/testing/chromium/patches/0009-disable-google-ipv6-probes.patch @@ -0,0 +1,16 @@ +--- a/net/dns/host_resolver_manager.cc ++++ b/net/dns/host_resolver_manager.cc +@@ -120,10 +120,10 @@ const unsigned kMinimumTTLSeconds = kCac + // cached. + const int kIPv6ProbePeriodMs = 1000; + +-// Google DNS address used for IPv6 probes. +-const uint8_t kIPv6ProbeAddress[] = {0x20, 0x01, 0x48, 0x60, 0x48, 0x60, ++// RIPE NCC k.root-servers.net. 2001:7fd::1 (anycasted), used for IPv6 probes. ++const uint8_t kIPv6ProbeAddress[] = {0x20, 0x01, 0x07, 0xfd, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +- 0x00, 0x00, 0x88, 0x88}; ++ 0x00, 0x00, 0x00, 0x01}; + + enum DnsResolveStatus { + RESOLVE_STATUS_DNS_SUCCESS = 0, diff --git a/testing/chromium/patches/0010-disable-gcm-status-check.patch b/testing/chromium/patches/0010-disable-gcm-status-check.patch new file mode 100644 index 00000000..4c88072c --- /dev/null +++ b/testing/chromium/patches/0010-disable-gcm-status-check.patch @@ -0,0 +1,87 @@ +--- a/components/gcm_driver/gcm_channel_status_request.cc ++++ b/components/gcm_driver/gcm_channel_status_request.cc +@@ -24,8 +24,6 @@ namespace gcm { + + namespace { + +-const char kRequestContentType[] = "application/octet-stream"; +-const char kGCMChannelTag[] = "gcm_channel"; + const int kDefaultPollIntervalSeconds = 60 * 60; // 60 minutes. + const int kMinPollIntervalSeconds = 30 * 60; // 30 minutes. + +@@ -57,73 +55,8 @@ int GCMChannelStatusRequest::min_poll_in + } + + void GCMChannelStatusRequest::Start() { +- // url_loader_factory_ can be null for tests. +- if (!url_loader_factory_) +- return; +- +- DCHECK(!simple_url_loader_); +- +- GURL request_url(channel_status_request_url_); +- +- sync_pb::ExperimentStatusRequest proto_data; +- proto_data.add_experiment_name(kGCMChannelTag); +- std::string upload_data; +- if (!proto_data.SerializeToString(&upload_data)) { +- NOTREACHED(); +- } +- +- net::NetworkTrafficAnnotationTag traffic_annotation = +- net::DefineNetworkTrafficAnnotation("gcm_channel_status_request", R"( +- semantics { +- sender: "GCM Driver" +- description: +- "Google Chrome interacts with Google Cloud Messaging to receive " +- "push messages for various browser features, as well as on behalf " +- "of websites and extensions. The channel status request " +- "periodically confirms with Google servers whether the feature " +- "should be enabled." +- trigger: +- "Periodically when Chrome has established an active Google Cloud " +- "Messaging subscription. The first request will be issued a minute " +- "after the first subscription activates. Subsequent requests will " +- "be issued each hour with a jitter of 15 minutes. Google can " +- "adjust this interval when it deems necessary." +- data: +- "A user agent string containing the Chrome version, channel and " +- "platform will be sent to the server. No user identifier is sent " +- "along with the request." +- destination: GOOGLE_OWNED_SERVICE +- } +- policy { +- cookies_allowed: NO +- setting: +- "Support for interacting with Google Cloud Messaging is enabled by " +- "default, and there is no configuration option to completely " +- "disable it. Websites wishing to receive push messages must " +- "acquire express permission from the user for the 'Notification' " +- "permission." +- policy_exception_justification: +- "Not implemented, considered not useful." +- })"); +- +- auto resource_request = std::make_unique(); +- +- resource_request->url = request_url; +- resource_request->load_flags = +- net::LOAD_DO_NOT_SEND_COOKIES | net::LOAD_DO_NOT_SAVE_COOKIES; +- resource_request->method = "POST"; +- resource_request->headers.SetHeader(net::HttpRequestHeaders::kUserAgent, +- user_agent_); +- // TODO(https://crbug.com/808498): Re-add data use measurement once +- // SimpleURLLoader supports it. +- // ID=data_use_measurement::DataUseUserData::GCM_DRIVER +- simple_url_loader_ = network::SimpleURLLoader::Create( +- std::move(resource_request), traffic_annotation); +- simple_url_loader_->AttachStringForUpload(upload_data, kRequestContentType); +- simple_url_loader_->DownloadToStringOfUnboundedSizeUntilCrashAndDie( +- url_loader_factory_.get(), +- base::BindOnce(&GCMChannelStatusRequest::OnSimpleLoaderComplete, +- base::Unretained(this))); ++ // Simulate an empty response and disable GCM. ++ callback_.Run(false, false, 0); + } + + void GCMChannelStatusRequest::OnSimpleLoaderComplete( diff --git a/testing/chromium/patches/0014-disable-translation-lang-fetch.patch b/testing/chromium/patches/0014-disable-translation-lang-fetch.patch new file mode 100644 index 00000000..76951fb7 --- /dev/null +++ b/testing/chromium/patches/0014-disable-translation-lang-fetch.patch @@ -0,0 +1,61 @@ +--- a/components/translate/core/browser/translate_language_list.cc ++++ b/components/translate/core/browser/translate_language_list.cc +@@ -207,6 +207,8 @@ GURL TranslateLanguageList::TranslateLan + } + + void TranslateLanguageList::RequestLanguageList() { ++ return; ++ + // If resource requests are not allowed, we'll get a callback when they are. + if (!resource_requests_allowed_) { + request_pending_ = true; +--- a/chrome/browser/spellchecker/spellcheck_hunspell_dictionary.cc ++++ b/chrome/browser/spellchecker/spellcheck_hunspell_dictionary.cc +@@ -167,7 +167,6 @@ void SpellcheckHunspellDictionary::Retry + return; + } + browser_context_ = browser_context; +- DownloadDictionary(GetDictionaryURL()); + } + + bool SpellcheckHunspellDictionary::IsReady() const { +@@ -406,9 +405,6 @@ void SpellcheckHunspellDictionary::Initi + } + + if (browser_context_) { +- // Download from the UI thread to check that |browser_context_| is +- // still valid. +- DownloadDictionary(GetDictionaryURL()); + return; + } + } +--- a/components/translate/core/browser/translate_ranker_impl.cc ++++ b/components/translate/core/browser/translate_ranker_impl.cc +@@ -157,14 +157,10 @@ TranslateRankerImpl::TranslateRankerImpl + ukm::UkmRecorder* ukm_recorder) + : ukm_recorder_(ukm_recorder), + is_logging_enabled_(false), +- is_query_enabled_(base::FeatureList::IsEnabled(kTranslateRankerQuery)), +- is_enforcement_enabled_( +- base::FeatureList::IsEnabled(kTranslateRankerEnforcement)), +- is_auto_blacklist_override_enabled_(base::FeatureList::IsEnabled( +- translate::kTranslateRankerAutoBlacklistOverride)), +- is_previous_language_matches_override_enabled_( +- base::FeatureList::IsEnabled( +- translate::kTranslateRankerPreviousLanguageMatchesOverride)), ++ is_query_enabled_(false), ++ is_enforcement_enabled_(false), ++ is_auto_blacklist_override_enabled_(false), ++ is_previous_language_matches_override_enabled_(false), + weak_ptr_factory_(this) { + if (is_query_enabled_ || is_enforcement_enabled_) { + model_loader_ = std::make_unique( +@@ -238,6 +234,8 @@ bool TranslateRankerImpl::ShouldOfferTra + // (or become False). + const bool kDefaultResponse = true; + ++ return kDefaultResponse; ++ + translate_event->set_ranker_request_timestamp_sec( + (base::TimeTicks::Now() - base::TimeTicks()).InSeconds()); + translate_event->set_ranker_version(GetModelVersion()); diff --git a/testing/chromium/patches/0015-disable-update-pings.patch b/testing/chromium/patches/0015-disable-update-pings.patch new file mode 100644 index 00000000..15c11b60 --- /dev/null +++ b/testing/chromium/patches/0015-disable-update-pings.patch @@ -0,0 +1,18 @@ +--- a/components/component_updater/configurator_impl.cc ++++ b/components/component_updater/configurator_impl.cc +@@ -73,14 +73,7 @@ int ConfiguratorImpl::UpdateDelay() cons + } + + std::vector ConfiguratorImpl::UpdateUrl() const { +- if (url_source_override_.is_valid()) +- return {GURL(url_source_override_)}; +- +- std::vector urls{GURL(kUpdaterJSONDefaultUrl), +- GURL(kUpdaterJSONFallbackUrl)}; +- if (require_encryption_) +- update_client::RemoveUnsecureUrls(&urls); +- ++ std::vector urls; + return urls; + } + diff --git a/testing/chromium/patches/0019-disable-battery-status-service.patch b/testing/chromium/patches/0019-disable-battery-status-service.patch new file mode 100644 index 00000000..5f3efda5 --- /dev/null +++ b/testing/chromium/patches/0019-disable-battery-status-service.patch @@ -0,0 +1,102 @@ +--- a/services/device/battery/battery_status_service.cc ++++ b/services/device/battery/battery_status_service.cc +@@ -19,10 +19,7 @@ BatteryStatusService::BatteryStatusServi + : main_thread_task_runner_(base::ThreadTaskRunnerHandle::Get()), + update_callback_(base::Bind(&BatteryStatusService::NotifyConsumers, + base::Unretained(this))), +- status_updated_(false), + is_shutdown_(false) { +- callback_list_.set_removal_callback(base::Bind( +- &BatteryStatusService::ConsumersChanged, base::Unretained(this))); + } + + BatteryStatusService::~BatteryStatusService() {} +@@ -38,58 +35,16 @@ BatteryStatusService::AddCallback(const + DCHECK(main_thread_task_runner_->BelongsToCurrentThread()); + DCHECK(!is_shutdown_); + +- if (!battery_fetcher_) +- battery_fetcher_ = BatteryStatusManager::Create(update_callback_); +- +- if (callback_list_.empty()) { +- bool success = battery_fetcher_->StartListeningBatteryChange(); +- // On failure pass the default values back. +- if (!success) +- callback.Run(mojom::BatteryStatus()); +- } +- +- if (status_updated_) { +- // Send recent status to the new callback if already available. +- callback.Run(status_); +- } ++ // Always pass the default values. ++ callback.Run(mojom::BatteryStatus()); + + return callback_list_.Add(callback); + } + +-void BatteryStatusService::ConsumersChanged() { +- if (is_shutdown_) +- return; +- +- if (callback_list_.empty()) { +- battery_fetcher_->StopListeningBatteryChange(); +- status_updated_ = false; +- } +-} +- + void BatteryStatusService::NotifyConsumers(const mojom::BatteryStatus& status) { +- DCHECK(!is_shutdown_); +- +- main_thread_task_runner_->PostTask( +- FROM_HERE, +- base::BindOnce(&BatteryStatusService::NotifyConsumersOnMainThread, +- base::Unretained(this), status)); +-} +- +-void BatteryStatusService::NotifyConsumersOnMainThread( +- const mojom::BatteryStatus& status) { +- DCHECK(main_thread_task_runner_->BelongsToCurrentThread()); +- if (callback_list_.empty()) +- return; +- +- status_ = status; +- status_updated_ = true; +- callback_list_.Notify(status_); + } + + void BatteryStatusService::Shutdown() { +- if (!callback_list_.empty()) +- battery_fetcher_->StopListeningBatteryChange(); +- battery_fetcher_.reset(); + is_shutdown_ = true; + } + +@@ -100,9 +55,6 @@ BatteryStatusService::GetUpdateCallbackF + + void BatteryStatusService::SetBatteryManagerForTesting( + std::unique_ptr test_battery_manager) { +- battery_fetcher_ = std::move(test_battery_manager); +- status_ = mojom::BatteryStatus(); +- status_updated_ = false; + is_shutdown_ = false; + main_thread_task_runner_ = base::ThreadTaskRunnerHandle::Get(); + } +--- a/services/device/battery/battery_status_service.h ++++ b/services/device/battery/battery_status_service.h +@@ -56,15 +56,10 @@ class BatteryStatusService { + // Updates current battery status and sends new status to interested + // render processes. Can be called on any thread via a callback. + void NotifyConsumers(const mojom::BatteryStatus& status); +- void NotifyConsumersOnMainThread(const mojom::BatteryStatus& status); +- void ConsumersChanged(); + + scoped_refptr main_thread_task_runner_; +- std::unique_ptr battery_fetcher_; + BatteryUpdateCallbackList callback_list_; + BatteryUpdateCallback update_callback_; +- mojom::BatteryStatus status_; +- bool status_updated_; + bool is_shutdown_; + + DISALLOW_COPY_AND_ASSIGN(BatteryStatusService); diff --git a/testing/chromium/patches/0021-disable-rlz.patch b/testing/chromium/patches/0021-disable-rlz.patch new file mode 100644 index 00000000..38e5210d --- /dev/null +++ b/testing/chromium/patches/0021-disable-rlz.patch @@ -0,0 +1,12 @@ +# Disable rlz + +--- a/rlz/buildflags/buildflags.gni ++++ b/rlz/buildflags/buildflags.gni +@@ -6,6 +6,6 @@ import("//build/config/chrome_build.gni" + + # Whether we are using the rlz library or not. Platforms like Android send + # rlz codes for searches but do not use the library. +-enable_rlz_support = is_win || is_mac || is_ios || is_chromeos ++enable_rlz_support = false + + enable_rlz = is_chrome_branded && enable_rlz_support diff --git a/testing/chromium/patches/android.patch b/testing/chromium/patches/android.patch new file mode 100644 index 00000000..8a4e803a --- /dev/null +++ b/testing/chromium/patches/android.patch @@ -0,0 +1,24 @@ +description: disable dependency on chrome/android +author: Michael Gilbert + +--- a/device/vr/buildflags/buildflags.gni ++++ b/device/vr/buildflags/buildflags.gni +@@ -5,7 +5,6 @@ + import("//build/config/chrome_build.gni") + import("//build/config/chromecast_build.gni") + import("//build/config/gclient_args.gni") +-import("//chrome/android/channel.gni") + + declare_args() { + enable_gvr_services = is_android && !is_chromecast && +--- a/BUILD.gn ++++ b/BUILD.gn +@@ -371,7 +371,7 @@ group("gn_all") { + # seems currently broken for this platform at the moment, and the + # corresponding code build and works on Linux unmodified. + # See instructions in the corresponding BUILD.gn. +- if (is_linux) { ++ if (is_android) { + deps += + [ "//third_party/android_crazy_linker:android_crazy_linker_zip_fuzzer" ] + } diff --git a/testing/chromium/patches/device-notifications.patch b/testing/chromium/patches/device-notifications.patch new file mode 100644 index 00000000..d428e7e5 --- /dev/null +++ b/testing/chromium/patches/device-notifications.patch @@ -0,0 +1,16 @@ +description: disable device discovery notifications by default +author: Michael Gilbert +bug-debian: http://bugs.debian.org/856571 + +--- a/chrome/browser/printing/cloud_print/privet_notifications.cc ++++ b/chrome/browser/printing/cloud_print/privet_notifications.cc +@@ -229,8 +229,7 @@ void PrivetNotificationService::DeviceCa + // static + bool PrivetNotificationService::IsEnabled() { + base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); +- return !command_line->HasSwitch( +- switches::kDisableDeviceDiscoveryNotifications); ++ return command_line->HasSwitch(switches::kEnableDeviceDiscoveryNotifications); + } + + // static diff --git a/testing/chromium/patches/disable-crash-reporter.patch b/testing/chromium/patches/disable-crash-reporter.patch new file mode 100644 index 00000000..4fb257bb --- /dev/null +++ b/testing/chromium/patches/disable-crash-reporter.patch @@ -0,0 +1,56 @@ +# Disable some background communication with clients2.google.com + +--- a/third_party/breakpad/breakpad/src/client/linux/sender/google_crash_report_sender.cc ++++ b/third_party/breakpad/breakpad/src/client/linux/sender/google_crash_report_sender.cc +@@ -85,6 +85,7 @@ bool CheckForRequiredFlagsOrDie() { + } + + int main(int argc, char *argv[]) { ++ return 0; + google::InitGoogleLogging(argv[0]); + google::ParseCommandLineFlags(&argc, &argv, true); + if (!CheckForRequiredFlagsOrDie()) { +--- a/chrome/browser/tracing/crash_service_uploader.cc ++++ b/chrome/browser/tracing/crash_service_uploader.cc +@@ -132,11 +132,16 @@ void TraceCrashServiceUploader::DoUpload + progress_callback_ = progress_callback; + done_callback_ = std::move(done_callback); + +- base::PostTaskWithTraits( +- FROM_HERE, {base::TaskPriority::BEST_EFFORT}, +- base::BindOnce(&TraceCrashServiceUploader::DoCompressOnBackgroundThread, +- base::Unretained(this), file_contents, upload_mode, +- upload_url_, std::move(metadata))); ++ if (!progress_callback_.is_null()) { ++ base::PostTaskWithTraits( ++ FROM_HERE, {content::BrowserThread::UI}, ++ base::Bind(progress_callback_, 1, 1)); ++ } ++ if (!done_callback_.is_null()) { ++ base::PostTaskWithTraits( ++ FROM_HERE, {content::BrowserThread::UI}, ++ base::BindOnce(std::move(done_callback_), true, "Upload skipped.")); ++ } + } + + void TraceCrashServiceUploader::DoCompressOnBackgroundThread( +@@ -207,11 +212,6 @@ void TraceCrashServiceUploader::DoCompre + std::string post_data; + SetupMultipart(product, version, std::move(metadata), "trace.json.gz", + compressed_contents, &post_data); +- +- base::PostTaskWithTraits( +- FROM_HERE, {content::BrowserThread::UI}, +- base::BindOnce(&TraceCrashServiceUploader::CreateAndStartURLLoader, +- base::Unretained(this), upload_url, post_data)); + } + + void TraceCrashServiceUploader::OnUploadError( +@@ -309,6 +309,7 @@ bool TraceCrashServiceUploader::Compress + void TraceCrashServiceUploader::CreateAndStartURLLoader( + const std::string& upload_url, + const std::string& post_data) { ++ return; + DCHECK_CURRENTLY_ON(content::BrowserThread::UI); + DCHECK(!simple_url_loader_); + diff --git a/testing/chromium/patches/disable-domain-reliability.patch b/testing/chromium/patches/disable-domain-reliability.patch new file mode 100644 index 00000000..dc800b90 --- /dev/null +++ b/testing/chromium/patches/disable-domain-reliability.patch @@ -0,0 +1,660 @@ +# Disable domain reliability component + +--- a/components/domain_reliability/google_configs.cc ++++ b/components/domain_reliability/google_configs.cc +@@ -13,575 +13,10 @@ + + namespace domain_reliability { + +-namespace { +- +-struct GoogleConfigParams { +- const char* hostname; +- bool include_subdomains; +- +- // If true, prepend a collector URL within https://|hostname|/. +- bool include_origin_specific_collector; +- +- // If true, also add a config for www.|hostname|. +- // +- // |include_subdomains| will be false in the extra config, but +- // |include_origin_specific_collector| will be respected, and will use the +- // www subdomain as the origin for the collector so it matches the config. +- bool duplicate_for_www; +-}; +- +-const GoogleConfigParams kGoogleConfigs[] = { +- // Origins with subdomains and same-origin collectors. Currently, all +- // origins with same-origin collectors also run collectors on their www +- // subdomain. (e.g., both foo.com and www.foo.com.) +- {"google.ac", true, true, true}, +- {"google.ad", true, true, true}, +- {"google.ae", true, true, true}, +- {"google.af", true, true, true}, +- {"google.ag", true, true, true}, +- {"google.al", true, true, true}, +- {"google.am", true, true, true}, +- {"google.as", true, true, true}, +- {"google.at", true, true, true}, +- {"google.az", true, true, true}, +- {"google.ba", true, true, true}, +- {"google.be", true, true, true}, +- {"google.bf", true, true, true}, +- {"google.bg", true, true, true}, +- {"google.bi", true, true, true}, +- {"google.bj", true, true, true}, +- {"google.bs", true, true, true}, +- {"google.bt", true, true, true}, +- {"google.by", true, true, true}, +- {"google.ca", true, true, true}, +- {"google.cc", true, true, true}, +- {"google.cd", true, true, true}, +- {"google.cf", true, true, true}, +- {"google.cg", true, true, true}, +- {"google.ch", true, true, true}, +- {"google.ci", true, true, true}, +- {"google.cl", true, true, true}, +- {"google.cm", true, true, true}, +- {"google.cn", true, true, true}, +- {"google.co.ao", true, true, true}, +- {"google.co.bw", true, true, true}, +- {"google.co.ck", true, true, true}, +- {"google.co.cr", true, true, true}, +- {"google.co.hu", true, true, true}, +- {"google.co.id", true, true, true}, +- {"google.co.il", true, true, true}, +- {"google.co.im", true, true, true}, +- {"google.co.in", true, true, true}, +- {"google.co.je", true, true, true}, +- {"google.co.jp", true, true, true}, +- {"google.co.ke", true, true, true}, +- {"google.co.kr", true, true, true}, +- {"google.co.ls", true, true, true}, +- {"google.co.ma", true, true, true}, +- {"google.co.mz", true, true, true}, +- {"google.co.nz", true, true, true}, +- {"google.co.th", true, true, true}, +- {"google.co.tz", true, true, true}, +- {"google.co.ug", true, true, true}, +- {"google.co.uk", true, true, true}, +- {"google.co.uz", true, true, true}, +- {"google.co.ve", true, true, true}, +- {"google.co.vi", true, true, true}, +- {"google.co.za", true, true, true}, +- {"google.co.zm", true, true, true}, +- {"google.co.zw", true, true, true}, +- {"google.com.af", true, true, true}, +- {"google.com.ag", true, true, true}, +- {"google.com.ai", true, true, true}, +- {"google.com.ar", true, true, true}, +- {"google.com.au", true, true, true}, +- {"google.com.bd", true, true, true}, +- {"google.com.bh", true, true, true}, +- {"google.com.bn", true, true, true}, +- {"google.com.bo", true, true, true}, +- {"google.com.br", true, true, true}, +- {"google.com.by", true, true, true}, +- {"google.com.bz", true, true, true}, +- {"google.com.cn", true, true, true}, +- {"google.com.co", true, true, true}, +- {"google.com.cu", true, true, true}, +- {"google.com.cy", true, true, true}, +- {"google.com.do", true, true, true}, +- {"google.com.ec", true, true, true}, +- {"google.com.eg", true, true, true}, +- {"google.com.et", true, true, true}, +- {"google.com.fj", true, true, true}, +- {"google.com.ge", true, true, true}, +- {"google.com.gh", true, true, true}, +- {"google.com.gi", true, true, true}, +- {"google.com.gr", true, true, true}, +- {"google.com.gt", true, true, true}, +- {"google.com.hk", true, true, true}, +- {"google.com.iq", true, true, true}, +- {"google.com.jm", true, true, true}, +- {"google.com.jo", true, true, true}, +- {"google.com.kh", true, true, true}, +- {"google.com.kw", true, true, true}, +- {"google.com.lb", true, true, true}, +- {"google.com.ly", true, true, true}, +- {"google.com.mm", true, true, true}, +- {"google.com.mt", true, true, true}, +- {"google.com.mx", true, true, true}, +- {"google.com.my", true, true, true}, +- {"google.com.na", true, true, true}, +- {"google.com.nf", true, true, true}, +- {"google.com.ng", true, true, true}, +- {"google.com.ni", true, true, true}, +- {"google.com.np", true, true, true}, +- {"google.com.nr", true, true, true}, +- {"google.com.om", true, true, true}, +- {"google.com.pa", true, true, true}, +- {"google.com.pe", true, true, true}, +- {"google.com.pg", true, true, true}, +- {"google.com.ph", true, true, true}, +- {"google.com.pk", true, true, true}, +- {"google.com.pl", true, true, true}, +- {"google.com.pr", true, true, true}, +- {"google.com.py", true, true, true}, +- {"google.com.qa", true, true, true}, +- {"google.com.ru", true, true, true}, +- {"google.com.sa", true, true, true}, +- {"google.com.sb", true, true, true}, +- {"google.com.sg", true, true, true}, +- {"google.com.sl", true, true, true}, +- {"google.com.sv", true, true, true}, +- {"google.com.tj", true, true, true}, +- {"google.com.tn", true, true, true}, +- {"google.com.tr", true, true, true}, +- {"google.com.tw", true, true, true}, +- {"google.com.ua", true, true, true}, +- {"google.com.uy", true, true, true}, +- {"google.com.vc", true, true, true}, +- {"google.com.ve", true, true, true}, +- {"google.com.vn", true, true, true}, +- {"google.cv", true, true, true}, +- {"google.cz", true, true, true}, +- {"google.de", true, true, true}, +- {"google.dj", true, true, true}, +- {"google.dk", true, true, true}, +- {"google.dm", true, true, true}, +- {"google.dz", true, true, true}, +- {"google.ee", true, true, true}, +- {"google.es", true, true, true}, +- {"google.fi", true, true, true}, +- {"google.fm", true, true, true}, +- {"google.fr", true, true, true}, +- {"google.ga", true, true, true}, +- {"google.ge", true, true, true}, +- {"google.gg", true, true, true}, +- {"google.gl", true, true, true}, +- {"google.gm", true, true, true}, +- {"google.gp", true, true, true}, +- {"google.gr", true, true, true}, +- {"google.gy", true, true, true}, +- {"google.hk", true, true, true}, +- {"google.hn", true, true, true}, +- {"google.hr", true, true, true}, +- {"google.ht", true, true, true}, +- {"google.hu", true, true, true}, +- {"google.ie", true, true, true}, +- {"google.im", true, true, true}, +- {"google.iq", true, true, true}, +- {"google.ir", true, true, true}, +- {"google.is", true, true, true}, +- {"google.it", true, true, true}, +- {"google.it.ao", true, true, true}, +- {"google.je", true, true, true}, +- {"google.jo", true, true, true}, +- {"google.jp", true, true, true}, +- {"google.kg", true, true, true}, +- {"google.ki", true, true, true}, +- {"google.kz", true, true, true}, +- {"google.la", true, true, true}, +- {"google.li", true, true, true}, +- {"google.lk", true, true, true}, +- {"google.lt", true, true, true}, +- {"google.lu", true, true, true}, +- {"google.lv", true, true, true}, +- {"google.md", true, true, true}, +- {"google.me", true, true, true}, +- {"google.mg", true, true, true}, +- {"google.mk", true, true, true}, +- {"google.ml", true, true, true}, +- {"google.mn", true, true, true}, +- {"google.ms", true, true, true}, +- {"google.mu", true, true, true}, +- {"google.mv", true, true, true}, +- {"google.mw", true, true, true}, +- {"google.ne", true, true, true}, +- {"google.ne.jp", true, true, true}, +- {"google.ng", true, true, true}, +- {"google.nl", true, true, true}, +- {"google.no", true, true, true}, +- {"google.nr", true, true, true}, +- {"google.nu", true, true, true}, +- {"google.off.ai", true, true, true}, +- {"google.pk", true, true, true}, +- {"google.pl", true, true, true}, +- {"google.pn", true, true, true}, +- {"google.ps", true, true, true}, +- {"google.pt", true, true, true}, +- {"google.ro", true, true, true}, +- {"google.rs", true, true, true}, +- {"google.ru", true, true, true}, +- {"google.rw", true, true, true}, +- {"google.sc", true, true, true}, +- {"google.se", true, true, true}, +- {"google.sh", true, true, true}, +- {"google.si", true, true, true}, +- {"google.sk", true, true, true}, +- {"google.sm", true, true, true}, +- {"google.sn", true, true, true}, +- {"google.so", true, true, true}, +- {"google.sr", true, true, true}, +- {"google.st", true, true, true}, +- {"google.td", true, true, true}, +- {"google.tg", true, true, true}, +- {"google.tk", true, true, true}, +- {"google.tl", true, true, true}, +- {"google.tm", true, true, true}, +- {"google.tn", true, true, true}, +- {"google.to", true, true, true}, +- {"google.tt", true, true, true}, +- {"google.us", true, true, true}, +- {"google.uz", true, true, true}, +- {"google.vg", true, true, true}, +- {"google.vu", true, true, true}, +- {"google.ws", true, true, true}, +- {"l.google.com", true, true, true}, +- +- // google.com is a special case. We have a custom config for www.google.com, +- // so set generate_config_for_www_subdomain = false. +- {"google.com", true, true, false}, +- +- // Origins with subdomains and without same-origin collectors. +- {"2mdn.net", true, false, false}, +- {"adgoogle.net", true, false, false}, +- {"admeld.com", true, false, false}, +- {"admob.biz", true, false, false}, +- {"admob.co.in", true, false, false}, +- {"admob.co.kr", true, false, false}, +- {"admob.co.nz", true, false, false}, +- {"admob.co.uk", true, false, false}, +- {"admob.co.za", true, false, false}, +- {"admob.com", true, false, false}, +- {"admob.com.br", true, false, false}, +- {"admob.com.es", true, false, false}, +- {"admob.com.fr", true, false, false}, +- {"admob.com.mx", true, false, false}, +- {"admob.com.pt", true, false, false}, +- {"admob.de", true, false, false}, +- {"admob.dk", true, false, false}, +- {"admob.es", true, false, false}, +- {"admob.fi", true, false, false}, +- {"admob.fr", true, false, false}, +- {"admob.gr", true, false, false}, +- {"admob.hk", true, false, false}, +- {"admob.ie", true, false, false}, +- {"admob.in", true, false, false}, +- {"admob.it", true, false, false}, +- {"admob.jp", true, false, false}, +- {"admob.kr", true, false, false}, +- {"admob.mobi", true, false, false}, +- {"admob.no", true, false, false}, +- {"admob.ph", true, false, false}, +- {"admob.pt", true, false, false}, +- {"admob.sg", true, false, false}, +- {"admob.tw", true, false, false}, +- {"admob.us", true, false, false}, +- {"admob.vn", true, false, false}, +- {"adwhirl.com", true, false, false}, +- {"ampproject.com", true, false, false}, +- {"ampproject.net", true, false, false}, +- {"ampproject.org", true, false, false}, +- {"android.com", true, false, false}, +- {"anycast-edge.metric.gstatic.com", true, false, false}, +- {"anycast-stb.metric.gstatic.com", true, false, false}, +- {"anycast.metric.gstatic.com", true, false, false}, +- {"cdn.ampproject.org", true, false, false}, +- {"chromecast.com", true, false, false}, +- {"chromeexperiments.com", true, false, false}, +- {"chromestatus.com", true, false, false}, +- {"chromium.org", true, false, false}, +- {"clients6.google.com", true, false, false}, +- {"cloudendpointsapis.com", true, false, false}, +- {"dartmotif.com", true, false, false}, +- {"dartsearch.net", true, false, false}, +- {"doubleclick.com", true, false, false}, +- {"doubleclick.ne.jp", true, false, false}, +- {"doubleclick.net", true, false, false}, +- {"doubleclickusercontent.com", true, false, false}, +- {"fls.doubleclick.net", true, false, false}, +- {"g.co", true, false, false}, +- {"g.doubleclick.net", true, false, false}, +- {"ggpht.com", true, false, false}, +- {"gmodules.com", true, false, false}, +- {"goo.gl", true, false, false}, +- {"google-syndication.com", true, false, false}, +- {"google.cat", true, false, false}, +- {"google.info", true, false, false}, +- {"google.jobs", true, false, false}, +- {"google.net", true, false, false}, +- {"google.org", true, false, false}, +- {"google.stackdriver.com", true, false, false}, +- {"googleadapis.com", true, false, false}, +- {"googleadservices.com", true, false, false}, +- {"googleadsserving.cn", true, false, false}, +- {"googlealumni.com", true, false, false}, +- {"googleapis.cn", true, false, false}, +- {"googleapis.com", true, false, false}, +- {"googleapps.com", true, false, false}, +- {"googlecbs.com", true, false, false}, +- {"googlecode.com", true, false, false}, +- {"googlecommerce.com", true, false, false}, +- {"googledrive.com", true, false, false}, +- {"googleenterprise.com", true, false, false}, +- {"googlefiber.com", true, false, false}, +- {"googlefiber.net", true, false, false}, +- {"googlegoro.com", true, false, false}, +- {"googlehosted.com", true, false, false}, +- {"googlepayments.com", true, false, false}, +- {"googlesource.com", true, false, false}, +- {"googlesyndication.com", true, false, false}, +- {"googletagmanager.com", true, false, false}, +- {"googletagservices.com", true, false, false}, +- {"googleusercontent.com", true, false, false}, +- {"googlezip.net", true, false, false}, +- {"gstatic.cn", true, false, false}, +- {"gstatic.com", true, false, false}, +- {"gvt3.com", true, false, false}, +- {"gvt9.com", true, false, false}, +- {"picasa.com", true, false, false}, +- {"recaptcha.net", true, false, false}, +- {"stackdriver.com", true, false, false}, +- {"stbcast-stb.metric.gstatic.com", true, false, false}, +- {"stbcast.metric.gstatic.com", true, false, false}, +- {"stbcast2-stb.metric.gstatic.com", true, false, false}, +- {"stbcast2.metric.gstatic.com", true, false, false}, +- {"stbcast3-stb.metric.gstatic.com", true, false, false}, +- {"stbcast3.metric.gstatic.com", true, false, false}, +- {"stbcast4-stb.metric.gstatic.com", true, false, false}, +- {"stbcast4.metric.gstatic.com", true, false, false}, +- {"unicast-edge.metric.gstatic.com", true, false, false}, +- {"unicast-stb.metric.gstatic.com", true, false, false}, +- {"unicast.metric.gstatic.com", true, false, false}, +- {"unicast2-stb.metric.gstatic.com", true, false, false}, +- {"unicast2.metric.gstatic.com", true, false, false}, +- {"waze.com", true, false, false}, +- {"withgoogle.com", true, false, false}, +- {"youtu.be", true, false, false}, +- {"youtube-3rd-party.com", true, false, false}, +- {"youtube-nocookie.com", true, false, false}, +- {"youtube.ae", true, false, false}, +- {"youtube.al", true, false, false}, +- {"youtube.am", true, false, false}, +- {"youtube.at", true, false, false}, +- {"youtube.az", true, false, false}, +- {"youtube.ba", true, false, false}, +- {"youtube.be", true, false, false}, +- {"youtube.bg", true, false, false}, +- {"youtube.bh", true, false, false}, +- {"youtube.bo", true, false, false}, +- {"youtube.ca", true, false, false}, +- {"youtube.cat", true, false, false}, +- {"youtube.ch", true, false, false}, +- {"youtube.cl", true, false, false}, +- {"youtube.co", true, false, false}, +- {"youtube.co.ae", true, false, false}, +- {"youtube.co.at", true, false, false}, +- {"youtube.co.hu", true, false, false}, +- {"youtube.co.id", true, false, false}, +- {"youtube.co.il", true, false, false}, +- {"youtube.co.in", true, false, false}, +- {"youtube.co.jp", true, false, false}, +- {"youtube.co.ke", true, false, false}, +- {"youtube.co.kr", true, false, false}, +- {"youtube.co.ma", true, false, false}, +- {"youtube.co.nz", true, false, false}, +- {"youtube.co.th", true, false, false}, +- {"youtube.co.ug", true, false, false}, +- {"youtube.co.uk", true, false, false}, +- {"youtube.co.ve", true, false, false}, +- {"youtube.co.za", true, false, false}, +- {"youtube.com", true, false, false}, +- {"youtube.com.ar", true, false, false}, +- {"youtube.com.au", true, false, false}, +- {"youtube.com.az", true, false, false}, +- {"youtube.com.bh", true, false, false}, +- {"youtube.com.bo", true, false, false}, +- {"youtube.com.br", true, false, false}, +- {"youtube.com.by", true, false, false}, +- {"youtube.com.co", true, false, false}, +- {"youtube.com.do", true, false, false}, +- {"youtube.com.ee", true, false, false}, +- {"youtube.com.eg", true, false, false}, +- {"youtube.com.es", true, false, false}, +- {"youtube.com.gh", true, false, false}, +- {"youtube.com.gr", true, false, false}, +- {"youtube.com.gt", true, false, false}, +- {"youtube.com.hk", true, false, false}, +- {"youtube.com.hr", true, false, false}, +- {"youtube.com.jm", true, false, false}, +- {"youtube.com.jo", true, false, false}, +- {"youtube.com.kw", true, false, false}, +- {"youtube.com.lb", true, false, false}, +- {"youtube.com.lv", true, false, false}, +- {"youtube.com.mk", true, false, false}, +- {"youtube.com.mt", true, false, false}, +- {"youtube.com.mx", true, false, false}, +- {"youtube.com.my", true, false, false}, +- {"youtube.com.ng", true, false, false}, +- {"youtube.com.om", true, false, false}, +- {"youtube.com.pe", true, false, false}, +- {"youtube.com.ph", true, false, false}, +- {"youtube.com.pk", true, false, false}, +- {"youtube.com.pt", true, false, false}, +- {"youtube.com.qa", true, false, false}, +- {"youtube.com.ro", true, false, false}, +- {"youtube.com.sa", true, false, false}, +- {"youtube.com.sg", true, false, false}, +- {"youtube.com.tn", true, false, false}, +- {"youtube.com.tr", true, false, false}, +- {"youtube.com.tw", true, false, false}, +- {"youtube.com.ua", true, false, false}, +- {"youtube.com.uy", true, false, false}, +- {"youtube.com.ve", true, false, false}, +- {"youtube.cz", true, false, false}, +- {"youtube.de", true, false, false}, +- {"youtube.dk", true, false, false}, +- {"youtube.ee", true, false, false}, +- {"youtube.es", true, false, false}, +- {"youtube.fi", true, false, false}, +- {"youtube.fr", true, false, false}, +- {"youtube.ge", true, false, false}, +- {"youtube.gr", true, false, false}, +- {"youtube.gt", true, false, false}, +- {"youtube.hk", true, false, false}, +- {"youtube.hr", true, false, false}, +- {"youtube.hu", true, false, false}, +- {"youtube.ie", true, false, false}, +- {"youtube.in", true, false, false}, +- {"youtube.is", true, false, false}, +- {"youtube.it", true, false, false}, +- {"youtube.jo", true, false, false}, +- {"youtube.jp", true, false, false}, +- {"youtube.kr", true, false, false}, +- {"youtube.lk", true, false, false}, +- {"youtube.lt", true, false, false}, +- {"youtube.lv", true, false, false}, +- {"youtube.ma", true, false, false}, +- {"youtube.md", true, false, false}, +- {"youtube.me", true, false, false}, +- {"youtube.mk", true, false, false}, +- {"youtube.mx", true, false, false}, +- {"youtube.my", true, false, false}, +- {"youtube.ng", true, false, false}, +- {"youtube.nl", true, false, false}, +- {"youtube.no", true, false, false}, +- {"youtube.pe", true, false, false}, +- {"youtube.ph", true, false, false}, +- {"youtube.pk", true, false, false}, +- {"youtube.pl", true, false, false}, +- {"youtube.pr", true, false, false}, +- {"youtube.pt", true, false, false}, +- {"youtube.qa", true, false, false}, +- {"youtube.ro", true, false, false}, +- {"youtube.rs", true, false, false}, +- {"youtube.ru", true, false, false}, +- {"youtube.sa", true, false, false}, +- {"youtube.se", true, false, false}, +- {"youtube.sg", true, false, false}, +- {"youtube.si", true, false, false}, +- {"youtube.sk", true, false, false}, +- {"youtube.sn", true, false, false}, +- {"youtube.tn", true, false, false}, +- {"youtube.ua", true, false, false}, +- {"youtube.ug", true, false, false}, +- {"youtube.uy", true, false, false}, +- {"youtube.vn", true, false, false}, +- {"youtubeeducation.com", true, false, false}, +- {"youtubemobilesupport.com", true, false, false}, +- {"ytimg.com", true, false, false}, +- +- // Origins without subdomains and with same-origin collectors. +- {"accounts.google.com", false, true, false}, +- {"apis.google.com", false, true, false}, +- {"app.google.stackdriver.com", false, true, false}, +- {"b.mail.google.com", false, true, false}, +- {"chatenabled.mail.google.com", false, true, false}, +- {"ddm.google.com", false, true, false}, +- {"gmail.com", false, true, false}, +- {"gmail.google.com", false, true, false}, +- {"mail-attachment.googleusercontent.com", false, true, false}, +- {"mail.google.com", false, true, false}, +- {"www.gmail.com", false, true, false}, +- +- // Origins without subdomains or same-origin collectors. +- {"ad.doubleclick.net", false, false, false}, +- {"drive.google.com", false, false, false}, +- {"redirector.googlevideo.com", false, false, false}, +-}; +- +-const char* const kGoogleStandardCollectors[] = { +- "https://beacons.gcp.gvt2.com/domainreliability/upload", +- "https://beacons.gvt2.com/domainreliability/upload", +- "https://beacons2.gvt2.com/domainreliability/upload", +- "https://beacons3.gvt2.com/domainreliability/upload", +- "https://beacons4.gvt2.com/domainreliability/upload", +- "https://beacons5.gvt2.com/domainreliability/upload", +- "https://beacons5.gvt3.com/domainreliability/upload", +- "https://clients2.google.com/domainreliability/upload", +-}; +- +-const char* const kGoogleOriginSpecificCollectorPathString = +- "/domainreliability/upload"; +- +-static std::unique_ptr CreateGoogleConfig( +- const GoogleConfigParams& params, +- bool is_www) { +- if (is_www) +- DCHECK(params.duplicate_for_www); +- +- std::string hostname = (is_www ? "www." : "") + std::string(params.hostname); +- bool include_subdomains = params.include_subdomains && !is_www; +- +- std::unique_ptr config( +- new DomainReliabilityConfig()); +- config->origin = GURL("https://" + hostname + "/"); +- config->include_subdomains = include_subdomains; +- config->collectors.clear(); +- if (params.include_origin_specific_collector) { +- GURL::Replacements replacements; +- replacements.SetPathStr(kGoogleOriginSpecificCollectorPathString); +- config->collectors.push_back( +- std::make_unique(config->origin.ReplaceComponents(replacements))); +- } +- for (size_t i = 0; i < base::size(kGoogleStandardCollectors); i++) +- config->collectors.push_back( +- std::make_unique(kGoogleStandardCollectors[i])); +- config->success_sample_rate = 0.05; +- config->failure_sample_rate = 1.00; +- config->path_prefixes.clear(); +- return config; +-} +- +-} // namespace +- + // static + void GetAllGoogleConfigs( + std::vector>* configs_out) { + configs_out->clear(); +- +- for (auto& params : kGoogleConfigs) { +- configs_out->push_back(CreateGoogleConfig(params, false)); +- if (params.duplicate_for_www) +- configs_out->push_back(CreateGoogleConfig(params, true)); +- } + } + + } // namespace domain_reliability +--- a/components/domain_reliability/uploader.cc ++++ b/components/domain_reliability/uploader.cc +@@ -82,7 +82,7 @@ class DomainReliabilityUploaderImpl + if (discard_uploads_) + discarded_upload_count_++; + +- if (discard_uploads_ || shutdown_) { ++ if (true) { + DVLOG(1) << "Discarding report instead of uploading."; + UploadResult result; + result.status = UploadResult::SUCCESS; +--- a/components/domain_reliability/bake_in_configs.py ++++ b/components/domain_reliability/bake_in_configs.py +@@ -490,7 +490,7 @@ def origin_is_whitelisted(origin): + domain = origin[8:-1] + else: + return False +- return any(domain == e or domain.endswith('.' + e) for e in DOMAIN_WHITELIST) ++ return False + + + def quote_and_wrap_text(text, width=79, prefix=' "', suffix='"'): +--- a/components/domain_reliability/BUILD.gn ++++ b/components/domain_reliability/BUILD.gn +@@ -9,26 +9,6 @@ action("bake_in_configs") { + script = "bake_in_configs.py" + + inputs = [ +- "baked_in_configs/c_android_clients_google_com.json", +- "baked_in_configs/c_bigcache_googleapis_com.json", +- "baked_in_configs/c_doc-0-0-sj_sj_googleusercontent_com.json", +- "baked_in_configs/c_docs_google_com.json", +- "baked_in_configs/c_drive_google_com.json", +- "baked_in_configs/c_googlesyndication_com.json", +- "baked_in_configs/c_pack_google_com.json", +- "baked_in_configs/c_play_google_com.json", +- "baked_in_configs/c_youtube_com.json", +- "baked_in_configs/clients2_google_com.json", +- "baked_in_configs/docs_google_com.json", +- "baked_in_configs/gcp_gvt2_com.json", +- "baked_in_configs/gcp_gvt6_com.json", +- "baked_in_configs/google-analytics_com.json", +- "baked_in_configs/googlevideo_com.json", +- "baked_in_configs/gvt1_com.json", +- "baked_in_configs/gvt2_com.json", +- "baked_in_configs/gvt6_com.json", +- "baked_in_configs/ssl_gstatic_com.json", +- "baked_in_configs/www_google_com.json", + ] + + output_file = "$target_gen_dir/baked_in_configs.cc" +@@ -38,13 +18,21 @@ action("bake_in_configs") { + + # The JSON file list is too long for the command line on Windows, so put + # them in a response file. +- response_file_contents = rebase_path(inputs, root_build_dir) +- args = [ +- "--file-list", +- "{{response_file_name}}", +- "--output", +- rebase_path(output_file, root_build_dir), +- ] ++ if (is_win) { ++ args = [ ++ "--file-list", ++ "nul", ++ "--output", ++ rebase_path(output_file, root_build_dir), ++ ] ++ } else { ++ args = [ ++ "--file-list", ++ "/dev/null", ++ "--output", ++ rebase_path(output_file, root_build_dir), ++ ] ++ } + } + + jumbo_component("domain_reliability") { diff --git a/testing/chromium/patches/disable-download-quarantine.patch b/testing/chromium/patches/disable-download-quarantine.patch new file mode 100644 index 00000000..07715cde --- /dev/null +++ b/testing/chromium/patches/disable-download-quarantine.patch @@ -0,0 +1,98 @@ +# Disables file download quarantining + +--- a/content/browser/renderer_host/pepper/pepper_file_io_host.cc ++++ b/content/browser/renderer_host/pepper/pepper_file_io_host.cc +@@ -432,7 +432,7 @@ void PepperFileIOHost::OnLocalFileOpened + ppapi::host::ReplyMessageContext reply_context, + const base::FilePath& path, + base::File::Error error_code) { +-#if defined(OS_WIN) || defined(OS_LINUX) ++#if 0 + // Quarantining a file before its contents are available is only supported on + // Windows and Linux. + if (!FileOpenForWrite(open_flags_) || error_code != base::File::FILE_OK) { +@@ -452,7 +452,7 @@ void PepperFileIOHost::OnLocalFileOpened + #endif + } + +-#if defined(OS_WIN) || defined(OS_LINUX) ++#if 0 + void PepperFileIOHost::OnLocalFileQuarantined( + ppapi::host::ReplyMessageContext reply_context, + const base::FilePath& path, +--- a/content/browser/renderer_host/pepper/pepper_file_io_host.h ++++ b/content/browser/renderer_host/pepper/pepper_file_io_host.h +@@ -15,7 +15,6 @@ + #include "base/macros.h" + #include "base/memory/ref_counted.h" + #include "base/memory/weak_ptr.h" +-#include "components/download/quarantine/quarantine.h" + #include "content/browser/renderer_host/pepper/browser_ppapi_host_impl.h" + #include "ipc/ipc_listener.h" + #include "ipc/ipc_platform_file.h" +@@ -92,10 +91,6 @@ class PepperFileIOHost : public ppapi::h + const base::FilePath& path, + base::File::Error error_code); + +- void OnLocalFileQuarantined(ppapi::host::ReplyMessageContext reply_context, +- const base::FilePath& path, +- download::QuarantineFileResult quarantine_result); +- + void SendFileOpenReply(ppapi::host::ReplyMessageContext reply_context, + base::File::Error error_code); + +--- a/components/download/internal/common/base_file.cc ++++ b/components/download/internal/common/base_file.cc +@@ -22,7 +22,6 @@ + #include "components/download/public/common/download_interrupt_reasons_utils.h" + #include "components/download/public/common/download_item.h" + #include "components/download/public/common/download_stats.h" +-#include "components/download/quarantine/quarantine.h" + #include "crypto/secure_hash.h" + + #if defined(OS_ANDROID) +@@ -494,7 +493,7 @@ DownloadInterruptReason BaseFile::Publis + } + #endif // defined(OS_ANDROID) + +-#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) ++#if 0 + + namespace { + +@@ -578,7 +577,7 @@ DownloadInterruptReason BaseFile::Annota + } + return DOWNLOAD_INTERRUPT_REASON_FILE_FAILED; + } +-#else // !OS_WIN && !OS_MACOSX && !OS_LINUX ++#else // 1 + DownloadInterruptReason BaseFile::AnnotateWithSourceInformation( + const std::string& client_guid, + const GURL& source_url, +--- a/components/download/quarantine/quarantine.cc ++++ b/components/download/quarantine/quarantine.cc +@@ -6,8 +6,6 @@ + + #include "build/build_config.h" + +-#if !defined(OS_WIN) && !defined(OS_MACOSX) +- + namespace download { + + QuarantineFileResult QuarantineFile(const base::FilePath& file, +@@ -18,5 +16,3 @@ QuarantineFileResult QuarantineFile(cons + } + + } // namespace download +- +-#endif // !WIN && !MAC +--- a/content/browser/BUILD.gn ++++ b/content/browser/BUILD.gn +@@ -51,7 +51,6 @@ jumbo_source_set("browser") { + "//components/discardable_memory/service", + "//components/download/database", + "//components/download/public/common:public", +- "//components/download/quarantine", + "//components/filename_generation", + "//components/link_header_util", + "//components/metrics", diff --git a/testing/chromium/patches/disable-fetching-field-trials.patch b/testing/chromium/patches/disable-fetching-field-trials.patch new file mode 100644 index 00000000..46de6540 --- /dev/null +++ b/testing/chromium/patches/disable-fetching-field-trials.patch @@ -0,0 +1,66 @@ +# NOTE: Modified to remove usage of compiler #if macros +From: csagan5 <32685696+csagan5@users.noreply.github.com> +Date: Sun, 8 Jul 2018 18:16:34 +0200 +Subject: Disable fetching of all field trials + +--- + .../src/org/chromium/chrome/browser/ChromeFeatureList.java | 12 +++--------- + components/variations/service/variations_service.cc | 4 ++++ + 2 files changed, 7 insertions(+), 9 deletions(-) + +--- a/chrome/android/java/src/org/chromium/chrome/browser/ChromeFeatureList.java ++++ b/chrome/android/java/src/org/chromium/chrome/browser/ChromeFeatureList.java +@@ -106,9 +106,7 @@ public abstract class ChromeFeatureList + */ + public static int getFieldTrialParamByFeatureAsInt( + String featureName, String paramName, int defaultValue) { +- if (sTestFeatures != null) return defaultValue; +- assert isInitialized(); +- return nativeGetFieldTrialParamByFeatureAsInt(featureName, paramName, defaultValue); ++ return defaultValue; + } + + /** +@@ -125,9 +123,7 @@ public abstract class ChromeFeatureList + */ + public static double getFieldTrialParamByFeatureAsDouble( + String featureName, String paramName, double defaultValue) { +- if (sTestFeatures != null) return defaultValue; +- assert isInitialized(); +- return nativeGetFieldTrialParamByFeatureAsDouble(featureName, paramName, defaultValue); ++ return defaultValue; + } + + /** +@@ -144,9 +140,7 @@ public abstract class ChromeFeatureList + */ + public static boolean getFieldTrialParamByFeatureAsBoolean( + String featureName, String paramName, boolean defaultValue) { +- if (sTestFeatures != null) return defaultValue; +- assert isInitialized(); +- return nativeGetFieldTrialParamByFeatureAsBoolean(featureName, paramName, defaultValue); ++ return defaultValue; + } + + // Alphabetical: +--- a/components/variations/service/variations_service.cc ++++ b/components/variations/service/variations_service.cc +@@ -240,17 +240,7 @@ bool GetInstanceManipulations(const net: + // Variations seed fetching is only enabled in official Chrome builds, if a URL + // is specified on the command line, and for testing. + bool IsFetchingEnabled() { +-#if !defined(GOOGLE_CHROME_BUILD) +- if (!base::CommandLine::ForCurrentProcess()->HasSwitch( +- switches::kVariationsServerURL) && +- !g_should_fetch_for_testing) { +- DVLOG(1) +- << "Not performing repeated fetching in unofficial build without --" +- << switches::kVariationsServerURL << " specified."; +- return false; +- } +-#endif +- return true; ++ return false; + } + + std::unique_ptr MaybeImportFirstRunSeed( diff --git a/testing/chromium/patches/disable-fonts-googleapis-references.patch b/testing/chromium/patches/disable-fonts-googleapis-references.patch new file mode 100644 index 00000000..045283ff --- /dev/null +++ b/testing/chromium/patches/disable-fonts-googleapis-references.patch @@ -0,0 +1,107 @@ +# Disables references to fonts.googleapis.com + +--- a/components/dom_distiller/content/browser/dom_distiller_viewer_source.cc ++++ b/components/dom_distiller/content/browser/dom_distiller_viewer_source.cc +@@ -309,7 +309,7 @@ bool DomDistillerViewerSource::ShouldSer + } + + std::string DomDistillerViewerSource::GetContentSecurityPolicyStyleSrc() const { +- return "style-src 'self' https://fonts.googleapis.com;"; ++ return "style-src 'self';"; + } + + std::string DomDistillerViewerSource::GetContentSecurityPolicyChildSrc() const { +--- a/components/dom_distiller/core/html/preview.html ++++ b/components/dom_distiller/core/html/preview.html +@@ -11,7 +11,7 @@ found in the LICENSE file. + + Title goes here and it could be kind of lengthy - Publisher name + +- ++ +