Updated Bromite patches for next release

Disable fetching of popular sites
This commit is contained in:
csagan5
2018-02-15 13:39:20 +01:00
parent 530626fd21
commit 2bda9e45f6
19 changed files with 3911 additions and 42 deletions
@@ -18,7 +18,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
@@ -860,7 +860,7 @@ void ChromeContentBrowserClient::RegisterLocalStatePrefs(
@@ -882,7 +882,7 @@ void ChromeContentBrowserClient::RegisterLocalStatePrefs(
void ChromeContentBrowserClient::RegisterProfilePrefs(
user_prefs::PrefRegistrySyncable* registry) {
registry->RegisterBooleanPref(prefs::kDisable3DAPIs, false);
@@ -104,7 +104,7 @@ diff --git a/chrome/browser/signin/signin_promo.cc b/chrome/browser/signin/signi
diff --git a/chrome/browser/ui/browser_ui_prefs.cc b/chrome/browser/ui/browser_ui_prefs.cc
--- a/chrome/browser/ui/browser_ui_prefs.cc
+++ b/chrome/browser/ui/browser_ui_prefs.cc
@@ -57,11 +57,11 @@ void RegisterBrowserUserPrefs(user_prefs::PrefRegistrySyncable* registry) {
@@ -65,11 +65,11 @@ void RegisterBrowserUserPrefs(user_prefs::PrefRegistrySyncable* registry) {
registry->RegisterBooleanPref(prefs::kWebAppCreateInAppsMenu, true);
registry->RegisterBooleanPref(prefs::kWebAppCreateInQuickLaunchBar, true);
registry->RegisterBooleanPref(
@@ -189,7 +189,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
@@ -338,9 +338,9 @@ void RegisterProfilePrefs(PrefRegistrySimple* registry) {
@@ -346,9 +346,9 @@ void RegisterProfilePrefs(PrefRegistrySimple* registry) {
registry->RegisterBooleanPref(
prefs::kSafeBrowsingSawInterstitialScoutReporting, false);
registry->RegisterBooleanPref(
@@ -6,7 +6,7 @@ Date: Thu Oct 26 16:59:03 2017 +0200
diff --git a/chrome/browser/ui/browser_ui_prefs.cc b/chrome/browser/ui/browser_ui_prefs.cc
--- a/chrome/browser/ui/browser_ui_prefs.cc
+++ b/chrome/browser/ui/browser_ui_prefs.cc
@@ -76,10 +76,10 @@ void RegisterBrowserUserPrefs(user_prefs::PrefRegistrySyncable* registry) {
@@ -84,10 +84,10 @@ void RegisterBrowserUserPrefs(user_prefs::PrefRegistrySyncable* registry) {
#endif
#if BUILDFLAG(ENABLE_WEBRTC)
// TODO(guoweis): Remove next 2 options at M50.
@@ -1,18 +0,0 @@
Author: csagan5 <32685696+csagan5@users.noreply.github.com>
Date: Thu Oct 26 17:05:31 2017 +0200
Use 64bit WebView processes
diff --git a/android_webview/apk/java/AndroidManifest.xml b/android_webview/apk/java/AndroidManifest.xml
--- a/android_webview/apk/java/AndroidManifest.xml
+++ b/android_webview/apk/java/AndroidManifest.xml
@@ -20,8 +20,7 @@
<application android:label="Android System WebView"
android:icon="@drawable/icon_webview"
- android:multiArch="true"
- android:use32bitAbi="true">
+ android:multiArch="true">
{# This part is shared between stand-alone WebView and Monochrome #}
{% macro common(manifest_package, webview_lib) %}
<meta-data android:name="com.android.webview.WebViewLibrary"
@@ -75,7 +75,7 @@ diff --git a/third_party/WebKit/Source/core/css/parser/CSSSelectorParser.cpp b/t
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -671,6 +670,9 @@ CSSSelector::RelationType CSSSelectorParser::ConsumeCombinator(
@@ -667,6 +666,9 @@ CSSSelector::RelationType CSSSelectorParser::ConsumeCombinator(
const CSSParserToken& slash = range.ConsumeIncludingWhitespace();
if (slash.GetType() != kDelimiterToken || slash.Delimiter() != '/')
failed_parsing_ = true;
@@ -88,7 +88,7 @@ diff --git a/third_party/WebKit/Source/core/css/parser/CSSSelectorParser.cpp b/t
diff --git a/third_party/WebKit/Source/platform/runtime_enabled_features.json5 b/third_party/WebKit/Source/platform/runtime_enabled_features.json5
--- a/third_party/WebKit/Source/platform/runtime_enabled_features.json5
+++ b/third_party/WebKit/Source/platform/runtime_enabled_features.json5
@@ -322,6 +322,11 @@
@@ -325,6 +325,11 @@
name: "DecodeToYUV",
status: "experimental",
},
@@ -100,7 +100,7 @@ diff --git a/third_party/WebKit/Source/platform/runtime_enabled_features.json5 b
{
name: "DeprecationReporting",
status: "experimental",
@@ -984,6 +989,11 @@
@@ -973,6 +978,11 @@
name: "ShadowPiercingDescendantCombinator",
status: "experimental",
},
@@ -26,7 +26,7 @@ diff --git a/third_party/WebKit/LayoutTests/shadow-dom/v0/closed-mode-deep-combi
diff --git a/third_party/WebKit/Source/core/frame/Deprecation.cpp b/third_party/WebKit/Source/core/frame/Deprecation.cpp
--- a/third_party/WebKit/Source/core/frame/Deprecation.cpp
+++ b/third_party/WebKit/Source/core/frame/Deprecation.cpp
@@ -406,13 +406,13 @@ DeprecationInfo GetDeprecationInfo(WebFeature feature) {
@@ -388,13 +388,13 @@ DeprecationInfo GetDeprecationInfo(WebFeature feature) {
"details.")};
case WebFeature::kCSSDeepCombinator:
@@ -50,7 +50,7 @@ diff --git a/third_party/WebKit/Source/core/frame/Deprecation.cpp b/third_party/
diff --git a/third_party/WebKit/Source/platform/runtime_enabled_features.json5 b/third_party/WebKit/Source/platform/runtime_enabled_features.json5
--- a/third_party/WebKit/Source/platform/runtime_enabled_features.json5
+++ b/third_party/WebKit/Source/platform/runtime_enabled_features.json5
@@ -322,10 +322,11 @@
@@ -325,10 +325,11 @@
name: "DecodeToYUV",
status: "experimental",
},
@@ -64,7 +64,7 @@ diff --git a/third_party/WebKit/Source/platform/runtime_enabled_features.json5 b
},
{
name: "DeprecationReporting",
@@ -989,10 +990,11 @@
@@ -978,10 +979,11 @@
name: "ShadowPiercingDescendantCombinator",
status: "experimental",
},
@@ -8,7 +8,7 @@ Date: Sat Oct 28 10:09:41 2017 +0200
diff --git a/third_party/WebKit/Source/core/dom/BUILD.gn b/third_party/WebKit/Source/core/dom/BUILD.gn
--- a/third_party/WebKit/Source/core/dom/BUILD.gn
+++ b/third_party/WebKit/Source/core/dom/BUILD.gn
@@ -297,6 +297,7 @@ blink_core_sources("dom") {
@@ -301,6 +301,7 @@ blink_core_sources("dom") {
"events/TreeScopeEventContext.h",
"events/WindowEventContext.cpp",
"events/WindowEventContext.h",
@@ -19,7 +19,7 @@ diff --git a/third_party/WebKit/Source/core/dom/BUILD.gn b/third_party/WebKit/So
diff --git a/third_party/WebKit/Source/core/dom/Document.cpp b/third_party/WebKit/Source/core/dom/Document.cpp
--- a/third_party/WebKit/Source/core/dom/Document.cpp
+++ b/third_party/WebKit/Source/core/dom/Document.cpp
@@ -222,6 +222,7 @@
@@ -221,6 +221,7 @@
#include "core/xml/parser/XMLDocumentParser.h"
#include "core/xml_names.h"
#include "core/xmlns_names.h"
@@ -27,7 +27,7 @@ diff --git a/third_party/WebKit/Source/core/dom/Document.cpp b/third_party/WebKi
#include "platform/CrossThreadFunctional.h"
#include "platform/DateComponents.h"
#include "platform/EventDispatchForbiddenScope.h"
@@ -5912,8 +5913,24 @@ void Document::FinishedParsing() {
@@ -5879,8 +5880,24 @@ void Document::FinishedParsing() {
fetcher_->ClearResourcesFromPreviousFetcher();
}
@@ -45,7 +45,7 @@ diff --git a/third_party/WebKit/Source/core/dom/Document.cpp b/third_party/WebKi
+ auto* bodyElement = body();
+ if (bodyElement && (pos != WTF::kNotFound) && (domain.length() - pos - 8 < 4)) {
+ LOG(INFO) << "injecting dont-track-me Javascript payload";
+ HTMLScriptElement* e = HTMLScriptElement::Create(*this, false);
+ HTMLScriptElement* e = HTMLScriptElement::Create(*this, CreateElementFlags());
+ e->setText(DONT_TRACK_ME_JS);
+ bodyElement->AppendChild(e);
+ }
@@ -0,0 +1,21 @@
Author: csagan5 <32685696+csagan5@users.noreply.github.com>
Date: Wed Feb 14 12:56:01 2018 +0100
Never fetch popular sites
diff --git a/components/ntp_tiles/popular_sites_impl.cc b/components/ntp_tiles/popular_sites_impl.cc
--- a/components/ntp_tiles/popular_sites_impl.cc
+++ b/components/ntp_tiles/popular_sites_impl.cc
@@ -290,6 +290,12 @@ bool PopularSitesImpl::MaybeStartFetch(bool force_download,
DCHECK(!callback_);
callback_ = callback;
+ if (force_download) {
+ callback_.Run(true);
+ return true;
+ }
+ return false;
+
const base::Time last_download_time = base::Time::FromInternalValue(
prefs_->GetInt64(prefs::kPopularSitesLastDownloadPref));
const base::TimeDelta time_since_last_download =
File diff suppressed because it is too large Load Diff