Release 66.0.3359.148

This commit is contained in:
csagan5 2018-05-05 00:51:00 +02:00
parent 01ad976b53
commit 49ae827092
29 changed files with 1072 additions and 706 deletions

View file

@ -1,3 +1,8 @@
# 66.0.3359.148
* disable permanently all custom tab intents (https://github.com/bromite/bromite/issues/17)
* updated AdBlock filters
* reduce randomisation for client rects from 5% to 3%
# 65.0.3325.230
* fixed permission to access Google account issue (https://github.com/bromite/bromite/issues/11)
* updated AdBlock filters
@ -13,12 +18,12 @@
* updated AdBlock filters
# 65.0.3325.198
* re-landed support of third-party filters
* re-landed support for third-party AdBlock filters
* completed patches cleanup
* updated AdBlock filters
# 65.0.3325.190
* block some Canvas and AudioBuffer APIs mostly used for fingerprinting
* block some Canvas and AudioBuffer APIs mostly used for fingerprinting (https://github.com/bromite/bromite/issues/15)
* updated AdBlock filters
# 65.0.3325.176

File diff suppressed because one or more lines are too long

View file

@ -10,7 +10,7 @@ author: Chad Miller <chad.miller@canonical.com>
diff --git a/components/content_settings/core/browser/cookie_settings.cc b/components/content_settings/core/browser/cookie_settings.cc
--- a/components/content_settings/core/browser/cookie_settings.cc
+++ b/components/content_settings/core/browser/cookie_settings.cc
@@ -88,7 +88,7 @@ void CookieSettings::GetCookieSettings(
@@ -100,7 +100,7 @@ void CookieSettings::GetCookieSettings(
void CookieSettings::RegisterProfilePrefs(
user_prefs::PrefRegistrySyncable* registry) {
registry->RegisterBooleanPref(

View file

@ -21,8 +21,8 @@ diff --git a/components/component_updater/configurator_impl.cc b/components/comp
// If there is an element of |vec| of the form |test|=.*, returns the right-
// hand side of that assignment. Otherwise, returns an empty string.
@@ -89,8 +91,7 @@ ConfiguratorImpl::ConfiguratorImpl(
fast_update_(false),
@@ -86,8 +88,7 @@ ConfiguratorImpl::ConfiguratorImpl(const base::CommandLine* cmdline,
: fast_update_(false),
pings_enabled_(false),
deltas_enabled_(false),
- background_downloads_enabled_(false),
@ -31,7 +31,7 @@ diff --git a/components/component_updater/configurator_impl.cc b/components/comp
// Parse comma-delimited debug flags.
std::vector<std::string> switch_values = base::SplitString(
cmdline->GetSwitchValueASCII(switches::kComponentUpdater), ",",
@@ -138,22 +139,6 @@ int ConfiguratorImpl::UpdateDelay() const {
@@ -135,22 +136,6 @@ int ConfiguratorImpl::UpdateDelay() const {
std::vector<GURL> ConfiguratorImpl::UpdateUrl() const {
std::vector<GURL> urls;
@ -57,7 +57,7 @@ diff --git a/components/component_updater/configurator_impl.cc b/components/comp
diff --git a/components/component_updater/configurator_impl.h b/components/component_updater/configurator_impl.h
--- a/components/component_updater/configurator_impl.h
+++ b/components/component_updater/configurator_impl.h
@@ -98,7 +98,6 @@ class ConfiguratorImpl {
@@ -89,7 +89,6 @@ class ConfiguratorImpl {
bool pings_enabled_;
bool deltas_enabled_;
bool background_downloads_enabled_;

View file

@ -12,7 +12,7 @@ author: Jan Engelhardt <jengelh@inai.de>
diff --git a/components/content_settings/core/browser/content_settings_registry.cc b/components/content_settings/core/browser/content_settings_registry.cc
--- a/components/content_settings/core/browser/content_settings_registry.cc
+++ b/components/content_settings/core/browser/content_settings_registry.cc
@@ -118,7 +118,7 @@ void ContentSettingsRegistry::Init() {
@@ -117,7 +117,7 @@ void ContentSettingsRegistry::Init() {
// WARNING: The string names of the permissions passed in below are used to
// generate preference names and should never be changed!

View file

@ -32,7 +32,7 @@ diff --git a/net/cert/ev_root_ca_metadata.cc b/net/cert/ev_root_ca_metadata.cc
// AC Camerfirma S.A. Chambers of Commerce Root - 2008
// https://www.camerfirma.com
{
@@ -708,7 +718,9 @@ static const EVMetadata ev_root_ca_metadata[] = {
@@ -748,7 +758,9 @@ static const EVMetadata ev_root_ca_metadata[] = {
0xd2, 0x09, 0xb7, 0x37, 0xcb, 0xe2, 0xc1, 0x8c, 0xfb, 0x2c, 0x10,
0xc0, 0xff, 0x0b, 0xcf, 0x0d, 0x32, 0x86, 0xfc, 0x1a, 0xa2}},
{"2.16.840.1.114404.1.1.2.4.1", ""},

View file

@ -36,27 +36,27 @@ 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
@@ -858,7 +858,7 @@ void ChromeContentBrowserClient::RegisterLocalStatePrefs(
@@ -880,7 +880,7 @@ void ChromeContentBrowserClient::RegisterLocalStatePrefs(
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
diff --git a/chrome/browser/io_thread.cc b/chrome/browser/io_thread.cc
--- a/chrome/browser/io_thread.cc
+++ b/chrome/browser/io_thread.cc
@@ -620,7 +620,7 @@ void IOThread::RegisterPrefs(PrefRegistrySimple* registry) {
@@ -629,7 +629,7 @@ void IOThread::RegisterPrefs(PrefRegistrySimple* registry) {
std::string());
registry->RegisterBooleanPref(prefs::kEnableReferrers, true);
data_reduction_proxy::RegisterPrefs(registry);
- registry->RegisterBooleanPref(prefs::kBuiltInDnsClientEnabled, true);
+ registry->RegisterBooleanPref(prefs::kBuiltInDnsClientEnabled, false);
registry->RegisterListPref(prefs::kDnsOverHttpsServers);
registry->RegisterListPref(prefs::kDnsOverHttpsServerMethods);
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
--- a/chrome/browser/net/prediction_options.cc
+++ b/chrome/browser/net/prediction_options.cc
@ -108,7 +108,7 @@ diff --git a/chrome/browser/resources/settings/reset_page/reset_profile_dialog.h
diff --git a/chrome/browser/signin/signin_promo.cc b/chrome/browser/signin/signin_promo.cc
--- a/chrome/browser/signin/signin_promo.cc
+++ b/chrome/browser/signin/signin_promo.cc
@@ -391,8 +391,8 @@ void ForceWebBasedSigninFlowForTesting(bool force) {
@@ -384,8 +384,8 @@ void ForceWebBasedSigninFlowForTesting(bool force) {
void RegisterProfilePrefs(
user_prefs::PrefRegistrySyncable* registry) {
registry->RegisterIntegerPref(prefs::kSignInPromoStartupCount, 0);
@ -117,12 +117,12 @@ diff --git a/chrome/browser/signin/signin_promo.cc b/chrome/browser/signin/signi
+ registry->RegisterBooleanPref(prefs::kSignInPromoUserSkipped, true);
+ registry->RegisterBooleanPref(prefs::kSignInPromoShowOnFirstRunAllowed, false);
registry->RegisterBooleanPref(prefs::kSignInPromoShowNTPBubble, false);
registry->RegisterIntegerPref(prefs::kDiceSigninUserMenuPromoCount, 0);
}
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
@@ -59,11 +59,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(
@ -151,7 +151,7 @@ diff --git a/chrome/browser/ui/navigation_correction_tab_observer.cc b/chrome/br
diff --git a/chrome/browser/ui/webui/local_discovery/local_discovery_ui.cc b/chrome/browser/ui/webui/local_discovery/local_discovery_ui.cc
--- a/chrome/browser/ui/webui/local_discovery/local_discovery_ui.cc
+++ b/chrome/browser/ui/webui/local_discovery/local_discovery_ui.cc
@@ -144,10 +144,6 @@ void LocalDiscoveryUI::RegisterProfilePrefs(
@@ -143,10 +143,6 @@ void LocalDiscoveryUI::RegisterProfilePrefs(
user_prefs::PrefRegistrySyncable* registry) {
registry->RegisterBooleanPref(
prefs::kLocalDiscoveryNotificationsEnabled,
@ -177,7 +177,7 @@ diff --git a/chrome/service/cloud_print/connector_settings.cc b/chrome/service/c
diff --git a/components/autofill/core/browser/autofill_manager.cc b/components/autofill/core/browser/autofill_manager.cc
--- a/components/autofill/core/browser/autofill_manager.cc
+++ b/components/autofill/core/browser/autofill_manager.cc
@@ -216,7 +216,7 @@ void AutofillManager::RegisterProfilePrefs(
@@ -215,7 +215,7 @@ void AutofillManager::RegisterProfilePrefs(
registry->RegisterIntegerPref(
prefs::kAutofillCreditCardSigninPromoImpressionCount, 0);
registry->RegisterBooleanPref(
@ -207,7 +207,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
@@ -334,9 +334,9 @@ void RegisterProfilePrefs(PrefRegistrySimple* registry) {
@@ -370,9 +370,9 @@ void RegisterProfilePrefs(PrefRegistrySimple* registry) {
registry->RegisterBooleanPref(
prefs::kSafeBrowsingSawInterstitialScoutReporting, false);
registry->RegisterBooleanPref(
@ -222,7 +222,7 @@ diff --git a/components/safe_browsing/common/safe_browsing_prefs.cc b/components
diff --git a/extensions/common/extension.cc b/extensions/common/extension.cc
--- a/extensions/common/extension.cc
+++ b/extensions/common/extension.cc
@@ -344,14 +344,6 @@ bool Extension::ShouldDisplayInExtensionSettings() const {
@@ -330,14 +330,6 @@ bool Extension::ShouldDisplayInExtensionSettings() const {
if (is_theme())
return false;

View file

@ -9,7 +9,7 @@ Subject: Do not store passwords by default
diff --git a/components/password_manager/core/browser/password_manager.cc b/components/password_manager/core/browser/password_manager.cc
--- a/components/password_manager/core/browser/password_manager.cc
+++ b/components/password_manager/core/browser/password_manager.cc
@@ -236,10 +236,10 @@ PasswordFormManager* FindMatchedManager(
@@ -244,10 +244,10 @@ PasswordFormManager* FindMatchedManager(
void PasswordManager::RegisterProfilePrefs(
user_prefs::PrefRegistrySyncable* registry) {
registry->RegisterBooleanPref(

View file

@ -9,8 +9,8 @@ Subject: Disable NTP remote suggestions by default
diff --git a/components/ntp_snippets/features.cc b/components/ntp_snippets/features.cc
--- a/components/ntp_snippets/features.cc
+++ b/components/ntp_snippets/features.cc
@@ -37,16 +37,16 @@ const base::Feature* const kAllFeatures[] = {
nullptr};
@@ -41,16 +41,16 @@ const base::Feature kArticleSuggestionsExpandableHeader{
"NTPArticleSuggestionsExpandableHeader", base::FEATURE_DISABLED_BY_DEFAULT};
const base::Feature kArticleSuggestionsFeature{
- "NTPArticleSuggestions", base::FEATURE_ENABLED_BY_DEFAULT};

View file

@ -9,7 +9,7 @@ Subject: Disable WebRTC by default
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
@@ -78,10 +78,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.

View file

@ -3,15 +3,15 @@ Date: Sun, 26 Nov 2017 22:51:43 +0100
Subject: Skip the first run and metrics
---
.../chrome/browser/firstrun/FirstRunStatus.java | 11 +++++------
.../chrome/browser/firstrun/FirstRunStatus.java | 8 ++++----
.../chrome/browser/firstrun/FirstRunUtils.java | 16 ++++++----------
.../browser/firstrun/ToSAndUMAFirstRunFragment.java | 18 ++++++------------
3 files changed, 17 insertions(+), 28 deletions(-)
3 files changed, 16 insertions(+), 26 deletions(-)
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/firstrun/FirstRunStatus.java b/chrome/android/java/src/org/chromium/chrome/browser/firstrun/FirstRunStatus.java
--- a/chrome/android/java/src/org/chromium/chrome/browser/firstrun/FirstRunStatus.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/firstrun/FirstRunStatus.java
@@ -36,12 +36,11 @@ public class FirstRunStatus {
@@ -36,11 +36,11 @@ public class FirstRunStatus {
* includes ToS and Sign In pages if necessary.
*/
public static boolean getFirstRunFlowComplete() {
@ -21,20 +21,12 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/firstrun/FirstR
+ if (!complete) {
+ setFirstRunFlowComplete(true);
}
- return CommandLine.isInitialized()
- && CommandLine.getInstance().hasSwitch(
- ChromeSwitches.FORCE_FIRST_RUN_FLOW_COMPLETE_FOR_TESTING);
- return CommandLine.getInstance().hasSwitch(
- ChromeSwitches.FORCE_FIRST_RUN_FLOW_COMPLETE_FOR_TESTING);
+ return true;
}
/**
@@ -77,4 +76,4 @@ public class FirstRunStatus {
return ContextUtils.getAppSharedPreferences().getBoolean(
LIGHTWEIGHT_FIRST_RUN_FLOW_COMPLETE, false);
}
-}
\ No newline at end of file
+}
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/firstrun/FirstRunUtils.java b/chrome/android/java/src/org/chromium/chrome/browser/firstrun/FirstRunUtils.java
--- a/chrome/android/java/src/org/chromium/chrome/browser/firstrun/FirstRunUtils.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/firstrun/FirstRunUtils.java

View file

@ -9,9 +9,9 @@ Subject: Fix crash when accessing page info / site settings
diff --git a/chrome/browser/permissions/permission_manager.cc b/chrome/browser/permissions/permission_manager.cc
--- a/chrome/browser/permissions/permission_manager.cc
+++ b/chrome/browser/permissions/permission_manager.cc
@@ -601,6 +601,9 @@ PermissionResult PermissionManager::GetPermissionStatusHelper(
const GURL& embedding_origin) {
GURL canonical_requesting_origin = GetCanonicalOrigin(requesting_origin);
@@ -623,6 +623,9 @@ PermissionResult PermissionManager::GetPermissionStatusHelper(
GURL canonical_requesting_origin =
GetCanonicalOrigin(requesting_origin, embedding_origin);
PermissionContextBase* context = GetPermissionContext(permission);
+ if (context == nullptr) {
+ return PermissionResult(CONTENT_SETTING_BLOCK, PermissionStatusSource::UNSPECIFIED);

View file

@ -12,7 +12,7 @@ Limit threads auto-detect only for iOS
diff --git a/content/renderer/media_recorder/h264_encoder.cc b/content/renderer/media_recorder/h264_encoder.cc
--- a/content/renderer/media_recorder/h264_encoder.cc
+++ b/content/renderer/media_recorder/h264_encoder.cc
@@ -146,11 +146,11 @@ void H264Encoder::ConfigureEncoderOnEncodingTaskRunner(const gfx::Size& size) {
@@ -149,11 +149,11 @@ void H264Encoder::ConfigureEncoderOnEncodingTaskRunner(const gfx::Size& size) {
init_params.iRCMode = RC_OFF_MODE;
}

View file

@ -12,7 +12,7 @@ Subject: Cure AMP and tracking from search results
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
@@ -296,6 +296,7 @@ blink_core_sources("dom") {
@@ -301,6 +301,7 @@ blink_core_sources("dom") {
"events/TreeScopeEventContext.h",
"events/WindowEventContext.cpp",
"events/WindowEventContext.h",
@ -31,7 +31,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"
@@ -5858,8 +5859,24 @@ void Document::FinishedParsing() {
@@ -5804,8 +5805,24 @@ void Document::FinishedParsing() {
fetcher_->ClearResourcesFromPreviousFetcher();
}

View file

@ -14,7 +14,7 @@ Original Javascript code by timdream
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") {
@@ -302,6 +302,7 @@ blink_core_sources("dom") {
"events/WindowEventContext.cpp",
"events/WindowEventContext.h",
"extensions/dont-track-me.h",
@ -33,7 +33,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"
@@ -5866,17 +5867,25 @@ void Document::FinishedParsing() {
@@ -5812,17 +5813,25 @@ void Document::FinishedParsing() {
// determine whether this is a Google search results page
const SecurityOrigin *origin = GetSecurityOrigin();

View file

@ -23,7 +23,7 @@ diff --git a/chrome/browser/ui/chrome_pages.cc b/chrome/browser/ui/chrome_pages.
// Shows either the help app or the appropriate help page for |source|. If
// |browser| is NULL and the help page is used (vs the app), the help page is
// shown in the last active browser. If there is no such browser, a new browser
@@ -386,6 +380,7 @@ void ShowSearchEngineSettings(Browser* browser) {
@@ -396,6 +390,7 @@ void ShowSearchEngineSettings(Browser* browser) {
#if !defined(OS_ANDROID)
void ShowBrowserSignin(Browser* browser,
signin_metrics::AccessPoint access_point) {
@ -31,7 +31,7 @@ diff --git a/chrome/browser/ui/chrome_pages.cc b/chrome/browser/ui/chrome_pages.
Profile* original_profile = browser->profile()->GetOriginalProfile();
SigninManagerBase* manager =
SigninManagerFactory::GetForProfile(original_profile);
@@ -426,6 +421,7 @@ void ShowBrowserSignin(Browser* browser,
@@ -436,6 +431,7 @@ void ShowBrowserSignin(Browser* browser,
false));
DCHECK_GT(browser->tab_strip_model()->count(), 0);
}

View file

@ -3,13 +3,13 @@ Date: Mon, 12 Feb 2018 21:21:36 +0100
Subject: ungoogled-chromium: Disable webRTC log uploader
---
chrome/browser/media/webrtc/webrtc_log_uploader.cc | 62 ++--------------------
1 file changed, 4 insertions(+), 58 deletions(-)
chrome/browser/media/webrtc/webrtc_log_uploader.cc | 28 ++++------------------
1 file changed, 4 insertions(+), 24 deletions(-)
diff --git a/chrome/browser/media/webrtc/webrtc_log_uploader.cc b/chrome/browser/media/webrtc/webrtc_log_uploader.cc
--- a/chrome/browser/media/webrtc/webrtc_log_uploader.cc
+++ b/chrome/browser/media/webrtc/webrtc_log_uploader.cc
@@ -115,30 +115,10 @@ void WebRtcLogUploader::LoggingStoppedDoUpload(
@@ -115,30 +115,7 @@ void WebRtcLogUploader::LoggingStoppedDoUpload(
DCHECK(meta_data.get());
DCHECK(!upload_done_data.log_path.empty());
@ -18,8 +18,8 @@ diff --git a/chrome/browser/media/webrtc/webrtc_log_uploader.cc b/chrome/browser
-
- std::string local_log_id;
-
if (base::PathExists(upload_done_data.log_path)) {
WebRtcLogUtil::DeleteOldWebRtcLogFiles(upload_done_data.log_path);
- if (base::PathExists(upload_done_data.log_path)) {
- webrtc_logging::DeleteOldWebRtcLogFiles(upload_done_data.log_path);
-
- local_log_id = base::NumberToString(base::Time::Now().ToDoubleT());
- base::FilePath log_file_path =
@ -28,10 +28,10 @@ diff --git a/chrome/browser/media/webrtc/webrtc_log_uploader.cc b/chrome/browser
- WriteCompressedLogToFile(compressed_log, log_file_path);
-
- base::FilePath log_list_path =
- WebRtcLogList::GetWebRtcLogListFileForDirectory(
- webrtc_logging::LogList::GetWebRtcLogListFileForDirectory(
- upload_done_data.log_path);
- AddLocallyStoredLogInfoToUploadListFile(log_list_path, local_log_id);
}
- }
-
- WebRtcLogUploadDoneData upload_done_data_with_log_id = upload_done_data;
- upload_done_data_with_log_id.local_log_id = local_log_id;
@ -41,7 +41,7 @@ diff --git a/chrome/browser/media/webrtc/webrtc_log_uploader.cc b/chrome/browser
}
void WebRtcLogUploader::PrepareMultipartPostData(
@@ -149,6 +129,9 @@ void WebRtcLogUploader::PrepareMultipartPostData(
@@ -149,6 +126,9 @@ void WebRtcLogUploader::PrepareMultipartPostData(
DCHECK(!compressed_log.empty());
DCHECK(meta_data.get());
@ -51,50 +51,6 @@ diff --git a/chrome/browser/media/webrtc/webrtc_log_uploader.cc b/chrome/browser
std::unique_ptr<std::string> post_data(new std::string());
SetupMultipart(post_data.get(),
compressed_log,
@@ -237,43 +220,6 @@ void WebRtcLogUploader::LoggingStoppedDoStore(
WebRtcLogUtil::DeleteOldWebRtcLogFiles(log_paths.log_path);
- base::FilePath log_list_path =
- WebRtcLogList::GetWebRtcLogListFileForDirectory(log_paths.log_path);
-
- // Store the native log with a ".gz" extension.
- std::string compressed_log;
- CompressLog(&compressed_log, log_buffer.get());
- base::FilePath native_log_path = log_paths.log_path.AppendASCII(log_id)
- .AddExtension(FILE_PATH_LITERAL(".gz"));
- WriteCompressedLogToFile(compressed_log, native_log_path);
- AddLocallyStoredLogInfoToUploadListFile(log_list_path, log_id);
-
- // Move the rtp dump files to the log directory with a name of
- // <log id>.rtp_[in|out].
- if (!log_paths.incoming_rtp_dump.empty()) {
- base::FilePath rtp_path = log_paths.log_path.AppendASCII(log_id)
- .AddExtension(FILE_PATH_LITERAL(".rtp_in"));
- base::Move(log_paths.incoming_rtp_dump, rtp_path);
- }
-
- if (!log_paths.outgoing_rtp_dump.empty()) {
- base::FilePath rtp_path = log_paths.log_path.AppendASCII(log_id)
- .AddExtension(FILE_PATH_LITERAL(".rtp_out"));
- base::Move(log_paths.outgoing_rtp_dump, rtp_path);
- }
-
- if (meta_data.get() && !meta_data->empty()) {
- base::Pickle pickle;
- for (const auto& it : *meta_data.get()) {
- pickle.WriteString(it.first);
- pickle.WriteString(it.second);
- }
- base::FilePath meta_path = log_paths.log_path.AppendASCII(log_id)
- .AddExtension(FILE_PATH_LITERAL(".meta"));
- base::WriteFile(meta_path, static_cast<const char*>(pickle.data()),
- pickle.size());
- }
-
BrowserThread::PostTask(BrowserThread::UI, FROM_HERE,
base::BindOnce(done_callback, true, ""));
--
2.7.4

View file

@ -28,7 +28,7 @@ diff --git a/chrome/browser/android/rlz/rlz_ping_handler.cc b/chrome/browser/and
diff --git a/chrome/browser/plugins/plugins_resource_service.cc b/chrome/browser/plugins/plugins_resource_service.cc
--- a/chrome/browser/plugins/plugins_resource_service.cc
+++ b/chrome/browser/plugins/plugins_resource_service.cc
@@ -51,9 +51,6 @@ const int kStartResourceFetchDelayMs = 60 * 1000;
@@ -52,9 +52,6 @@ const int kStartResourceFetchDelayMs = 60 * 1000;
// Delay between calls to update the cache 1 day and 2 minutes in testing mode.
const int kCacheUpdateDelayMs = 24 * 60 * 60 * 1000;
@ -38,7 +38,7 @@ diff --git a/chrome/browser/plugins/plugins_resource_service.cc b/chrome/browser
GURL GetPluginsServerURL() {
std::string filename;
#if defined(OS_WIN)
@@ -68,7 +65,7 @@ GURL GetPluginsServerURL() {
@@ -69,7 +66,7 @@ GURL GetPluginsServerURL() {
#error Unknown platform
#endif

View file

@ -14,7 +14,7 @@ Disables various detections of Google hosts and functionality specific to them
diff --git a/chrome/browser/page_load_metrics/page_load_metrics_util.cc b/chrome/browser/page_load_metrics/page_load_metrics_util.cc
--- a/chrome/browser/page_load_metrics/page_load_metrics_util.cc
+++ b/chrome/browser/page_load_metrics/page_load_metrics_util.cc
@@ -164,9 +164,7 @@ bool DidObserveLoadingBehaviorInAnyFrame(
@@ -169,9 +169,7 @@ bool DidObserveLoadingBehaviorInAnyFrame(
}
bool IsGoogleSearchHostname(const GURL& url) {
@ -324,7 +324,7 @@ diff --git a/components/google/core/browser/google_util.cc b/components/google/c
diff --git a/components/search_engines/template_url.cc b/components/search_engines/template_url.cc
--- a/components/search_engines/template_url.cc
+++ b/components/search_engines/template_url.cc
@@ -455,11 +455,6 @@ base::string16 TemplateURLRef::SearchTermToString16(
@@ -510,11 +510,6 @@ base::string16 TemplateURLRef::SearchTermToString16(
bool TemplateURLRef::HasGoogleBaseURLs(
const SearchTermsData& search_terms_data) const {
ParseIfNecessary(search_terms_data);

View file

@ -10,7 +10,7 @@ Disable Google Cloud Messaging (GCM) client
diff --git a/components/gcm_driver/gcm_client_impl.cc b/components/gcm_driver/gcm_client_impl.cc
--- a/components/gcm_driver/gcm_client_impl.cc
+++ b/components/gcm_driver/gcm_client_impl.cc
@@ -481,6 +481,7 @@ void GCMClientImpl::StartGCM() {
@@ -502,6 +502,7 @@ void GCMClientImpl::StartGCM() {
}
void GCMClientImpl::InitializeMCSClient() {
@ -18,7 +18,7 @@ diff --git a/components/gcm_driver/gcm_client_impl.cc b/components/gcm_driver/gc
std::vector<GURL> endpoints;
endpoints.push_back(gservices_settings_.GetMCSMainEndpoint());
GURL fallback_endpoint = gservices_settings_.GetMCSFallbackEndpoint();
@@ -678,6 +679,7 @@ void GCMClientImpl::RemoveHeartbeatInterval(const std::string& scope) {
@@ -699,6 +700,7 @@ void GCMClientImpl::RemoveHeartbeatInterval(const std::string& scope) {
}
void GCMClientImpl::StartCheckin() {
@ -26,7 +26,7 @@ diff --git a/components/gcm_driver/gcm_client_impl.cc b/components/gcm_driver/gc
// Make sure no checkin is in progress.
if (checkin_request_.get())
return;
@@ -756,6 +758,7 @@ void GCMClientImpl::SetGServicesSettingsCallback(bool success) {
@@ -777,6 +779,7 @@ void GCMClientImpl::SetGServicesSettingsCallback(bool success) {
}
void GCMClientImpl::SchedulePeriodicCheckin() {

View file

@ -18,7 +18,7 @@ See also: https://github.com/Eloston/ungoogled-chromium/issues/104
diff --git a/chrome/browser/browser_resources.grd b/chrome/browser/browser_resources.grd
--- a/chrome/browser/browser_resources.grd
+++ b/chrome/browser/browser_resources.grd
@@ -307,7 +307,6 @@
@@ -299,7 +299,6 @@
<include name="IDR_INLINE_LOGIN_HTML" file="resources\inline_login\inline_login.html" flattenhtml="true" allowexternalscript="true" type="BINDATA" />
<include name="IDR_INLINE_LOGIN_CSS" file="resources\inline_login\inline_login.css" flattenhtml="true" type="BINDATA" />
<include name="IDR_INLINE_LOGIN_JS" file="resources\inline_login\inline_login.js" flattenhtml="true" type="BINDATA" />
@ -26,7 +26,7 @@ diff --git a/chrome/browser/browser_resources.grd b/chrome/browser/browser_resou
<include name="IDR_INSPECT_CSS" file="resources\inspect\inspect.css" flattenhtml="true" type="BINDATA" />
<include name="IDR_INSPECT_HTML" file="resources\inspect\inspect.html" flattenhtml="true" allowexternalscript="true" type="BINDATA" />
<include name="IDR_INSPECT_JS" file="resources\inspect\inspect.js" flattenhtml="true" type="BINDATA" />
@@ -445,7 +444,6 @@
@@ -435,7 +434,6 @@
</if>
<include name="IDR_WEBSTORE_MANIFEST" file="resources\webstore_app\manifest.json" type="BINDATA" />
<include name="IDR_CRYPTOTOKEN_MANIFEST" file="resources\cryptotoken\manifest.json" type="BINDATA" />

View file

@ -19,7 +19,7 @@ Adds a menu item under "More tools" to clear the HTTP authentication cache on de
diff --git a/chrome/app/chrome_command_ids.h b/chrome/app/chrome_command_ids.h
--- a/chrome/app/chrome_command_ids.h
+++ b/chrome/app/chrome_command_ids.h
@@ -148,6 +148,7 @@
@@ -150,6 +150,7 @@
#define IDC_DEV_TOOLS_INSPECT 40023
#define IDC_UPGRADE_DIALOG 40024
#define IDC_VIEW_INCOMPATIBILITIES 40025
@ -30,7 +30,7 @@ diff --git a/chrome/app/chrome_command_ids.h b/chrome/app/chrome_command_ids.h
diff --git a/chrome/app/generated_resources.grd b/chrome/app/generated_resources.grd
--- a/chrome/app/generated_resources.grd
+++ b/chrome/app/generated_resources.grd
@@ -1064,6 +1064,9 @@ are declared in build/common.gypi.
@@ -1050,6 +1050,9 @@ are declared in build/common.gypi.
<message name="IDS_CLEAR_BROWSING_DATA" desc="The text label for the menu item for clearing of browsing data">
&amp;Clear browsing data...
</message>
@ -40,7 +40,7 @@ diff --git a/chrome/app/generated_resources.grd b/chrome/app/generated_resources
<message name="IDS_SHOW_DOWNLOADS" desc="The show downloads menu in the app menu">
&amp;Downloads
</message>
@@ -1102,6 +1105,9 @@ are declared in build/common.gypi.
@@ -1088,6 +1091,9 @@ are declared in build/common.gypi.
<message name="IDS_CLEAR_BROWSING_DATA" desc="In Title Case: The text label for the menu item for clearing of browsing data">
&amp;Clear Browsing Data...
</message>
@ -53,7 +53,7 @@ diff --git a/chrome/app/generated_resources.grd b/chrome/app/generated_resources
diff --git a/chrome/browser/ui/browser_command_controller.cc b/chrome/browser/ui/browser_command_controller.cc
--- a/chrome/browser/ui/browser_command_controller.cc
+++ b/chrome/browser/ui/browser_command_controller.cc
@@ -58,6 +58,9 @@
@@ -59,6 +59,9 @@
#include "extensions/browser/extension_system.h"
#include "printing/features/features.h"
#include "ui/events/keycodes/keyboard_codes.h"
@ -63,7 +63,7 @@ diff --git a/chrome/browser/ui/browser_command_controller.cc b/chrome/browser/ui
#if defined(OS_MACOSX)
#include "chrome/browser/ui/browser_commands_mac.h"
@@ -625,6 +628,9 @@ bool BrowserCommandController::ExecuteCommandWithDisposition(
@@ -624,6 +627,9 @@ bool BrowserCommandController::ExecuteCommandWithDisposition(
case IDC_CLEAR_BROWSING_DATA:
ShowClearBrowsingDataDialog(browser_);
break;
@ -73,7 +73,7 @@ diff --git a/chrome/browser/ui/browser_command_controller.cc b/chrome/browser/ui
case IDC_IMPORT_SETTINGS:
ShowImportDialog(browser_);
break;
@@ -867,6 +873,7 @@ void BrowserCommandController::InitCommandState() {
@@ -865,6 +871,7 @@ void BrowserCommandController::InitCommandState() {
!profile()->IsOffTheRecord());
command_updater_.UpdateCommandEnabled(IDC_CLEAR_BROWSING_DATA,
!guest_session);
@ -157,7 +157,7 @@ diff --git a/net/http/http_auth_cache.h b/net/http/http_auth_cache.h
diff --git a/tools/metrics/histograms/enums.xml b/tools/metrics/histograms/enums.xml
--- a/tools/metrics/histograms/enums.xml
+++ b/tools/metrics/histograms/enums.xml
@@ -46154,6 +46154,7 @@ Called by update_traffic_annotation_histograms.py.-->
@@ -46999,6 +46999,7 @@ Called by update_traffic_annotation_histograms.py.-->
<int value="48" label="Open in Chrome"/>
<int value="49" label="Site Settings"/>
<int value="50" label="App Info"/>
@ -168,7 +168,7 @@ diff --git a/tools/metrics/histograms/enums.xml b/tools/metrics/histograms/enums
diff --git a/tools/metrics/histograms/histograms.xml b/tools/metrics/histograms/histograms.xml
--- a/tools/metrics/histograms/histograms.xml
+++ b/tools/metrics/histograms/histograms.xml
@@ -102544,6 +102544,7 @@ http://cs/file:chrome/histograms.xml - but prefer this file for new entries.
@@ -104632,6 +104632,7 @@ http://cs/file:chrome/histograms.xml - but prefer this file for new entries.
<suffix name="Overestimate"
label="Tracks when the compositor's estimates were too high and by how
much."/>

View file

@ -14,7 +14,7 @@ Subject: url_request: hooks and ad url data
diff --git a/net/BUILD.gn b/net/BUILD.gn
--- a/net/BUILD.gn
+++ b/net/BUILD.gn
@@ -1739,6 +1739,8 @@ component("net") {
@@ -1748,6 +1748,8 @@ component("net") {
"url_request/url_fetcher_response_writer.h",
"url_request/url_range_request_job.cc",
"url_request/url_range_request_job.h",
@ -166,15 +166,15 @@ new file mode 100644
diff --git a/net/url_request/url_request.cc b/net/url_request/url_request.cc
--- a/net/url_request/url_request.cc
+++ b/net/url_request/url_request.cc
@@ -44,6 +44,8 @@
@@ -43,6 +43,8 @@
#include "url/gurl.h"
#include "url/origin.h"
+#include "net/url_request/nochromo_intercept.h"
+
#if BUILDFLAG(ENABLE_REPORTING)
#include "net/url_request/network_error_logging_delegate.h"
#endif // BUILDFLAG(ENABLE_REPORTING)
#include "net/network_error_logging/network_error_logging_service.h"
#include "net/reporting/reporting_service.h"
@@ -581,6 +583,8 @@ URLRequest::URLRequest(const GURL& url,
// Sanity check out environment.
DCHECK(base::ThreadTaskRunnerHandle::IsSet());

View file

@ -22,7 +22,7 @@ Re-land: third-party filters support
diff --git a/net/BUILD.gn b/net/BUILD.gn
--- a/net/BUILD.gn
+++ b/net/BUILD.gn
@@ -1739,8 +1739,6 @@ component("net") {
@@ -1748,8 +1748,6 @@ component("net") {
"url_request/url_fetcher_response_writer.h",
"url_request/url_range_request_job.cc",
"url_request/url_range_request_job.h",
@ -31,7 +31,7 @@ diff --git a/net/BUILD.gn b/net/BUILD.gn
"url_request/url_request.cc",
"url_request/url_request.h",
"url_request/url_request_context.cc",
@@ -1801,6 +1799,13 @@ component("net") {
@@ -1810,6 +1808,13 @@ component("net") {
"//third_party/zlib",
]
@ -44,7 +44,7 @@ diff --git a/net/BUILD.gn b/net/BUILD.gn
+
if (enable_reporting) {
sources += [
"network_error_logging/network_error_logging_service.cc",
"network_error_logging/network_error_logging_delegate.cc",
diff --git a/net/url_request/adblock_intercept.cc b/net/url_request/adblock_intercept.cc
new file mode 100644
--- /dev/null
@ -538,7 +538,7 @@ deleted file mode 100644
diff --git a/net/url_request/url_request.cc b/net/url_request/url_request.cc
--- a/net/url_request/url_request.cc
+++ b/net/url_request/url_request.cc
@@ -44,7 +44,9 @@
@@ -43,7 +43,9 @@
#include "url/gurl.h"
#include "url/origin.h"
@ -548,7 +548,7 @@ diff --git a/net/url_request/url_request.cc b/net/url_request/url_request.cc
+#endif
#if BUILDFLAG(ENABLE_REPORTING)
#include "net/url_request/network_error_logging_delegate.h"
#include "net/network_error_logging/network_error_logging_service.h"
@@ -558,7 +560,9 @@ URLRequest::URLRequest(const GURL& url,
: context->network_delegate()),
net_log_(NetLogWithSource::Make(context->net_log(),

View file

@ -9,7 +9,7 @@ Subject: Disable plugins enumeration
diff --git a/third_party/WebKit/Source/core/frame/LocalFrame.cpp b/third_party/WebKit/Source/core/frame/LocalFrame.cpp
--- a/third_party/WebKit/Source/core/frame/LocalFrame.cpp
+++ b/third_party/WebKit/Source/core/frame/LocalFrame.cpp
@@ -1086,10 +1086,8 @@ FrameResourceCoordinator* LocalFrame::GetFrameResourceCoordinator() {
@@ -1134,10 +1134,8 @@ FrameResourceCoordinator* LocalFrame::GetFrameResourceCoordinator() {
}
PluginData* LocalFrame::GetPluginData() const {

View file

@ -1,67 +0,0 @@
From: csagan5 <32685696+csagan5@users.noreply.github.com>
Date: Sat, 24 Mar 2018 05:18:03 +0100
Subject: Canvas: fingerprinting mitigations via IDL
Disable toDataURL, toBlob, getImageData and webGL renderering info
---
third_party/WebKit/Source/core/html/canvas/HTMLCanvasElement.idl | 4 ++--
.../Source/modules/canvas/canvas2d/CanvasRenderingContext2D.idl | 4 ++--
third_party/WebKit/Source/modules/webgl/WebGLDebugRendererInfo.cpp | 4 ++--
3 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/third_party/WebKit/Source/core/html/canvas/HTMLCanvasElement.idl b/third_party/WebKit/Source/core/html/canvas/HTMLCanvasElement.idl
--- a/third_party/WebKit/Source/core/html/canvas/HTMLCanvasElement.idl
+++ b/third_party/WebKit/Source/core/html/canvas/HTMLCanvasElement.idl
@@ -36,9 +36,9 @@ interface HTMLCanvasElement : HTMLElement
// Note: The arguments argument is variadic in the spec, but not here as
// only one extra argument is actually used.
// FIXME: type should not have a default value.
- [MeasureAs=CanvasToDataURL, RaisesException] DOMString toDataURL(optional DOMString type = null, optional any arguments);
+ //[MeasureAs=CanvasToDataURL, RaisesException] DOMString toDataURL(optional DOMString type = null, optional any arguments);
- [MeasureAs=CanvasToBlob, RaisesException] void toBlob(BlobCallback _callback, optional DOMString type = null, optional any arguments);
+ //[MeasureAs=CanvasToBlob, RaisesException] void toBlob(BlobCallback _callback, optional DOMString type = null, optional any arguments);
};
// https://html.spec.whatwg.org/multipage/canvas.html#blobcallback
diff --git a/third_party/WebKit/Source/modules/canvas/canvas2d/CanvasRenderingContext2D.idl b/third_party/WebKit/Source/modules/canvas/canvas2d/CanvasRenderingContext2D.idl
--- a/third_party/WebKit/Source/modules/canvas/canvas2d/CanvasRenderingContext2D.idl
+++ b/third_party/WebKit/Source/modules/canvas/canvas2d/CanvasRenderingContext2D.idl
@@ -110,7 +110,7 @@ interface CanvasRenderingContext2D {
// text (see also the CanvasDrawingStyles interface)
void fillText(DOMString text, unrestricted double x, unrestricted double y, optional unrestricted double maxWidth);
void strokeText(DOMString text, unrestricted double x, unrestricted double y, optional unrestricted double maxWidth);
- TextMetrics measureText(DOMString text);
+ //TextMetrics measureText(DOMString text);
// drawing images
[CallWith=ScriptState, RaisesException] void drawImage(CanvasImageSource image, unrestricted double x, unrestricted double y);
@@ -125,7 +125,7 @@ interface CanvasRenderingContext2D {
// pixel manipulation
[RaisesException] ImageData createImageData(ImageData imagedata);
[RaisesException] ImageData createImageData(long sw, long sh);
- [RaisesException] ImageData getImageData(long sx, long sy, long sw, long sh);
+ //[RaisesException] ImageData getImageData(long sx, long sy, long sw, long sh);
[RaisesException] void putImageData(ImageData imagedata, long dx, long dy);
[RaisesException] void putImageData(ImageData imagedata, long dx, long dy, long dirtyX, long dirtyY, long dirtyWidth, long dirtyHeight);
diff --git a/third_party/WebKit/Source/modules/webgl/WebGLDebugRendererInfo.cpp b/third_party/WebKit/Source/modules/webgl/WebGLDebugRendererInfo.cpp
--- a/third_party/WebKit/Source/modules/webgl/WebGLDebugRendererInfo.cpp
+++ b/third_party/WebKit/Source/modules/webgl/WebGLDebugRendererInfo.cpp
@@ -37,11 +37,11 @@ WebGLExtensionName WebGLDebugRendererInfo::GetName() const {
WebGLDebugRendererInfo* WebGLDebugRendererInfo::Create(
WebGLRenderingContextBase* context) {
- return new WebGLDebugRendererInfo(context);
+ return nullptr;
}
bool WebGLDebugRendererInfo::Supported(WebGLRenderingContextBase*) {
- return true;
+ return false;
}
const char* WebGLDebugRendererInfo::ExtensionName() {
--
2.7.4

View file

@ -1,57 +0,0 @@
From: csagan5 <32685696+csagan5@users.noreply.github.com>
Date: Sun, 25 Mar 2018 21:49:37 +0200
Subject: AudioBuffer, AnalyserNode: fingerprinting mitigations via IDL
Return fixed base latency
---
third_party/WebKit/Source/modules/webaudio/AnalyserNode.idl | 8 ++++----
third_party/WebKit/Source/modules/webaudio/AudioBuffer.idl | 4 ++--
third_party/WebKit/Source/modules/webaudio/AudioContext.cpp | 2 +-
3 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/third_party/WebKit/Source/modules/webaudio/AnalyserNode.idl b/third_party/WebKit/Source/modules/webaudio/AnalyserNode.idl
--- a/third_party/WebKit/Source/modules/webaudio/AnalyserNode.idl
+++ b/third_party/WebKit/Source/modules/webaudio/AnalyserNode.idl
@@ -42,10 +42,10 @@ interface AnalyserNode : AudioNode {
// Copies the current frequency data into the passed array.
// If the array has fewer elements than the frequencyBinCount, the excess elements will be dropped.
- void getFloatFrequencyData(Float32Array array);
- void getByteFrequencyData(Uint8Array array);
+ //void getFloatFrequencyData(Float32Array array);
+ //void getByteFrequencyData(Uint8Array array);
// Real-time waveform data
- void getFloatTimeDomainData(Float32Array array);
- void getByteTimeDomainData(Uint8Array array);
+ //void getFloatTimeDomainData(Float32Array array);
+ //void getByteTimeDomainData(Uint8Array array);
};
diff --git a/third_party/WebKit/Source/modules/webaudio/AudioBuffer.idl b/third_party/WebKit/Source/modules/webaudio/AudioBuffer.idl
--- a/third_party/WebKit/Source/modules/webaudio/AudioBuffer.idl
+++ b/third_party/WebKit/Source/modules/webaudio/AudioBuffer.idl
@@ -38,7 +38,7 @@
// Channel access
readonly attribute unsigned long numberOfChannels;
- [RaisesException] Float32Array getChannelData(unsigned long channelIndex);
- [RaisesException] void copyFromChannel(Float32Array destination, long channelNumber, optional unsigned long startInChannel = 0);
+ //[RaisesException] Float32Array getChannelData(unsigned long channelIndex);
+ //[RaisesException] void copyFromChannel(Float32Array destination, long channelNumber, optional unsigned long startInChannel = 0);
[RaisesException] void copyToChannel(Float32Array source, long channelNumber, optional unsigned long startInChannel = 0);
};
diff --git a/third_party/WebKit/Source/modules/webaudio/AudioContext.cpp b/third_party/WebKit/Source/modules/webaudio/AudioContext.cpp
--- a/third_party/WebKit/Source/modules/webaudio/AudioContext.cpp
+++ b/third_party/WebKit/Source/modules/webaudio/AudioContext.cpp
@@ -268,7 +268,7 @@ void AudioContext::StopRendering() {
}
double AudioContext::baseLatency() const {
- return FramesPerBuffer() / static_cast<double>(sampleRate());
+ return 0.04;
}
// TODO(crbug.com/764396): Remove these when fixed.
--
2.7.4

View file

@ -1,130 +0,0 @@
From: csagan5 <32685696+csagan5@users.noreply.github.com>
Date: Fri, 30 Mar 2018 10:09:03 +0200
Subject: Add fingerprinting mitigation for getClientRects,
getBoundingClientRect
Scale the result of Range::getClientRects and Element::getBoundingClientRect
by a random +/-5% of the original value for each float in the Rect/Quad.
The random value is generated once for each Document and re-used for all the
attached elements.
The rationale is that such value, albeit constant within the rendered Document,
is within the same order of magniture of the floating point precision being
used for fingerprinting and sufficient to poison the well.
See also: http://www.gsd.inesc-id.pt/~mpc/pubs/fingerprinting-trustcom2016.pdf
---
third_party/WebKit/Source/core/dom/Document.cpp | 14 ++++++++++++++
third_party/WebKit/Source/core/dom/Document.h | 5 +++++
third_party/WebKit/Source/core/dom/Element.cpp | 7 +++++++
third_party/WebKit/Source/core/dom/Range.cpp | 8 +++++++-
4 files changed, 33 insertions(+), 1 deletion(-)
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
@@ -271,6 +271,8 @@
#include "services/service_manager/public/cpp/interface_provider.h"
#include "third_party/WebKit/common/page/page_visibility_state.mojom-blink.h"
+#include "base/rand_util.h"
+
#ifndef NDEBUG
using WeakDocumentSet =
blink::PersistentHeapHashSet<blink::WeakMember<blink::Document>>;
@@ -730,6 +732,10 @@ Document::Document(const DocumentInit& initializer,
#ifndef NDEBUG
liveDocumentSet().insert(this);
#endif
+
+ // add ±5% noise against fingerprinting
+ shuffleFactorX_ = 1 + (base::RandDouble() - 0.5) * 0.05;
+ shuffleFactorY_ = 1 + (base::RandDouble() - 0.5) * 0.05;
}
Document::~Document() {
@@ -756,6 +762,14 @@ Range* Document::CreateRangeAdjustedToTreeScope(const TreeScope& tree_scope,
Position::BeforeNode(*shadow_host));
}
+double Document::GetShuffleFactorX() {
+ return shuffleFactorX_;
+}
+
+double Document::GetShuffleFactorY() {
+ return shuffleFactorY_;
+}
+
SelectorQueryCache& Document::GetSelectorQueryCache() {
if (!selector_query_cache_)
selector_query_cache_ = std::make_unique<SelectorQueryCache>();
diff --git a/third_party/WebKit/Source/core/dom/Document.h b/third_party/WebKit/Source/core/dom/Document.h
--- a/third_party/WebKit/Source/core/dom/Document.h
+++ b/third_party/WebKit/Source/core/dom/Document.h
@@ -407,6 +407,9 @@ class CORE_EXPORT Document : public ContainerNode,
String origin() const;
String suborigin() const;
+ double GetShuffleFactorX();
+ double GetShuffleFactorY();
+
String visibilityState() const;
mojom::PageVisibilityState GetPageVisibilityState() const;
bool hidden() const;
@@ -1671,6 +1674,8 @@ class CORE_EXPORT Document : public ContainerNode,
double start_time_;
+ double shuffleFactorX_, shuffleFactorY_;
+
TraceWrapperMember<ScriptRunner> script_runner_;
HeapVector<Member<ScriptElementBase>> current_script_stack_;
diff --git a/third_party/WebKit/Source/core/dom/Element.cpp b/third_party/WebKit/Source/core/dom/Element.cpp
--- a/third_party/WebKit/Source/core/dom/Element.cpp
+++ b/third_party/WebKit/Source/core/dom/Element.cpp
@@ -1227,6 +1227,11 @@ DOMRectList* Element::getClientRects() {
DCHECK(element_layout_object);
GetDocument().AdjustFloatQuadsForScrollAndAbsoluteZoom(
quads, *element_layout_object);
+
+ for (FloatQuad& quad : quads) {
+ quad.Scale(GetDocument().GetShuffleFactorX(), GetDocument().GetShuffleFactorY());
+ }
+
return DOMRectList::Create(quads);
}
@@ -1244,6 +1249,8 @@ DOMRect* Element::getBoundingClientRect() {
DCHECK(element_layout_object);
GetDocument().AdjustFloatRectForScrollAndAbsoluteZoom(result,
*element_layout_object);
+ result.Scale(GetDocument().GetShuffleFactorX(), GetDocument().GetShuffleFactorY());
+
return DOMRect::FromFloatRect(result);
}
diff --git a/third_party/WebKit/Source/core/dom/Range.cpp b/third_party/WebKit/Source/core/dom/Range.cpp
--- a/third_party/WebKit/Source/core/dom/Range.cpp
+++ b/third_party/WebKit/Source/core/dom/Range.cpp
@@ -1589,11 +1589,17 @@ DOMRectList* Range::getClientRects() const {
Vector<FloatQuad> quads;
GetBorderAndTextQuads(quads);
+ for (FloatQuad& quad : quads) {
+ quad.Scale(owner_document_->GetShuffleFactorX(), owner_document_->GetShuffleFactorY());
+ }
+
return DOMRectList::Create(quads);
}
DOMRect* Range::getBoundingClientRect() const {
- return DOMRect::FromFloatRect(BoundingRect());
+ auto rect = BoundingRect();
+ rect.Scale(owner_document_->GetShuffleFactorX(), owner_document_->GetShuffleFactorY());
+ return DOMRect::FromFloatRect(rect);
}
// TODO(editing-dev): We should make
--
2.7.4

View file

@ -1,181 +0,0 @@
From: csagan5 <32685696+csagan5@users.noreply.github.com>
Date: Wed, 18 Oct 2017 21:26:53 +0200
Subject: Add menu option to toggle global Javascript preference
---
chrome/android/java/res/menu/custom_tabs_menu.xml | 13 ++++++++
chrome/android/java/res/menu/main_menu.xml | 13 ++++++++
.../chromium/chrome/browser/ChromeActivity.java | 8 +++++
.../chrome/browser/ChromeTabbedActivity.java | 8 +++++
.../browser/appmenu/AppMenuPropertiesDelegate.java | 35 ++++++++++++++++++++++
.../CustomTabAppMenuPropertiesDelegate.java | 1 +
.../java/strings/android_chrome_strings.grd | 11 +++++++
7 files changed, 89 insertions(+)
diff --git a/chrome/android/java/res/menu/custom_tabs_menu.xml b/chrome/android/java/res/menu/custom_tabs_menu.xml
--- a/chrome/android/java/res/menu/custom_tabs_menu.xml
+++ b/chrome/android/java/res/menu/custom_tabs_menu.xml
@@ -49,6 +49,19 @@
<item android:id="@+id/open_webapk_id"
android:title="@string/menu_open_webapk"
android:orderInCategory="2" />
+
+ <item android:id="@+id/enable_javascript_row_menu_id"
+ android:title="@null"
+ android:orderInCategory="2">
+ <menu>
+ <item android:id="@+id/enable_javascript_id"
+ android:title="@string/menu_enable_javascript" />
+ <item android:id="@+id/enable_javascript_check_id"
+ android:title="@null"
+ android:checkable="true" />
+ </menu>
+ </item>
+
<item android:id="@+id/request_desktop_site_row_menu_id"
android:title="@null"
android:orderInCategory="2">
diff --git a/chrome/android/java/res/menu/main_menu.xml b/chrome/android/java/res/menu/main_menu.xml
--- a/chrome/android/java/res/menu/main_menu.xml
+++ b/chrome/android/java/res/menu/main_menu.xml
@@ -59,6 +59,19 @@
android:title="@string/menu_add_to_homescreen" />
<item android:id="@+id/open_webapk_id"
android:title="@string/menu_open_webapk" />
+
+ <item android:id="@+id/enable_javascript_row_menu_id"
+ android:title="@null"
+ android:orderInCategory="2">
+ <menu>
+ <item android:id="@+id/enable_javascript_id"
+ android:title="@string/menu_enable_javascript" />
+ <item android:id="@+id/enable_javascript_check_id"
+ android:title="@null"
+ android:checkable="true" />
+ </menu>
+ </item>
+
<item android:id="@+id/request_desktop_site_row_menu_id"
android:title="@null">
<menu>
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ChromeActivity.java b/chrome/android/java/src/org/chromium/chrome/browser/ChromeActivity.java
--- a/chrome/android/java/src/org/chromium/chrome/browser/ChromeActivity.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/ChromeActivity.java
@@ -1969,6 +1969,14 @@ public abstract class ChromeActivity extends AsyncInitializationActivity
final boolean usingDesktopUserAgent = currentTab.getUseDesktopUserAgent();
currentTab.setUseDesktopUserAgent(!usingDesktopUserAgent, reloadOnChange);
RecordUserAction.record("MobileMenuRequestDesktopSite");
+ } else if (id == R.id.enable_javascript_id || id == R.id.enable_javascript_check_id) {
+ final boolean reloadOnChange = !currentTab.isNativePage();
+ final boolean jsEnabled = PrefServiceBridge.getInstance().javaScriptEnabled();
+ PrefServiceBridge.getInstance().setJavaScriptEnabled(!jsEnabled);
+ if (reloadOnChange) {
+ currentTab.reload();
+ }
+ RecordUserAction.record("MobileMenuRequestEnableJavascript");
} else if (id == R.id.reader_mode_prefs_id) {
if (currentTab.getWebContents() != null) {
RecordUserAction.record("DomDistiller_DistilledPagePrefsOpened");
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java b/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java
--- a/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java
@@ -1895,6 +1895,14 @@ public class ChromeTabbedActivity
NewTabPageUma.recordAction(NewTabPageUma.ACTION_OPENED_DOWNLOADS_MANAGER);
}
RecordUserAction.record("MobileMenuDownloadManager");
+ } else if (id == R.id.enable_javascript_id || id == R.id.enable_javascript_check_id) {
+ final boolean reloadOnChange = !currentTab.isNativePage();
+ final boolean jsEnabled = PrefServiceBridge.getInstance().javaScriptEnabled();
+ PrefServiceBridge.getInstance().setJavaScriptEnabled(!jsEnabled);
+ if (reloadOnChange) {
+ currentTab.reload();
+ }
+ RecordUserAction.record("MobileMenuRequestEnableJavascript");
} else if (id == R.id.open_recently_closed_tab) {
TabModel currentModel = mTabModelSelectorImpl.getCurrentModel();
if (!currentModel.isIncognito()) currentModel.openMostRecentlyClosedTab();
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/appmenu/AppMenuPropertiesDelegate.java b/chrome/android/java/src/org/chromium/chrome/browser/appmenu/AppMenuPropertiesDelegate.java
--- a/chrome/android/java/src/org/chromium/chrome/browser/appmenu/AppMenuPropertiesDelegate.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/appmenu/AppMenuPropertiesDelegate.java
@@ -225,6 +225,8 @@ public class AppMenuPropertiesDelegate {
updateRequestDesktopSiteMenuItem(menu, currentTab, true /* can show */);
+ updateEnableJavascriptMenuItem(menu, currentTab);
+
// Only display reader mode settings menu option if the current page is in reader mode.
menu.findItem(R.id.reader_mode_prefs_id)
.setVisible(DomDistillerUrlUtils.isDistilledPage(currentTab.getUrl()));
@@ -504,4 +506,37 @@ public class AppMenuPropertiesDelegate {
return chromeHomeMenuItemFlagEnabled && !sHideChromeHomeMenuItems;
}
+
+ /**
+ * Updates the enable JavaScript item's state.
+ *
+ * @param menu {@link Menu} for enable javascript
+ * @param currentTab Current tab being displayed.
+ */
+ protected void updateEnableJavascriptMenuItem(
+ Menu menu, Tab currentTab) {
+ MenuItem enableMenuRow = menu.findItem(R.id.enable_javascript_row_menu_id);
+ MenuItem enableMenuLabel = menu.findItem(R.id.enable_javascript_id);
+ MenuItem enableMenuCheck = menu.findItem(R.id.enable_javascript_check_id);
+
+ // Hide enable javascript on all chrome:// pages and the NTP.
+ String url = currentTab.getUrl();
+ boolean isChromeScheme = url.startsWith(UrlConstants.CHROME_URL_PREFIX)
+ || url.startsWith(UrlConstants.CHROME_NATIVE_URL_PREFIX);
+
+ boolean itemVisible = !isChromeScheme && !currentTab.isNativePage();
+ enableMenuRow.setVisible(itemVisible);
+ if (!itemVisible) return;
+
+ boolean jsEnabled = PrefServiceBridge.getInstance().javaScriptEnabled();
+
+ // Mark the checkbox if Javascript is activated on this tab.
+ enableMenuCheck.setChecked(jsEnabled);
+
+ // This title doesn't seem to be displayed by Android, but it is used to set up
+ // accessibility text in {@link AppMenuAdapter#setupMenuButton}.
+ enableMenuLabel.setTitleCondensed(jsEnabled
+ ? mActivity.getString(R.string.menu_enable_javascript_on)
+ : mActivity.getString(R.string.menu_enable_javascript_off));
+ }
}
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabAppMenuPropertiesDelegate.java b/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabAppMenuPropertiesDelegate.java
--- a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabAppMenuPropertiesDelegate.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabAppMenuPropertiesDelegate.java
@@ -164,6 +164,7 @@ public class CustomTabAppMenuPropertiesDelegate extends AppMenuPropertiesDelegat
}
updateRequestDesktopSiteMenuItem(menu, currentTab, requestDesktopSiteVisible);
+ updateEnableJavascriptMenuItem(menu, currentTab);
prepareAddToHomescreenMenuItem(menu, currentTab, addToHomeScreenVisible);
}
}
diff --git a/chrome/android/java/strings/android_chrome_strings.grd b/chrome/android/java/strings/android_chrome_strings.grd
--- a/chrome/android/java/strings/android_chrome_strings.grd
+++ b/chrome/android/java/strings/android_chrome_strings.grd
@@ -2506,6 +2506,17 @@ To obtain new licenses, connect to the internet and play your downloaded content
<message name="IDS_MENU_FIND_IN_PAGE" desc="Menu item allowing users to find text within the current page. [CHAR-LIMIT=27]">
Find in page
</message>
+
+ <message name="IDS_MENU_ENABLE_JAVASCRIPT" desc="Menu item in Chrome's overflow/options menu. If this menu item is unselected, Bromite will disable JavaScript support for the page. [CHAR-LIMIT=27]">
+ Enable JavaScript
+ </message>
+ <message name="IDS_MENU_ENABLE_JAVASCRIPT_ON" desc="Accessibility description for when Enable JavaScript is selected.">
+ Turn off JavaScript
+ </message>
+ <message name="IDS_MENU_ENABLE_JAVASCRIPT_OFF" desc="Accessibility description for when Enable JavaScript is unselected.">
+ Turn on JavaScript
+ </message>
+
<message name="IDS_MENU_REQUEST_DESKTOP_SITE" desc="Menu item in Chrome's overflow/options menu. By default, when a user navigates to a web page, Chrome shows the mobile site, that is, the version of the site designed for mobile phones. If this menu item is selected, however, Chrome will try to load the 'desktop' site instead, i.e. the site designed for desktop computers or laptop computers, which have larger screens. [CHAR-LIMIT=24]">
Desktop site
</message>
--
2.7.4