Compare commits

...
Author SHA1 Message Date
csagan5 ca0a121f19 Updated patches for new release 2017-12-09 12:02:35 +01:00
csagan5 65554f30c6 Release 63.0.3239.78 2017-12-06 15:38:49 +01:00
csagan5 4f1fa500e3 Updated CHANGELOG 2017-12-03 21:18:37 +01:00
csagan5 00ad417ff8 Updated patches for release 63.0.3239.64 2017-11-27 15:04:24 +01:00
csagan5 af04dfea67 Update patch to fix the incognito new tab 2017-11-26 11:59:36 +01:00
csagan5 b26461b55f Adapted patch to latest Chromium 2017-11-26 11:06:20 +01:00
6 changed files with 41849 additions and 51088 deletions
+17
View File
@@ -1,3 +1,20 @@
# 63.0.3239.85
* no suggest URL for DuckDuckGo (https://github.com/bromite/bromite/issues/19)
* fixed 4chan blocking rule
* limit AMP links cleanup to search results only (fixes broken images/news result tabs)
* updated adBlock filters
# 63.0.3239.78
* correctly set version and build numbers
* updated adBlock filters
# 63.0.3239.73
# 63.0.3239.64
* updated adblock filters
* fixed an issue with incognito new tab
* permanent disable for ToS/metrics and unused auto-updates check
# 63.0.3239.46
* removed search engine geolocation default patch
File diff suppressed because it is too large Load Diff
+3 -5
View File
@@ -1,14 +1,13 @@
commit 4035ce612520759de41a4870b0035946deea2efc
Author: csagan5 <32685696+csagan5@users.noreply.github.com>
Date: Thu Oct 12 11:06:18 2017 +0200
Add DuckDuckGo search engine, not enabled by default
diff --git a/components/search_engines/prepopulated_engines.json b/components/search_engines/prepopulated_engines.json
index 002b6c0..25e85ab 100644
index 002b6c0..7b4155b 100644
--- a/components/search_engines/prepopulated_engines.json
+++ b/components/search_engines/prepopulated_engines.json
@@ -32,12 +32,23 @@
@@ -32,12 +32,22 @@
// Increment this if you change the data in ways that mean users with
// existing data should get a new version.
@@ -24,7 +23,6 @@ index 002b6c0..25e85ab 100644
+ "keyword": "duckduckgo.com",
+ "favicon_url": "https://duckduckgo.com/favicon.ico",
+ "search_url": "https://duckduckgo.com/?q={searchTerms}",
+ "suggest_url": "https://duckduckgo.com/?q={searchTerms}&language={language}&kac=1",
+ "new_tab_url": "https://duckduckgo.com/",
+ "type": "SEARCH_ENGINE_DUCKDUCKGO",
+ "id": 11
@@ -46,7 +44,7 @@ index c19dd0e..02f6b16 100644
};
diff --git a/components/search_engines/template_url_prepopulate_data.cc b/components/search_engines/template_url_prepopulate_data.cc
index 862e001..7adede7 100644
index 6be17ee..ef50529 100644
--- a/components/search_engines/template_url_prepopulate_data.cc
+++ b/components/search_engines/template_url_prepopulate_data.cc
@@ -50,548 +50,548 @@ namespace {
@@ -1,11 +1,11 @@
commit 39ee52cbd24fe20205f146873dddb4063b80f546
Author: csagan5 <32685696+csagan5@users.noreply.github.com>
Date: Sat Oct 28 10:09:41 2017 +0200
Do not track google search results clicks, remove AMP
Do not track google search results clicks
Limit AMP cleanup to main search results
diff --git a/third_party/WebKit/Source/core/dom/BUILD.gn b/third_party/WebKit/Source/core/dom/BUILD.gn
index b636bb4..d2e30a1 100644
--- a/third_party/WebKit/Source/core/dom/BUILD.gn
+++ b/third_party/WebKit/Source/core/dom/BUILD.gn
@@ -344,6 +344,7 @@ blink_core_sources("dom") {
@@ -17,7 +17,6 @@ index b636bb4..d2e30a1 100644
"ng/flat_tree_traversal_ng.h",
"trustedtypes/TrustedHTML.cpp",
diff --git a/third_party/WebKit/Source/core/dom/Document.cpp b/third_party/WebKit/Source/core/dom/Document.cpp
index b53451c..ecfa473 100644
--- a/third_party/WebKit/Source/core/dom/Document.cpp
+++ b/third_party/WebKit/Source/core/dom/Document.cpp
@@ -218,6 +218,7 @@
@@ -39,13 +38,13 @@ index b53451c..ecfa473 100644
+ }
+
+ // determine whether this is a Google search results page
+ SecurityOrigin *origin = GetSecurityOrigin();
+ const SecurityOrigin *origin = GetSecurityOrigin();
+ if (origin) {
+ WTF::String domain = origin->Domain();
+ size_t pos = domain.Find(".google.");
+ auto* bodyElement = body();
+ if (bodyElement && (pos != WTF::kNotFound) && (domain.length() - pos - 8 < 4)) {
+ LOG(INFO) << "BRM: injecting dont-track-me Javascript payload";
+ LOG(INFO) << "injecting dont-track-me Javascript payload";
+ HTMLScriptElement* e = HTMLScriptElement::Create(*this, false);
+ e->setText(DONT_TRACK_ME_JS);
+ bodyElement->AppendChild(e);
@@ -56,13 +55,12 @@ index b53451c..ecfa473 100644
void Document::ElementDataCacheClearTimerFired(TimerBase*) {
diff --git a/third_party/WebKit/Source/core/dom/extensions/dont-track-me.h b/third_party/WebKit/Source/core/dom/extensions/dont-track-me.h
new file mode 100644
index 0000000..d6be4c1
--- /dev/null
+++ b/third_party/WebKit/Source/core/dom/extensions/dont-track-me.h
@@ -0,0 +1,6 @@
+#ifndef dont_track_me_h
+#define dont_track_me_h
+
+#define DONT_TRACK_ME_JS "// Bromite click-tracking and AMP removal\nfunction recreateHyperlink(a) {\n // create new A element - old one has event listeners attached\n var newA = document.createElement('a');\n newA.referrerPolicy = 'origin';\n\n // remove AMP class, get actual page URL\n var ampCur = a.getAttribute('data-amp-cur');\n if (ampCur) {\n newA.href = ampCur;\n a.classList.remove('amp_r');\n } else {\n var realLink = getRealLinkFromGoogleUrl(a);\n if (realLink) {\n newA.href = realLink;\n } else {\n // might not be an actual hyperlink, ignore it\n if (!a.href) {\n return;\n }\n newA.href = a.href;\n }\n }\n // copy CSS classes\n newA.className = a.className;\n\n // copy nodes inside the hyperlink\n while (a.firstChild) {\n newA.appendChild(a.lastChild);\n }\n // replace hyperlink\n a.parentNode.replaceChild(newA, a);\n}\n\n/**\n * @returns {String} the real URL if the given link is a Google redirect URL.\n */\nfunction getRealLinkFromGoogleUrl(a) {\n if ((a.hostname === location.hostname || a.hostname === 'www.google.com') &&\n /^\\/(local_)?url$/.test(a.pathname)) {\n // Google Maps / Dito (/local_url?q=<url>)\n // Mobile (/url?q=<url>)\n var url = /[?&](?:q|url)=((?:https?|ftp)[%:][^&]+)/.exec(a.search);\n if (url) {\n return decodeURIComponent(url[1]);\n }\n // Help pages, e.g. safe browsing (/url?...&q=%2Fsupport%2Fanswer...)\n url = /[?&](?:q|url)=((?:%2[Ff]|\\/)[^&]+)/.exec(a.search);\n if (url) {\n return a.origin + decodeURIComponent(url[1]);\n }\n }\n}\n\nfunction sanitizeAllHyperlinks() {\n // scan all hyperlinks\n var hyperlinks = document.getElementsByTagName('a');\n for (var i = 0; i < hyperlinks.length; i++) {\n recreateHyperlink(hyperlinks[i]);\n }\n}\n\nsanitizeAllHyperlinks();\n"
+#define DONT_TRACK_ME_JS "// Bromite click-tracking and AMP removal\nfunction recreateHyperlink(a) {\n // create new A element - old one has event listeners attached\n var newA = document.createElement('a');\n newA.referrerPolicy = 'origin';\n\n // remove AMP class, get actual page URL\n var ampCur = a.getAttribute('data-amp-cur');\n if (ampCur) {\n newA.href = ampCur;\n a.classList.remove('amp_r');\n } else {\n var realLink = getRealLinkFromGoogleUrl(a);\n if (realLink) {\n newA.href = realLink;\n } else {\n // might not be an actual hyperlink, ignore it\n if (!a.href) {\n return;\n }\n newA.href = a.href;\n }\n }\n // copy CSS classes\n newA.className = a.className;\n\n // copy nodes inside the hyperlink\n while (a.firstChild) {\n newA.appendChild(a.lastChild);\n }\n // replace hyperlink\n a.parentNode.replaceChild(newA, a);\n}\n\n/**\n * @returns {String} the real URL if the given link is a Google redirect URL.\n */\nfunction getRealLinkFromGoogleUrl(a) {\n if ((a.hostname === location.hostname || a.hostname === 'www.google.com') &&\n /^\\/(local_)?url$/.test(a.pathname)) {\n // Google Maps / Dito (/local_url?q=<url>)\n // Mobile (/url?q=<url>)\n var url = /[?&](?:q|url)=((?:https?|ftp)[%:][^&]+)/.exec(a.search);\n if (url) {\n return decodeURIComponent(url[1]);\n }\n // Help pages, e.g. safe browsing (/url?...&q=%2Fsupport%2Fanswer...)\n url = /[?&](?:q|url)=((?:%2[Ff]|\\/)[^&]+)/.exec(a.search);\n if (url) {\n return a.origin + decodeURIComponent(url[1]);\n }\n }\n}\n\nfunction sanitizeAllHyperlinks() {\n // scan all hyperlinks\n var hyperlinks = document.getElementsByTagName('a');\n for (var i = 0; i < hyperlinks.length; i++) {\n recreateHyperlink(hyperlinks[i]);\n }\n}\n\nif ((document.location.host.indexOf(\"images.google\") == -1) && (document.location.host.indexOf(\"news.google\") == -1))\n\tsanitizeAllHyperlinks();\n"
+
+#endif // dont_track_me_h
+19 -19
View File
@@ -1,4 +1,4 @@
commit ead3cfcf33af7b007ef266068e9c1a5a512200f4
commit 3075d5cc23f69b42c80690162426ae2501cd2b5b
Author: csagan5 <32685696+csagan5@users.noreply.github.com>
Date: Thu Oct 12 08:09:24 2017 +0200
@@ -18,10 +18,10 @@ index 6b66f9e..ac44881 100644
void BackgroundModeManager::RegisterProfile(Profile* profile) {
diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc
index 762dc0b..33e81b4 100644
index a96f159e..7f7e9cf 100644
--- a/chrome/browser/chrome_content_browser_client.cc
+++ b/chrome/browser/chrome_content_browser_client.cc
@@ -844,7 +844,7 @@ ChromeContentBrowserClient::~ChromeContentBrowserClient() {
@@ -877,7 +877,7 @@ void ChromeContentBrowserClient::RegisterLocalStatePrefs(
void ChromeContentBrowserClient::RegisterProfilePrefs(
user_prefs::PrefRegistrySyncable* registry) {
registry->RegisterBooleanPref(prefs::kDisable3DAPIs, false);
@@ -31,10 +31,10 @@ index 762dc0b..33e81b4 100644
}
diff --git a/chrome/browser/io_thread.cc b/chrome/browser/io_thread.cc
index 521f155..6fb04a9 100644
index e6ccce4..1e37c2b 100644
--- a/chrome/browser/io_thread.cc
+++ b/chrome/browser/io_thread.cc
@@ -610,7 +610,7 @@ void IOThread::RegisterPrefs(PrefRegistrySimple* registry) {
@@ -612,7 +612,7 @@ void IOThread::RegisterPrefs(PrefRegistrySimple* registry) {
std::string());
registry->RegisterBooleanPref(prefs::kEnableReferrers, true);
data_reduction_proxy::RegisterPrefs(registry);
@@ -42,7 +42,7 @@ index 521f155..6fb04a9 100644
+ registry->RegisterBooleanPref(prefs::kBuiltInDnsClientEnabled, false);
registry->RegisterBooleanPref(prefs::kQuickCheckEnabled, true);
registry->RegisterBooleanPref(prefs::kPacHttpsUrlStrippingEnabled, true);
}
#if defined(OS_POSIX)
diff --git a/chrome/browser/net/prediction_options.cc b/chrome/browser/net/prediction_options.cc
index 8ab8a07..967bf2f 100644
--- a/chrome/browser/net/prediction_options.cc
@@ -70,7 +70,7 @@ index 6512483..4c55a19 100644
enum class NetworkPredictionStatus {
diff --git a/chrome/browser/profiles/profile.cc b/chrome/browser/profiles/profile.cc
index 9bfac12..243f176 100644
index 52042ee..b1acb4a 100644
--- a/chrome/browser/profiles/profile.cc
+++ b/chrome/browser/profiles/profile.cc
@@ -136,7 +136,7 @@ const char Profile::kNoHostedDomainFound[] = "NO_HOSTED_DOMAIN";
@@ -96,10 +96,10 @@ index b46a992..9d353d9 100644
</div>
</dialog>
diff --git a/chrome/browser/signin/signin_promo.cc b/chrome/browser/signin/signin_promo.cc
index 01f0f66..e0ce4b1 100644
index 0f4bdb3..77e4810 100644
--- a/chrome/browser/signin/signin_promo.cc
+++ b/chrome/browser/signin/signin_promo.cc
@@ -329,8 +329,8 @@ void ForceWebBasedSigninFlowForTesting(bool force) {
@@ -371,8 +371,8 @@ void ForceWebBasedSigninFlowForTesting(bool force) {
void RegisterProfilePrefs(
user_prefs::PrefRegistrySyncable* registry) {
registry->RegisterIntegerPref(prefs::kSignInPromoStartupCount, 0);
@@ -111,15 +111,15 @@ index 01f0f66..e0ce4b1 100644
}
diff --git a/chrome/browser/ui/browser_ui_prefs.cc b/chrome/browser/ui/browser_ui_prefs.cc
index 79f4e19..946f7cd 100644
index bcd4d0e..2302f0f 100644
--- a/chrome/browser/ui/browser_ui_prefs.cc
+++ b/chrome/browser/ui/browser_ui_prefs.cc
@@ -62,11 +62,11 @@ void RegisterBrowserUserPrefs(user_prefs::PrefRegistrySyncable* registry) {
@@ -59,11 +59,11 @@ void RegisterBrowserUserPrefs(user_prefs::PrefRegistrySyncable* registry) {
registry->RegisterBooleanPref(prefs::kWebAppCreateInAppsMenu, true);
registry->RegisterBooleanPref(prefs::kWebAppCreateInQuickLaunchBar, true);
registry->RegisterBooleanPref(
prefs::kEnableTranslate,
- true,
+ false,
- prefs::kOfferTranslateEnabled, true,
+ prefs::kOfferTranslateEnabled, false,
user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
registry->RegisterStringPref(prefs::kCloudPrintEmail, std::string());
registry->RegisterBooleanPref(prefs::kCloudPrintProxyEnabled, true);
@@ -170,10 +170,10 @@ index 83a4617..4b8511c 100644
xmpp_ping_enabled_ = prefs->GetBoolean(
prefs::kCloudPrintXmppPingEnabled, false);
diff --git a/components/autofill/core/browser/autofill_manager.cc b/components/autofill/core/browser/autofill_manager.cc
index a0e6cae..10a49c3 100644
index 9468cf2..86366ca 100644
--- a/components/autofill/core/browser/autofill_manager.cc
+++ b/components/autofill/core/browser/autofill_manager.cc
@@ -274,7 +274,7 @@ void AutofillManager::RegisterProfilePrefs(
@@ -211,7 +211,7 @@ void AutofillManager::RegisterProfilePrefs(
registry->RegisterIntegerPref(
prefs::kAutofillCreditCardSigninPromoImpressionCount, 0);
registry->RegisterBooleanPref(
@@ -183,7 +183,7 @@ index a0e6cae..10a49c3 100644
registry->RegisterBooleanPref(
prefs::kAutofillProfileUseDatesFixed, false,
diff --git a/components/bookmarks/browser/bookmark_utils.cc b/components/bookmarks/browser/bookmark_utils.cc
index a0b9d39..ef0dd6b 100644
index 8455e49..c7e70c0 100644
--- a/components/bookmarks/browser/bookmark_utils.cc
+++ b/components/bookmarks/browser/bookmark_utils.cc
@@ -442,12 +442,12 @@ void GetBookmarksMatchingProperties(BookmarkModel* model,
@@ -202,10 +202,10 @@ index a0b9d39..ef0dd6b 100644
registry->RegisterBooleanPref(
prefs::kShowManagedBookmarksInBookmarkBar,
diff --git a/components/safe_browsing/common/safe_browsing_prefs.cc b/components/safe_browsing/common/safe_browsing_prefs.cc
index 2ebf20d..7866663 100644
index a05123f..4b8b05cb 100644
--- a/components/safe_browsing/common/safe_browsing_prefs.cc
+++ b/components/safe_browsing/common/safe_browsing_prefs.cc
@@ -372,9 +372,9 @@ void RegisterProfilePrefs(PrefRegistrySimple* registry) {
@@ -343,9 +343,9 @@ void RegisterProfilePrefs(PrefRegistrySimple* registry) {
registry->RegisterBooleanPref(
prefs::kSafeBrowsingSawInterstitialScoutReporting, false);
registry->RegisterBooleanPref(
+8 -17
View File
@@ -1,29 +1,20 @@
commit 5fd5caead1e313462bc84c22aab44404af1a918d
commit a53d9cf12fb835938c2d2ad641633126a07bf636
Author: csagan5 <32685696+csagan5@users.noreply.github.com>
Date: Wed Oct 11 22:54:53 2017 +0200
Date: Sun Nov 26 11:40:05 2017 +0100
Restore classic new tab page
diff --git a/chrome/browser/search/search.cc b/chrome/browser/search/search.cc
index dae4dd5..60411ce 100644
index b756cb0..5785c581 100644
--- a/chrome/browser/search/search.cc
+++ b/chrome/browser/search/search.cc
@@ -170,17 +170,7 @@ struct NewTabURLDetails {
return NewTabURLDetails(local_url, NEW_TAB_URL_VALID);
@@ -171,9 +171,6 @@ struct NewTabURLDetails {
NewTabURLState state = IsValidNewTabURL(profile, search_provider_url);
- switch (state) {
switch (state) {
- case NEW_TAB_URL_VALID:
- // We can use the search provider's page.
- return NewTabURLDetails(search_provider_url, state);
- case NEW_TAB_URL_INCOGNITO:
- // Incognito has its own New Tab.
- return NewTabURLDetails(GURL(), state);
- default:
- // Use the local New Tab otherwise.
- return NewTabURLDetails(local_url, state);
- }
+ return NewTabURLDetails(local_url, state);
}
GURL url;
case NEW_TAB_URL_INCOGNITO:
// Incognito has its own New Tab.
return NewTabURLDetails(GURL(), state);