Compare commits
28
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4c844ba92d | ||
|
|
d855bc2f8f | ||
|
|
bffc981dca | ||
|
|
fc970af553 | ||
|
|
fb79f25139 | ||
|
|
3f68ef470d | ||
|
|
ce004bc49a | ||
|
|
a99533f633 | ||
|
|
a300522aed | ||
|
|
1da96f0fca | ||
|
|
11994a352c | ||
|
|
4e39f7c900 | ||
|
|
eca32f09e9 | ||
|
|
a452a9356e | ||
|
|
0645ccf03a | ||
|
|
b81a196c71 | ||
|
|
8589334b98 | ||
|
|
df91ed0407 | ||
|
|
250ae9ffad | ||
|
|
cd354c6786 | ||
|
|
6d337a4945 | ||
|
|
2f1e3c26e1 | ||
|
|
be7e413b7a | ||
|
|
83e140c4f6 | ||
|
|
f8d7135ac8 | ||
|
|
4676d9b2ec | ||
|
|
256fe0ec37 | ||
|
|
415a0ea9e5 |
@@ -1,3 +1,19 @@
|
||||
# 63.0.3239.27
|
||||
|
||||
# 63.0.3239.24
|
||||
* convert AMP search results to regular search results
|
||||
|
||||
# 63.0.3239.15
|
||||
* remove URL tracking from Google search results
|
||||
* disable webRTC by default (https://github.com/bromite/bromite/issues/9, still not working proper)
|
||||
* do not enable search engine geolocation by default
|
||||
* use own package name (closes https://github.com/bromite/bromite/issues/1)
|
||||
* use 64bit WebView process
|
||||
|
||||
# 63.0.3239.10
|
||||
* attempt enabling API keys (didn't work)
|
||||
* added StartPage search engine (closes https://github.com/bromite/bromite/issues/3)
|
||||
|
||||
# 63.0.3239.6
|
||||
* added Bromite patch for Google search results click-tracking removal
|
||||
* added x86 target CPU
|
||||
|
||||
@@ -1,9 +1,13 @@
|
||||
# Bromite - Take back your browser
|
||||
|
||||
<img src="https://www.bromite.org/android-icon-192x192.png" width="96" alt="Bromite" />
|
||||
[![GitHub release][version-image]][version-url] [![license][license-image]][license-url]
|
||||
|
||||
<img title="Bromite - take back your browser!" src="https://www.bromite.org/android-icon-192x192.png" width="96" alt="Bromite" />
|
||||
|
||||
Bromite is [Chromium](https://www.chromium.org/Home) plus some patches for ad blocking and enhanced privacy.
|
||||
|
||||
Bromite is only available for Android v4 and above.
|
||||
|
||||
See [open issues](https://github.com/bromite/bromite/issues) for the development in progress.
|
||||
|
||||
# Donate
|
||||
@@ -21,7 +25,8 @@ ETH donations address: `0xf47ff39223d828f99fec5ab53bd068c5c0522042`
|
||||
# Features
|
||||
|
||||
* adblocking (currently baked-in, no configuration options available)
|
||||
* remove click-tracking from Google search results
|
||||
* remove click-tracking and AMP from Google search results
|
||||
* [StartPage](https://startpage.com/) search engine (select it from search engines under settings)
|
||||
* [DuckDuckGo](https://duckduckgo.com/) search engine (select it from search engines under settings)
|
||||
* privacy enhancement patches from Inox patchset, ungoogled-chromium and Iridium projects
|
||||
* all codecs included (proprietary, open H.264 etc.)
|
||||
@@ -43,7 +48,7 @@ Please refer to [official Chromium build documentation](https://www.chromium.org
|
||||
|
||||
* [Chromium project](https://www.chromium.org/Home) and developers
|
||||
* [ungoogled-chromium](https://github.com/Eloston/ungoogled-chromium) for some patches
|
||||
* Iridium project for some patches (taken from above ungoogled-chromium)
|
||||
* [Iridium project](https://github.com/iridium-browser) for some patches (taken from above ungoogled-chromium)
|
||||
* [Inox patchset](https://github.com/gcarq/inox-patchset) for some patches (taken from above ungoogled-chromium)
|
||||
* nochromo for the original adblock patch
|
||||
* AdBlock Plus, uBlock, EasyList and EasyPrivacy for the compilation of original adblock patch
|
||||
@@ -51,3 +56,8 @@ Please refer to [official Chromium build documentation](https://www.chromium.org
|
||||
# License
|
||||
|
||||
The patches published as part of the Bromite project are released under [GNU GPL v3](./LICENSE).
|
||||
|
||||
[version-image]: https://img.shields.io/github/release/bromite/bromite.svg?style=flat-square
|
||||
[version-url]: https://github.com/bromite/bromite/releases/latest
|
||||
[license-image]: https://img.shields.io/github/license/bromite/bromite.svg
|
||||
[license-url]: https://github.com/bromite/bromite/blob/master/LICENSE
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
From ee80624a6cad6e19a281a59cfea32f406e7ee03d Mon Sep 17 00:00:00 2001
|
||||
From: Daniel Micay <danielmicay@gmail.com>
|
||||
Date: Thu, 26 Jan 2017 01:30:12 -0500
|
||||
Subject: [PATCH 12/21] use 64-bit WebView processes
|
||||
|
||||
---
|
||||
android_webview/apk/java/AndroidManifest.xml | 3 +--
|
||||
1 file changed, 1 insertion(+), 2 deletions(-)
|
||||
|
||||
diff --git a/android_webview/apk/java/AndroidManifest.xml b/android_webview/apk/java/AndroidManifest.xml
|
||||
index 23b55ecb437a..3f7212fe2807 100644
|
||||
--- 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"
|
||||
--
|
||||
2.14.2
|
||||
|
||||
@@ -0,0 +1,69 @@
|
||||
From bc266421a13f4967a3d5b49830c338f59e4f2dd5 Mon Sep 17 00:00:00 2001
|
||||
From: Daniel Micay <danielmicay@gmail.com>
|
||||
Date: Tue, 1 Aug 2017 20:29:56 -0400
|
||||
Subject: [PATCH 19/21] stop enabling search engine geolocation by default
|
||||
|
||||
---
|
||||
.../search_geolocation_service.cc | 25 ++++++++++------------
|
||||
1 file changed, 11 insertions(+), 14 deletions(-)
|
||||
|
||||
diff --git a/chrome/browser/android/search_geolocation/search_geolocation_service.cc b/chrome/browser/android/search_geolocation/search_geolocation_service.cc
|
||||
index 0ed5540c3262..e5721d53c344 100644
|
||||
--- a/chrome/browser/android/search_geolocation/search_geolocation_service.cc
|
||||
+++ b/chrome/browser/android/search_geolocation/search_geolocation_service.cc
|
||||
@@ -208,7 +208,14 @@ void SearchGeolocationService::SetDSEGeolocationSetting(bool setting) {
|
||||
pref.setting = setting;
|
||||
SetDSEGeolocationPref(pref);
|
||||
|
||||
- ResetContentSetting();
|
||||
+ url::Origin origin = delegate_->GetDSEOrigin();
|
||||
+ if (setting) {
|
||||
+ host_content_settings_map_->SetContentSettingDefaultScope(
|
||||
+ origin.GetURL(), origin.GetURL(), CONTENT_SETTINGS_TYPE_GEOLOCATION,
|
||||
+ std::string(), CONTENT_SETTING_ALLOW);
|
||||
+ } else {
|
||||
+ ResetContentSetting();
|
||||
+ }
|
||||
}
|
||||
|
||||
url::Origin SearchGeolocationService::GetDSEOriginIfEnabled() {
|
||||
@@ -232,11 +239,7 @@ void SearchGeolocationService::OnDSEChanged() {
|
||||
// Remove any geolocation embargo on the URL.
|
||||
PermissionDecisionAutoBlocker::GetForProfile(profile_)->RemoveEmbargoByUrl(
|
||||
delegate_->GetDSEOrigin().GetURL(), CONTENT_SETTINGS_TYPE_GEOLOCATION);
|
||||
- if (content_setting == CONTENT_SETTING_BLOCK && pref.setting) {
|
||||
- pref.setting = false;
|
||||
- } else if (content_setting == CONTENT_SETTING_ALLOW && !pref.setting) {
|
||||
- ResetContentSetting();
|
||||
- }
|
||||
+ pref.setting = content_setting == CONTENT_SETTING_ALLOW;
|
||||
|
||||
if (new_dse_name != pref.dse_name && pref.setting)
|
||||
SearchGeolocationDisclosureTabHelper::ResetDisclosure(profile_);
|
||||
@@ -279,7 +282,7 @@ void SearchGeolocationService::InitializeDSEGeolocationSettingIfNeeded() {
|
||||
|
||||
PrefValue pref;
|
||||
pref.dse_name = delegate_->GetDSEName();
|
||||
- pref.setting = content_setting != CONTENT_SETTING_BLOCK;
|
||||
+ pref.setting = content_setting == CONTENT_SETTING_ALLOW;
|
||||
SetDSEGeolocationPref(pref);
|
||||
|
||||
SearchGeolocationDisclosureTabHelper::ResetDisclosure(profile_);
|
||||
@@ -289,13 +292,7 @@ void SearchGeolocationService::InitializeDSEGeolocationSettingIfNeeded() {
|
||||
void SearchGeolocationService::EnsureDSEGeolocationSettingIsValid() {
|
||||
PrefValue pref = GetDSEGeolocationPref();
|
||||
ContentSetting content_setting = GetCurrentContentSetting();
|
||||
- bool new_setting = pref.setting;
|
||||
-
|
||||
- if (pref.setting && content_setting == CONTENT_SETTING_BLOCK) {
|
||||
- new_setting = false;
|
||||
- } else if (!pref.setting && content_setting == CONTENT_SETTING_ALLOW) {
|
||||
- new_setting = true;
|
||||
- }
|
||||
+ bool new_setting = content_setting == CONTENT_SETTING_ALLOW;
|
||||
|
||||
if (pref.setting != new_setting) {
|
||||
pref.setting = new_setting;
|
||||
--
|
||||
2.14.2
|
||||
|
||||
@@ -0,0 +1,710 @@
|
||||
commit 8885c3f6f759c0d97183fe44913e2c4ca1839220
|
||||
Author: csagan5 <32685696+csagan5@users.noreply.github.com>
|
||||
Date: Wed Oct 18 21:24:05 2017 +0200
|
||||
|
||||
Add StartPage search engine
|
||||
|
||||
diff --git a/components/search_engines/prepopulated_engines.json b/components/search_engines/prepopulated_engines.json
|
||||
index 25e85ab..dcccdb8 100644
|
||||
--- a/components/search_engines/prepopulated_engines.json
|
||||
+++ b/components/search_engines/prepopulated_engines.json
|
||||
@@ -32,7 +32,7 @@
|
||||
|
||||
// Increment this if you change the data in ways that mean users with
|
||||
// existing data should get a new version.
|
||||
- "kCurrentDataVersion": 100
|
||||
+ "kCurrentDataVersion": 101
|
||||
},
|
||||
|
||||
// The following engines are included in country lists and are added to the
|
||||
@@ -220,6 +220,16 @@
|
||||
"id": 56
|
||||
},
|
||||
|
||||
+ "startpage": {
|
||||
+ "name": "StartPage",
|
||||
+ "keyword": "startpage.com",
|
||||
+ "favicon_url": "https://startpage.com/favicon.ico",
|
||||
+ "search_url": "https://startpage.com/do/dsearch?query={searchTerms}",
|
||||
+ "new_tab_url": "https://startpage.com/",
|
||||
+ "type": "SEARCH_ENGINE_STARTPAGE",
|
||||
+ "id": 12
|
||||
+ },
|
||||
+
|
||||
"vinden": {
|
||||
"name": "Vinden.nl",
|
||||
"keyword": "vinden.nl",
|
||||
diff --git a/components/search_engines/search_engine_type.h b/components/search_engines/search_engine_type.h
|
||||
index 02f6b16..8df48741 100644
|
||||
--- a/components/search_engines/search_engine_type.h
|
||||
+++ b/components/search_engines/search_engine_type.h
|
||||
@@ -64,6 +64,7 @@ enum SearchEngineType {
|
||||
SEARCH_ENGINE_ZOZNAM,
|
||||
SEARCH_ENGINE_360,
|
||||
SEARCH_ENGINE_DUCKDUCKGO,
|
||||
+ SEARCH_ENGINE_STARTPAGE,
|
||||
SEARCH_ENGINE_MAX // Bounding value needed for UMA histogram macro.
|
||||
};
|
||||
|
||||
diff --git a/components/search_engines/template_url_prepopulate_data.cc b/components/search_engines/template_url_prepopulate_data.cc
|
||||
index 7adede7..52743e7 100644
|
||||
--- a/components/search_engines/template_url_prepopulate_data.cc
|
||||
+++ b/components/search_engines/template_url_prepopulate_data.cc
|
||||
@@ -50,548 +50,548 @@ namespace {
|
||||
|
||||
// Default (for countries with no better engine set)
|
||||
const PrepopulatedEngine* const engines_default[] = {
|
||||
- &google, &duckduckgo, &bing, &yahoo,
|
||||
+ &google, &startpage, &duckduckgo, &bing, &yahoo,
|
||||
};
|
||||
|
||||
// United Arab Emirates
|
||||
const PrepopulatedEngine* const engines_AE[] = {
|
||||
- &google, &duckduckgo, &yahoo_maktoob, &bing,
|
||||
+ &google, &startpage, &duckduckgo, &yahoo_maktoob, &bing,
|
||||
};
|
||||
|
||||
// Albania
|
||||
const PrepopulatedEngine* const engines_AL[] = {
|
||||
- &google, &duckduckgo, &yahoo, &bing,
|
||||
+ &google, &startpage, &duckduckgo, &yahoo, &bing,
|
||||
};
|
||||
|
||||
// Argentina
|
||||
const PrepopulatedEngine* const engines_AR[] = {
|
||||
- &google, &duckduckgo, &bing, &yahoo_ar,
|
||||
+ &google, &startpage, &duckduckgo, &bing, &yahoo_ar,
|
||||
};
|
||||
|
||||
// Austria
|
||||
const PrepopulatedEngine* const engines_AT[] = {
|
||||
- &google, &duckduckgo, &bing, &yahoo_at,
|
||||
+ &google, &startpage, &duckduckgo, &bing, &yahoo_at,
|
||||
};
|
||||
|
||||
// Australia
|
||||
const PrepopulatedEngine* const engines_AU[] = {
|
||||
- &google, &duckduckgo, &bing, &yahoo_au,
|
||||
+ &google, &startpage, &duckduckgo, &bing, &yahoo_au,
|
||||
};
|
||||
|
||||
// Bosnia and Herzegovina
|
||||
const PrepopulatedEngine* const engines_BA[] = {
|
||||
- &google, &duckduckgo, &yahoo, &bing,
|
||||
+ &google, &startpage, &duckduckgo, &yahoo, &bing,
|
||||
};
|
||||
|
||||
// Belgium
|
||||
const PrepopulatedEngine* const engines_BE[] = {
|
||||
- &google, &duckduckgo, &bing, &yahoo, &yahoo_fr,
|
||||
+ &google, &startpage, &duckduckgo, &bing, &yahoo, &yahoo_fr,
|
||||
};
|
||||
|
||||
// Bulgaria
|
||||
const PrepopulatedEngine* const engines_BG[] = {
|
||||
- &google, &duckduckgo, &bing, &ask,
|
||||
+ &google, &startpage, &duckduckgo, &bing, &ask,
|
||||
};
|
||||
|
||||
// Bahrain
|
||||
const PrepopulatedEngine* const engines_BH[] = {
|
||||
- &google, &duckduckgo, &yahoo_maktoob, &bing,
|
||||
+ &google, &startpage, &duckduckgo, &yahoo_maktoob, &bing,
|
||||
};
|
||||
|
||||
// Burundi
|
||||
const PrepopulatedEngine* const engines_BI[] = {
|
||||
- &google, &duckduckgo, &yahoo, &bing,
|
||||
+ &google, &startpage, &duckduckgo, &yahoo, &bing,
|
||||
};
|
||||
|
||||
// Brunei
|
||||
const PrepopulatedEngine* const engines_BN[] = {
|
||||
- &google, &duckduckgo, &yahoo_my, &bing,
|
||||
+ &google, &startpage, &duckduckgo, &yahoo_my, &bing,
|
||||
};
|
||||
|
||||
// Bolivia
|
||||
const PrepopulatedEngine* const engines_BO[] = {
|
||||
- &google, &duckduckgo, &bing, &yahoo,
|
||||
+ &google, &startpage, &duckduckgo, &bing, &yahoo,
|
||||
};
|
||||
|
||||
// Brazil
|
||||
const PrepopulatedEngine* const engines_BR[] = {
|
||||
- &google, &duckduckgo, &ask_br, &bing, &yahoo_br,
|
||||
+ &google, &startpage, &duckduckgo, &ask_br, &bing, &yahoo_br,
|
||||
};
|
||||
|
||||
// Belarus
|
||||
const PrepopulatedEngine* const engines_BY[] = {
|
||||
- &google, &duckduckgo, &yandex_by, &mail_ru,
|
||||
+ &google, &startpage, &duckduckgo, &yandex_by, &mail_ru,
|
||||
};
|
||||
|
||||
// Belize
|
||||
const PrepopulatedEngine* const engines_BZ[] = {
|
||||
- &google, &duckduckgo, &yahoo, &bing,
|
||||
+ &google, &startpage, &duckduckgo, &yahoo, &bing,
|
||||
};
|
||||
|
||||
// Canada
|
||||
const PrepopulatedEngine* const engines_CA[] = {
|
||||
- &google, &duckduckgo, &bing, &ask, &yahoo_ca, &yahoo_qc,
|
||||
+ &google, &startpage, &duckduckgo, &bing, &ask, &yahoo_ca, &yahoo_qc,
|
||||
};
|
||||
|
||||
// Switzerland
|
||||
const PrepopulatedEngine* const engines_CH[] = {
|
||||
- &google, &duckduckgo, &bing, &yahoo_ch,
|
||||
+ &google, &startpage, &duckduckgo, &bing, &yahoo_ch,
|
||||
};
|
||||
|
||||
// Chile
|
||||
const PrepopulatedEngine* const engines_CL[] = {
|
||||
- &google, &duckduckgo, &bing, &yahoo_cl,
|
||||
+ &google, &startpage, &duckduckgo, &bing, &yahoo_cl,
|
||||
};
|
||||
|
||||
// China
|
||||
const PrepopulatedEngine* const engines_CN[] = {
|
||||
- &google, &duckduckgo, &baidu, &sogou, &so_360,
|
||||
+ &google, &startpage, &duckduckgo, &baidu, &sogou, &so_360,
|
||||
};
|
||||
|
||||
// Colombia
|
||||
const PrepopulatedEngine* const engines_CO[] = {
|
||||
- &google, &duckduckgo, &bing, &yahoo_co,
|
||||
+ &google, &startpage, &duckduckgo, &bing, &yahoo_co,
|
||||
};
|
||||
|
||||
// Costa Rica
|
||||
const PrepopulatedEngine* const engines_CR[] = {
|
||||
- &google, &duckduckgo, &yahoo, &bing,
|
||||
+ &google, &startpage, &duckduckgo, &yahoo, &bing,
|
||||
};
|
||||
|
||||
// Czech Republic
|
||||
const PrepopulatedEngine* const engines_CZ[] = {
|
||||
- &google, &duckduckgo, &seznam, &bing,
|
||||
+ &google, &startpage, &duckduckgo, &seznam, &bing,
|
||||
};
|
||||
|
||||
// Germany
|
||||
const PrepopulatedEngine* const engines_DE[] = {
|
||||
- &google, &duckduckgo, &bing, &yahoo_de,
|
||||
+ &google, &startpage, &duckduckgo, &bing, &yahoo_de,
|
||||
};
|
||||
|
||||
// Denmark
|
||||
const PrepopulatedEngine* const engines_DK[] = {
|
||||
- &google, &duckduckgo, &bing, &yahoo_dk,
|
||||
+ &google, &startpage, &duckduckgo, &bing, &yahoo_dk,
|
||||
};
|
||||
|
||||
// Dominican Republic
|
||||
const PrepopulatedEngine* const engines_DO[] = {
|
||||
- &google, &duckduckgo, &yahoo, &bing,
|
||||
+ &google, &startpage, &duckduckgo, &yahoo, &bing,
|
||||
};
|
||||
|
||||
// Algeria
|
||||
const PrepopulatedEngine* const engines_DZ[] = {
|
||||
- &google, &duckduckgo, &bing, &yahoo_maktoob,
|
||||
+ &google, &startpage, &duckduckgo, &bing, &yahoo_maktoob,
|
||||
};
|
||||
|
||||
// Ecuador
|
||||
const PrepopulatedEngine* const engines_EC[] = {
|
||||
- &google, &duckduckgo, &bing, &yahoo,
|
||||
+ &google, &startpage, &duckduckgo, &bing, &yahoo,
|
||||
};
|
||||
|
||||
// Estonia
|
||||
const PrepopulatedEngine* const engines_EE[] = {
|
||||
- &google, &duckduckgo, &bing, &yahoo,
|
||||
+ &google, &startpage, &duckduckgo, &bing, &yahoo,
|
||||
};
|
||||
|
||||
// Egypt
|
||||
const PrepopulatedEngine* const engines_EG[] = {
|
||||
- &google, &duckduckgo, &yahoo_maktoob, &bing,
|
||||
+ &google, &startpage, &duckduckgo, &yahoo_maktoob, &bing,
|
||||
};
|
||||
|
||||
// Spain
|
||||
const PrepopulatedEngine* const engines_ES[] = {
|
||||
- &google, &duckduckgo, &bing, &yahoo_es,
|
||||
+ &google, &startpage, &duckduckgo, &bing, &yahoo_es,
|
||||
};
|
||||
|
||||
// Faroe Islands
|
||||
const PrepopulatedEngine* const engines_FO[] = {
|
||||
- &google, &duckduckgo, &bing, &ask,
|
||||
+ &google, &startpage, &duckduckgo, &bing, &ask,
|
||||
};
|
||||
|
||||
// Finland
|
||||
const PrepopulatedEngine* const engines_FI[] = {
|
||||
- &google, &duckduckgo, &bing, &yahoo_fi,
|
||||
+ &google, &startpage, &duckduckgo, &bing, &yahoo_fi,
|
||||
};
|
||||
|
||||
// France
|
||||
const PrepopulatedEngine* const engines_FR[] = {
|
||||
- &google, &duckduckgo, &bing, &yahoo_fr,
|
||||
+ &google, &startpage, &duckduckgo, &bing, &yahoo_fr,
|
||||
};
|
||||
|
||||
// United Kingdom
|
||||
const PrepopulatedEngine* const engines_GB[] = {
|
||||
- &google, &duckduckgo, &bing, &yahoo_uk, &ask_uk,
|
||||
+ &google, &startpage, &duckduckgo, &bing, &yahoo_uk, &ask_uk,
|
||||
};
|
||||
|
||||
// Greece
|
||||
const PrepopulatedEngine* const engines_GR[] = {
|
||||
- &google, &duckduckgo, &bing, &yahoo_gr,
|
||||
+ &google, &startpage, &duckduckgo, &bing, &yahoo_gr,
|
||||
};
|
||||
|
||||
// Guatemala
|
||||
const PrepopulatedEngine* const engines_GT[] = {
|
||||
- &google, &duckduckgo, &yahoo, &bing,
|
||||
+ &google, &startpage, &duckduckgo, &yahoo, &bing,
|
||||
};
|
||||
|
||||
// Hong Kong
|
||||
const PrepopulatedEngine* const engines_HK[] = {
|
||||
- &google, &duckduckgo, &yahoo_hk, &baidu, &bing,
|
||||
+ &google, &startpage, &duckduckgo, &yahoo_hk, &baidu, &bing,
|
||||
};
|
||||
|
||||
// Honduras
|
||||
const PrepopulatedEngine* const engines_HN[] = {
|
||||
- &google, &duckduckgo, &yahoo, &bing,
|
||||
+ &google, &startpage, &duckduckgo, &yahoo, &bing,
|
||||
};
|
||||
|
||||
// Croatia
|
||||
const PrepopulatedEngine* const engines_HR[] = {
|
||||
- &google, &duckduckgo, &bing, &yahoo,
|
||||
+ &google, &startpage, &duckduckgo, &bing, &yahoo,
|
||||
};
|
||||
|
||||
// Hungary
|
||||
const PrepopulatedEngine* const engines_HU[] = {
|
||||
- &google, &duckduckgo, &bing, &yahoo,
|
||||
+ &google, &startpage, &duckduckgo, &bing, &yahoo,
|
||||
};
|
||||
|
||||
// Indonesia
|
||||
const PrepopulatedEngine* const engines_ID[] = {
|
||||
- &google, &duckduckgo, &yahoo_id, &bing,
|
||||
+ &google, &startpage, &duckduckgo, &yahoo_id, &bing,
|
||||
};
|
||||
|
||||
// Ireland
|
||||
const PrepopulatedEngine* const engines_IE[] = {
|
||||
- &google, &duckduckgo, &bing, &yahoo_uk,
|
||||
+ &google, &startpage, &duckduckgo, &bing, &yahoo_uk,
|
||||
};
|
||||
|
||||
// Israel
|
||||
const PrepopulatedEngine* const engines_IL[] = {
|
||||
- &google, &duckduckgo, &yahoo, &bing,
|
||||
+ &google, &startpage, &duckduckgo, &yahoo, &bing,
|
||||
};
|
||||
|
||||
// India
|
||||
const PrepopulatedEngine* const engines_IN[] = {
|
||||
- &google, &duckduckgo, &bing, &yahoo_in,
|
||||
+ &google, &startpage, &duckduckgo, &bing, &yahoo_in,
|
||||
};
|
||||
|
||||
// Iraq
|
||||
const PrepopulatedEngine* const engines_IQ[] = {
|
||||
- &google, &duckduckgo, &yahoo_maktoob, &bing,
|
||||
+ &google, &startpage, &duckduckgo, &yahoo_maktoob, &bing,
|
||||
};
|
||||
|
||||
// Iran
|
||||
const PrepopulatedEngine* const engines_IR[] = {
|
||||
- &google, &duckduckgo, &yahoo, &bing,
|
||||
+ &google, &startpage, &duckduckgo, &yahoo, &bing,
|
||||
};
|
||||
|
||||
// Iceland
|
||||
const PrepopulatedEngine* const engines_IS[] = {
|
||||
- &google, &duckduckgo, &bing, &yahoo,
|
||||
+ &google, &startpage, &duckduckgo, &bing, &yahoo,
|
||||
};
|
||||
|
||||
// Italy
|
||||
const PrepopulatedEngine* const engines_IT[] = {
|
||||
- &google, &duckduckgo, &virgilio, &bing,
|
||||
+ &google, &startpage, &duckduckgo, &virgilio, &bing,
|
||||
};
|
||||
|
||||
// Jamaica
|
||||
const PrepopulatedEngine* const engines_JM[] = {
|
||||
- &google, &duckduckgo, &yahoo, &bing,
|
||||
+ &google, &startpage, &duckduckgo, &yahoo, &bing,
|
||||
};
|
||||
|
||||
// Jordan
|
||||
const PrepopulatedEngine* const engines_JO[] = {
|
||||
- &google, &duckduckgo, &yahoo_maktoob, &bing,
|
||||
+ &google, &startpage, &duckduckgo, &yahoo_maktoob, &bing,
|
||||
};
|
||||
|
||||
// Japan
|
||||
const PrepopulatedEngine* const engines_JP[] = {
|
||||
- &google, &duckduckgo, &yahoo_jp, &bing,
|
||||
+ &google, &startpage, &duckduckgo, &yahoo_jp, &bing,
|
||||
};
|
||||
|
||||
// Kenya
|
||||
const PrepopulatedEngine* const engines_KE[] = {
|
||||
- &google, &duckduckgo, &yahoo, &bing,
|
||||
+ &google, &startpage, &duckduckgo, &yahoo, &bing,
|
||||
};
|
||||
|
||||
// Kuwait
|
||||
const PrepopulatedEngine* const engines_KW[] = {
|
||||
- &google, &duckduckgo, &yahoo_maktoob, &bing,
|
||||
+ &google, &startpage, &duckduckgo, &yahoo_maktoob, &bing,
|
||||
};
|
||||
|
||||
// South Korea
|
||||
const PrepopulatedEngine* const engines_KR[] = {
|
||||
- &google, &duckduckgo, &naver, &daum,
|
||||
+ &google, &startpage, &duckduckgo, &naver, &daum,
|
||||
};
|
||||
|
||||
// Kazakhstan
|
||||
const PrepopulatedEngine* const engines_KZ[] = {
|
||||
- &google, &duckduckgo, &mail_ru, &yandex_kz,
|
||||
+ &google, &startpage, &duckduckgo, &mail_ru, &yandex_kz,
|
||||
};
|
||||
|
||||
// Lebanon
|
||||
const PrepopulatedEngine* const engines_LB[] = {
|
||||
- &google, &duckduckgo, &yahoo_maktoob, &bing,
|
||||
+ &google, &startpage, &duckduckgo, &yahoo_maktoob, &bing,
|
||||
};
|
||||
|
||||
// Liechtenstein
|
||||
const PrepopulatedEngine* const engines_LI[] = {
|
||||
- &google, &duckduckgo, &bing, &yahoo_de,
|
||||
+ &google, &startpage, &duckduckgo, &bing, &yahoo_de,
|
||||
};
|
||||
|
||||
// Lithuania
|
||||
const PrepopulatedEngine* const engines_LT[] = {
|
||||
- &google, &duckduckgo, &bing, &yandex_ru,
|
||||
+ &google, &startpage, &duckduckgo, &bing, &yandex_ru,
|
||||
};
|
||||
|
||||
// Luxembourg
|
||||
const PrepopulatedEngine* const engines_LU[] = {
|
||||
- &google, &duckduckgo, &bing, &yahoo_fr,
|
||||
+ &google, &startpage, &duckduckgo, &bing, &yahoo_fr,
|
||||
};
|
||||
|
||||
// Latvia
|
||||
const PrepopulatedEngine* const engines_LV[] = {
|
||||
- &google, &duckduckgo, &yandex_ru, &bing,
|
||||
+ &google, &startpage, &duckduckgo, &yandex_ru, &bing,
|
||||
};
|
||||
|
||||
// Libya
|
||||
const PrepopulatedEngine* const engines_LY[] = {
|
||||
- &google, &duckduckgo, &yahoo_maktoob, &bing,
|
||||
+ &google, &startpage, &duckduckgo, &yahoo_maktoob, &bing,
|
||||
};
|
||||
|
||||
// Morocco
|
||||
const PrepopulatedEngine* const engines_MA[] = {
|
||||
- &google, &duckduckgo, &bing, &yahoo_maktoob,
|
||||
+ &google, &startpage, &duckduckgo, &bing, &yahoo_maktoob,
|
||||
};
|
||||
|
||||
// Monaco
|
||||
const PrepopulatedEngine* const engines_MC[] = {
|
||||
- &google, &duckduckgo, &yahoo_fr, &bing,
|
||||
+ &google, &startpage, &duckduckgo, &yahoo_fr, &bing,
|
||||
};
|
||||
|
||||
// Moldova
|
||||
const PrepopulatedEngine* const engines_MD[] = {
|
||||
- &google, &duckduckgo, &bing, &yahoo,
|
||||
+ &google, &startpage, &duckduckgo, &bing, &yahoo,
|
||||
};
|
||||
|
||||
// Montenegro
|
||||
const PrepopulatedEngine* const engines_ME[] = {
|
||||
- &google, &duckduckgo, &bing, &yahoo,
|
||||
+ &google, &startpage, &duckduckgo, &bing, &yahoo,
|
||||
};
|
||||
|
||||
// Macedonia
|
||||
const PrepopulatedEngine* const engines_MK[] = {
|
||||
- &google, &duckduckgo, &yahoo, &bing,
|
||||
+ &google, &startpage, &duckduckgo, &yahoo, &bing,
|
||||
};
|
||||
|
||||
// Mexico
|
||||
const PrepopulatedEngine* const engines_MX[] = {
|
||||
- &google, &duckduckgo, &bing, &yahoo_mx,
|
||||
+ &google, &startpage, &duckduckgo, &bing, &yahoo_mx,
|
||||
};
|
||||
|
||||
// Malaysia
|
||||
const PrepopulatedEngine* const engines_MY[] = {
|
||||
- &google, &duckduckgo, &yahoo_my, &bing,
|
||||
+ &google, &startpage, &duckduckgo, &yahoo_my, &bing,
|
||||
};
|
||||
|
||||
// Nicaragua
|
||||
const PrepopulatedEngine* const engines_NI[] = {
|
||||
- &google, &duckduckgo, &yahoo, &bing,
|
||||
+ &google, &startpage, &duckduckgo, &yahoo, &bing,
|
||||
};
|
||||
|
||||
// Netherlands
|
||||
const PrepopulatedEngine* const engines_NL[] = {
|
||||
- &google, &duckduckgo, &yahoo_nl, &vinden,
|
||||
+ &google, &startpage, &duckduckgo, &yahoo_nl, &vinden,
|
||||
};
|
||||
|
||||
// Norway
|
||||
const PrepopulatedEngine* const engines_NO[] = {
|
||||
- &google, &duckduckgo, &bing, &kvasir,
|
||||
+ &google, &startpage, &duckduckgo, &bing, &kvasir,
|
||||
};
|
||||
|
||||
// New Zealand
|
||||
const PrepopulatedEngine* const engines_NZ[] = {
|
||||
- &google, &duckduckgo, &bing, &yahoo_nz,
|
||||
+ &google, &startpage, &duckduckgo, &bing, &yahoo_nz,
|
||||
};
|
||||
|
||||
// Oman
|
||||
const PrepopulatedEngine* const engines_OM[] = {
|
||||
- &google, &duckduckgo, &bing, &yahoo_maktoob,
|
||||
+ &google, &startpage, &duckduckgo, &bing, &yahoo_maktoob,
|
||||
};
|
||||
|
||||
// Panama
|
||||
const PrepopulatedEngine* const engines_PA[] = {
|
||||
- &google, &duckduckgo, &yahoo, &bing,
|
||||
+ &google, &startpage, &duckduckgo, &yahoo, &bing,
|
||||
};
|
||||
|
||||
// Peru
|
||||
const PrepopulatedEngine* const engines_PE[] = {
|
||||
- &google, &duckduckgo, &bing, &yahoo_pe,
|
||||
+ &google, &startpage, &duckduckgo, &bing, &yahoo_pe,
|
||||
};
|
||||
|
||||
// Philippines
|
||||
const PrepopulatedEngine* const engines_PH[] = {
|
||||
- &google, &duckduckgo, &yahoo_ph, &bing,
|
||||
+ &google, &startpage, &duckduckgo, &yahoo_ph, &bing,
|
||||
};
|
||||
|
||||
// Pakistan
|
||||
const PrepopulatedEngine* const engines_PK[] = {
|
||||
- &google, &duckduckgo, &yahoo, &bing,
|
||||
+ &google, &startpage, &duckduckgo, &yahoo, &bing,
|
||||
};
|
||||
|
||||
// Puerto Rico
|
||||
const PrepopulatedEngine* const engines_PR[] = {
|
||||
- &google, &duckduckgo, &yahoo, &bing,
|
||||
+ &google, &startpage, &duckduckgo, &yahoo, &bing,
|
||||
};
|
||||
|
||||
// Poland
|
||||
const PrepopulatedEngine* const engines_PL[] = {
|
||||
- &google, &duckduckgo, &onet, &bing,
|
||||
+ &google, &startpage, &duckduckgo, &onet, &bing,
|
||||
};
|
||||
|
||||
// Portugal
|
||||
const PrepopulatedEngine* const engines_PT[] = {
|
||||
- &google, &duckduckgo, &bing, &yahoo,
|
||||
+ &google, &startpage, &duckduckgo, &bing, &yahoo,
|
||||
};
|
||||
|
||||
// Paraguay
|
||||
const PrepopulatedEngine* const engines_PY[] = {
|
||||
- &google, &duckduckgo, &bing, &yahoo,
|
||||
+ &google, &startpage, &duckduckgo, &bing, &yahoo,
|
||||
};
|
||||
|
||||
// Qatar
|
||||
const PrepopulatedEngine* const engines_QA[] = {
|
||||
- &google, &duckduckgo, &yahoo_maktoob, &bing,
|
||||
+ &google, &startpage, &duckduckgo, &yahoo_maktoob, &bing,
|
||||
};
|
||||
|
||||
// Romania
|
||||
const PrepopulatedEngine* const engines_RO[] = {
|
||||
- &google, &duckduckgo, &yahoo_ro, &bing,
|
||||
+ &google, &startpage, &duckduckgo, &yahoo_ro, &bing,
|
||||
};
|
||||
|
||||
// Serbia
|
||||
const PrepopulatedEngine* const engines_RS[] = {
|
||||
- &google, &duckduckgo, &bing, &yahoo,
|
||||
+ &google, &startpage, &duckduckgo, &bing, &yahoo,
|
||||
};
|
||||
|
||||
// Russia
|
||||
const PrepopulatedEngine* const engines_RU[] = {
|
||||
- &google, &duckduckgo, &yandex_ru, &mail_ru,
|
||||
+ &google, &startpage, &duckduckgo, &yandex_ru, &mail_ru,
|
||||
};
|
||||
|
||||
// Rwanda
|
||||
const PrepopulatedEngine* const engines_RW[] = {
|
||||
- &google, &duckduckgo, &bing, &yahoo,
|
||||
+ &google, &startpage, &duckduckgo, &bing, &yahoo,
|
||||
};
|
||||
|
||||
// Saudi Arabia
|
||||
const PrepopulatedEngine* const engines_SA[] = {
|
||||
- &google, &duckduckgo, &yahoo_maktoob, &bing,
|
||||
+ &google, &startpage, &duckduckgo, &yahoo_maktoob, &bing,
|
||||
};
|
||||
|
||||
// Sweden
|
||||
const PrepopulatedEngine* const engines_SE[] = {
|
||||
- &google, &duckduckgo, &bing, &yahoo_se,
|
||||
+ &google, &startpage, &duckduckgo, &bing, &yahoo_se,
|
||||
};
|
||||
|
||||
// Singapore
|
||||
const PrepopulatedEngine* const engines_SG[] = {
|
||||
- &google, &duckduckgo, &yahoo_sg, &bing,
|
||||
+ &google, &startpage, &duckduckgo, &yahoo_sg, &bing,
|
||||
};
|
||||
|
||||
// Slovenia
|
||||
const PrepopulatedEngine* const engines_SI[] = {
|
||||
- &google, &duckduckgo, &najdi, &ask,
|
||||
+ &google, &startpage, &duckduckgo, &najdi, &ask,
|
||||
};
|
||||
|
||||
// Slovakia
|
||||
const PrepopulatedEngine* const engines_SK[] = {
|
||||
- &google, &duckduckgo, &bing, &yahoo,
|
||||
+ &google, &startpage, &duckduckgo, &bing, &yahoo,
|
||||
};
|
||||
|
||||
// El Salvador
|
||||
const PrepopulatedEngine* const engines_SV[] = {
|
||||
- &google, &duckduckgo, &yahoo, &bing,
|
||||
+ &google, &startpage, &duckduckgo, &yahoo, &bing,
|
||||
};
|
||||
|
||||
// Syria
|
||||
const PrepopulatedEngine* const engines_SY[] = {
|
||||
- &google, &duckduckgo, &bing, &yahoo_maktoob,
|
||||
+ &google, &startpage, &duckduckgo, &bing, &yahoo_maktoob,
|
||||
};
|
||||
|
||||
// Thailand
|
||||
const PrepopulatedEngine* const engines_TH[] = {
|
||||
- &google, &duckduckgo, &yahoo_th, &bing,
|
||||
+ &google, &startpage, &duckduckgo, &yahoo_th, &bing,
|
||||
};
|
||||
|
||||
// Tunisia
|
||||
const PrepopulatedEngine* const engines_TN[] = {
|
||||
- &google, &duckduckgo, &bing, &yahoo_maktoob,
|
||||
+ &google, &startpage, &duckduckgo, &bing, &yahoo_maktoob,
|
||||
};
|
||||
|
||||
// Turkey
|
||||
const PrepopulatedEngine* const engines_TR[] = {
|
||||
- &google, &duckduckgo, &bing, &yahoo_tr, &yandex_tr,
|
||||
+ &google, &startpage, &duckduckgo, &bing, &yahoo_tr, &yandex_tr,
|
||||
};
|
||||
|
||||
// Trinidad and Tobago
|
||||
const PrepopulatedEngine* const engines_TT[] = {
|
||||
- &google, &duckduckgo, &bing, &yahoo,
|
||||
+ &google, &startpage, &duckduckgo, &bing, &yahoo,
|
||||
};
|
||||
|
||||
// Taiwan
|
||||
const PrepopulatedEngine* const engines_TW[] = {
|
||||
- &google, &duckduckgo, &yahoo_tw, &bing,
|
||||
+ &google, &startpage, &duckduckgo, &yahoo_tw, &bing,
|
||||
};
|
||||
|
||||
// Tanzania
|
||||
const PrepopulatedEngine* const engines_TZ[] = {
|
||||
- &google, &duckduckgo, &yahoo, &bing,
|
||||
+ &google, &startpage, &duckduckgo, &yahoo, &bing,
|
||||
};
|
||||
|
||||
// Ukraine
|
||||
const PrepopulatedEngine* const engines_UA[] = {
|
||||
- &google, &duckduckgo, &yandex_ua, &bing,
|
||||
+ &google, &startpage, &duckduckgo, &yandex_ua, &bing,
|
||||
};
|
||||
|
||||
// United States
|
||||
const PrepopulatedEngine* const engines_US[] = {
|
||||
- &google, &duckduckgo, &bing, &yahoo, &aol, &ask,
|
||||
+ &google, &startpage, &duckduckgo, &bing, &yahoo, &aol, &ask,
|
||||
};
|
||||
|
||||
// Uruguay
|
||||
const PrepopulatedEngine* const engines_UY[] = {
|
||||
- &google, &duckduckgo, &bing, &yahoo,
|
||||
+ &google, &startpage, &duckduckgo, &bing, &yahoo,
|
||||
};
|
||||
|
||||
// Venezuela
|
||||
const PrepopulatedEngine* const engines_VE[] = {
|
||||
- &google, &duckduckgo, &bing, &yahoo_ve,
|
||||
+ &google, &startpage, &duckduckgo, &bing, &yahoo_ve,
|
||||
};
|
||||
|
||||
// Vietnam
|
||||
const PrepopulatedEngine* const engines_VN[] = {
|
||||
- &google, &duckduckgo, &yahoo_vn, &bing,
|
||||
+ &google, &startpage, &duckduckgo, &yahoo_vn, &bing,
|
||||
};
|
||||
|
||||
// Yemen
|
||||
const PrepopulatedEngine* const engines_YE[] = {
|
||||
- &google, &duckduckgo, &bing, &yahoo_maktoob,
|
||||
+ &google, &startpage, &duckduckgo, &bing, &yahoo_maktoob,
|
||||
};
|
||||
|
||||
// South Africa
|
||||
const PrepopulatedEngine* const engines_ZA[] = {
|
||||
- &google, &duckduckgo, &bing, &yahoo,
|
||||
+ &google, &startpage, &duckduckgo, &bing, &yahoo,
|
||||
};
|
||||
|
||||
// Zimbabwe
|
||||
const PrepopulatedEngine* const engines_ZW[] = {
|
||||
- &google, &duckduckgo, &bing, &yahoo, &ask,
|
||||
+ &google, &startpage, &duckduckgo, &bing, &yahoo, &ask,
|
||||
};
|
||||
|
||||
// A list of all the engines that we know about.
|
||||
const PrepopulatedEngine* const kAllEngines[] = {
|
||||
// Prepopulated engines:
|
||||
- &aol, &ask, &ask_br, &ask_uk, &baidu, &bing, &daum, &google, &duckduckgo, &kvasir,
|
||||
+ &aol, &ask, &ask_br, &ask_uk, &baidu, &bing, &daum, &google, &startpage, &duckduckgo, &kvasir,
|
||||
&mail_ru, &najdi, &naver, &onet, &seznam, &sogou, &vinden, &virgilio,
|
||||
&yahoo, &yahoo_ar, &yahoo_at, &yahoo_au, &yahoo_br, &yahoo_ca, &yahoo_ch,
|
||||
&yahoo_cl, &yahoo_co, &yahoo_de, &yahoo_dk, &yahoo_es, &yahoo_fi, &yahoo_fr,
|
||||
@@ -0,0 +1,68 @@
|
||||
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
|
||||
|
||||
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") {
|
||||
"events/TreeScopeEventContext.h",
|
||||
"events/WindowEventContext.cpp",
|
||||
"events/WindowEventContext.h",
|
||||
+ "extensions/dont-track-me.h",
|
||||
"ng/flat_tree_traversal_ng.cc",
|
||||
"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 @@
|
||||
#include "core/xml/parser/XMLDocumentParser.h"
|
||||
#include "core/xml_names.h"
|
||||
#include "core/xmlns_names.h"
|
||||
+#include "extensions/dont-track-me.h"
|
||||
#include "platform/CrossThreadFunctional.h"
|
||||
#include "platform/DateComponents.h"
|
||||
#include "platform/EventDispatchForbiddenScope.h"
|
||||
@@ -5826,8 +5827,24 @@ void Document::FinishedParsing() {
|
||||
fetcher_->ClearResourcesFromPreviousFetcher();
|
||||
}
|
||||
|
||||
- if (IsPrefetchOnly())
|
||||
+ if (IsPrefetchOnly()) {
|
||||
WebPrerenderingSupport::Current()->PrefetchFinished();
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ // determine whether this is a Google search results page
|
||||
+ 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";
|
||||
+ HTMLScriptElement* e = HTMLScriptElement::Create(*this, false);
|
||||
+ e->setText(DONT_TRACK_ME_JS);
|
||||
+ bodyElement->AppendChild(e);
|
||||
+ }
|
||||
+ }
|
||||
}
|
||||
|
||||
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"
|
||||
+
|
||||
+#endif // dont_track_me_h
|
||||
@@ -0,0 +1,52 @@
|
||||
commit 6a6024067d27a53fb58af282580da68f6cea8809
|
||||
Author: csagan5 <32685696+csagan5@users.noreply.github.com>
|
||||
Date: Fri Oct 27 15:53:37 2017 +0200
|
||||
|
||||
Ported data reduction disable patch
|
||||
|
||||
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/firstrun/FirstRunActivity.java b/chrome/android/java/src/org/chromium/chrome/browser/firstrun/FirstRunActivity.java
|
||||
index ccc8517..5c69672 100644
|
||||
--- a/chrome/android/java/src/org/chromium/chrome/browser/firstrun/FirstRunActivity.java
|
||||
+++ b/chrome/android/java/src/org/chromium/chrome/browser/firstrun/FirstRunActivity.java
|
||||
@@ -144,7 +144,7 @@ public class FirstRunActivity extends FirstRunActivityBase implements FirstRunPa
|
||||
boolean notifyAdapter = false;
|
||||
// An optional Data Saver page.
|
||||
if (mFreProperties.getBoolean(SHOW_DATA_REDUCTION_PAGE)) {
|
||||
- mPages.add(pageOf(DataReductionProxyFirstRunFragment.class));
|
||||
+ //mPages.add(pageOf(DataReductionProxyFirstRunFragment.class));
|
||||
mFreProgressStates.add(FRE_PROGRESS_DATA_SAVER_SHOWN);
|
||||
notifyAdapter = true;
|
||||
}
|
||||
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/net/spdyproxy/DataReductionProxySettings.java b/chrome/android/java/src/org/chromium/chrome/browser/net/spdyproxy/DataReductionProxySettings.java
|
||||
index 822f642..06e91a5 100644
|
||||
--- a/chrome/android/java/src/org/chromium/chrome/browser/net/spdyproxy/DataReductionProxySettings.java
|
||||
+++ b/chrome/android/java/src/org/chromium/chrome/browser/net/spdyproxy/DataReductionProxySettings.java
|
||||
@@ -156,6 +156,7 @@ public class DataReductionProxySettings {
|
||||
// DataReductionProxySettings is a singleton that lives forever and there's no clean
|
||||
// shutdown of Chrome on Android
|
||||
mNativeDataReductionProxySettings = nativeInit();
|
||||
+ nativeSetDataReductionProxyEnabled(mNativeDataReductionProxySettings, false);
|
||||
}
|
||||
|
||||
/** Returns true if the SPDY proxy promo is allowed to be shown. */
|
||||
@@ -178,6 +179,7 @@ public class DataReductionProxySettings {
|
||||
* data reduction statistics if this is the first time the SPDY proxy has been enabled.
|
||||
*/
|
||||
public void setDataReductionProxyEnabled(Context context, boolean enabled) {
|
||||
+ enabled = false;
|
||||
if (enabled
|
||||
&& ContextUtils.getAppSharedPreferences().getLong(
|
||||
DATA_REDUCTION_FIRST_ENABLED_TIME, 0)
|
||||
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/preferences/datareduction/DataReductionPromoUtils.java b/chrome/android/java/src/org/chromium/chrome/browser/preferences/datareduction/DataReductionPromoUtils.java
|
||||
index bd42c89..b147765 100644
|
||||
--- a/chrome/android/java/src/org/chromium/chrome/browser/preferences/datareduction/DataReductionPromoUtils.java
|
||||
+++ b/chrome/android/java/src/org/chromium/chrome/browser/preferences/datareduction/DataReductionPromoUtils.java
|
||||
@@ -68,7 +68,7 @@ public class DataReductionPromoUtils {
|
||||
}
|
||||
if (DataReductionProxySettings.getInstance().isDataReductionProxyManaged()) return false;
|
||||
if (DataReductionProxySettings.getInstance().isDataReductionProxyEnabled()) return false;
|
||||
- return true;
|
||||
+ return false;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -0,0 +1,24 @@
|
||||
commit aff93733a4c414f9182103b7384c23e6fa450a6a
|
||||
Author: csagan5 <32685696+csagan5@users.noreply.github.com>
|
||||
Date: Thu Oct 26 16:59:03 2017 +0200
|
||||
|
||||
Disable WebRTC by default
|
||||
|
||||
diff --git a/chrome/browser/ui/browser_ui_prefs.cc b/chrome/browser/ui/browser_ui_prefs.cc
|
||||
index 946f7cd..96b79b1 100644
|
||||
--- a/chrome/browser/ui/browser_ui_prefs.cc
|
||||
+++ b/chrome/browser/ui/browser_ui_prefs.cc
|
||||
@@ -81,10 +81,10 @@ void RegisterBrowserUserPrefs(user_prefs::PrefRegistrySyncable* registry) {
|
||||
#endif
|
||||
#if BUILDFLAG(ENABLE_WEBRTC)
|
||||
// TODO(guoweis): Remove next 2 options at M50.
|
||||
- registry->RegisterBooleanPref(prefs::kWebRTCMultipleRoutesEnabled, true);
|
||||
- registry->RegisterBooleanPref(prefs::kWebRTCNonProxiedUdpEnabled, true);
|
||||
+ registry->RegisterBooleanPref(prefs::kWebRTCMultipleRoutesEnabled, false);
|
||||
+ registry->RegisterBooleanPref(prefs::kWebRTCNonProxiedUdpEnabled, false);
|
||||
registry->RegisterStringPref(prefs::kWebRTCIPHandlingPolicy,
|
||||
- content::kWebRTCIPHandlingDefault);
|
||||
+ content::kWebRTCIPHandlingDisableNonProxiedUdp);
|
||||
registry->RegisterStringPref(prefs::kWebRTCUDPPortRange, std::string());
|
||||
#endif
|
||||
|
||||
@@ -1,57 +0,0 @@
|
||||
commit 8d0b67d87462d537af6f7eb0cf445a2f66d5dd5c
|
||||
Author: csagan5 <32685696+csagan5@users.noreply.github.com>
|
||||
Date: Sun Oct 15 18:01:18 2017 +0200
|
||||
|
||||
Remove click tracking from google search results
|
||||
|
||||
diff --git a/third_party/WebKit/Source/core/dom/ContainerNode.cpp b/third_party/WebKit/Source/core/dom/ContainerNode.cpp
|
||||
index 1bada98..fb15e01 100644
|
||||
--- a/third_party/WebKit/Source/core/dom/ContainerNode.cpp
|
||||
+++ b/third_party/WebKit/Source/core/dom/ContainerNode.cpp
|
||||
@@ -58,6 +58,8 @@
|
||||
#include "platform/bindings/RuntimeCallStats.h"
|
||||
#include "platform/bindings/V8PerIsolateData.h"
|
||||
|
||||
+#include "base/logging.h"
|
||||
+
|
||||
namespace blink {
|
||||
|
||||
using namespace HTMLNames;
|
||||
@@ -1391,6 +1393,26 @@ StaticElementList* ContainerNode::QuerySelectorAll(
|
||||
return QuerySelectorAll(selectors, ASSERT_NO_EXCEPTION);
|
||||
}
|
||||
|
||||
+// this logic here will cleanup click tracking from hyperlink nodes on search results
|
||||
+static void applyInsertCustomization(Document *document, Node *c) {
|
||||
+ if (c->getNodeType() != Node::kElementNode)
|
||||
+ return;
|
||||
+ Element *element = ToElement(c);
|
||||
+
|
||||
+ // filter out non-hyperlink nodes
|
||||
+ if (element->tagName() != "A")
|
||||
+ return;
|
||||
+
|
||||
+ // determine whether this is a Google search results page
|
||||
+ WTF::String domain = document->GetSecurityOrigin()->Domain();
|
||||
+ size_t pos = domain.Find(".google.");
|
||||
+ if ((pos != WTF::kNotFound) && (domain.length() - pos - 8 < 4)) {
|
||||
+ //LOG(INFO) << "sanitizing Google search results hyperlink, href: " << element->getAttribute("href") << " onmousedown: " << element->getAttribute("onmousedown");
|
||||
+ // remove attribute
|
||||
+ element->removeAttribute("onmousedown");
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
static void DispatchChildInsertionEvents(Node& child) {
|
||||
if (child.IsInShadowTree())
|
||||
return;
|
||||
@@ -1402,6 +1424,10 @@ static void DispatchChildInsertionEvents(Node& child) {
|
||||
Node* c = &child;
|
||||
Document* document = &child.GetDocument();
|
||||
|
||||
+ // csagan5: no extension support in Chrom* for Android? no problem! we add custom code directly here
|
||||
+ if (c->parentNode())
|
||||
+ applyInsertCustomization(document, c);
|
||||
+
|
||||
if (c->parentNode() &&
|
||||
document->HasListenerType(Document::kDOMNodeInsertedListener))
|
||||
c->DispatchScopedEvent(MutationEvent::Create(
|
||||
Reference in New Issue
Block a user