Compare commits
4
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bc3ef3746a | ||
|
|
c941fcf137 | ||
|
|
86f3e97b6b | ||
|
|
f62bd97771 |
@@ -4,16 +4,20 @@ about: Suggest a privacy-related idea for this project
|
||||
|
||||
---
|
||||
|
||||
**Is your feature request related to privacy?**
|
||||
### Is your feature request related to privacy?
|
||||
|
||||
Features that are not related to privacy are unlikely to be considered.
|
||||
|
||||
**Is there a patch available for this feature somewhere?**
|
||||
### Is there a patch available for this feature somewhere?
|
||||
|
||||
If yes then provide URL and license information.
|
||||
|
||||
**Describe the solution you would like**
|
||||
### Describe the solution you would like
|
||||
|
||||
A clear and concise description of what you want to happen.
|
||||
|
||||
Do not ask "I would like feature X which is available in browser Y"; such issues are closed immediately.
|
||||
|
||||
**Describe alternatives you have considered**
|
||||
### Describe alternatives you have considered
|
||||
|
||||
A clear and concise description of any alternative solutions or features you have considered.
|
||||
|
||||
@@ -1,3 +1,20 @@
|
||||
# 78.0.3904.130
|
||||
* support user-specified subresources filter URL (fixes https://github.com/bromite/bromite/issues/2)
|
||||
* revert removal of flag for disabling pull-to-refresh effect
|
||||
* fix crash when entering no DoH URL (fixes https://github.com/bromite/bromite/issues/430)
|
||||
* added Peter Lowe's Ad and tracking server list (fixes https://github.com/bromite/bromite/issues/423)
|
||||
* removed Startpage
|
||||
* enabled dav1d_decoder
|
||||
|
||||
# 78.0.3904.119
|
||||
* replace fixed DNS-over-HTTPS feature flag with user-customizable option
|
||||
* fix background playback issue (fixes https://github.com/bromite/bromite/issues/424)
|
||||
|
||||
# 78.0.3904.105
|
||||
* add flag to disable WebGL (fixes https://github.com/bromite/bromite/issues/411)
|
||||
* more selective AMP sanitization (fixes https://github.com/bromite/bromite/issues/410)
|
||||
* build optimizations to disable debug information
|
||||
|
||||
# 78.0.3904.93
|
||||
* introduce flags to disable browser fingerprinting capabilities (fixes https://github.com/bromite/bromite/issues/402)
|
||||
* major enhancements to AMP sanitization for news/images
|
||||
@@ -9,6 +26,8 @@
|
||||
* disable HEAD requests for single words typed and clicked in Omnibar
|
||||
* increase number of autocomplete matches from 5 to 10
|
||||
* replace DoH probe domain with RIPE domain
|
||||
* merged fixes for adblock/javascript menu text (https://github.com/bromite/bromite/pull/398)
|
||||
* updated User-agent phone model and version
|
||||
|
||||
# 78.0.3904.72
|
||||
* updated User-agent phone model and version
|
||||
|
||||
@@ -161,7 +161,7 @@ Bromite uses an unindexed filter file, which is periodically published at https:
|
||||
* [EasyList](https://easylist.to/#easylist)
|
||||
* [EasyPrivacy](https://easylist.to/#easyprivacy)
|
||||
* [uBlock Origin](https://github.com/uBlockOrigin)
|
||||
|
||||
* [Peter Lowe's Ad and tracking server list](https://pgl.yoyo.org/adservers/)
|
||||
# License
|
||||
|
||||
The patches published as part of the Bromite project are released under [GNU GPL v3](./LICENSE).
|
||||
|
||||
+5
-2
@@ -5,6 +5,7 @@ debuggable_apks=false
|
||||
disable_android_lint=true
|
||||
enable_ac3_eac3_audio_demuxing=true enable_hevc_demuxing=true enable_iterator_debugging=false
|
||||
enable_av1_decoder=true
|
||||
enable_dav1d_decoder=true
|
||||
enable_gvr_services=false
|
||||
enable_hangout_services_extension=false
|
||||
enable_mdns=false
|
||||
@@ -15,16 +16,18 @@ enable_remoting=false
|
||||
enable_reporting=false
|
||||
enable_resource_whitelist_generation=false
|
||||
enable_vr=false
|
||||
exclude_unwind_tables = true
|
||||
fieldtrial_testing_like_official_build=true
|
||||
is_cfi=true
|
||||
is_component_build=false
|
||||
is_debug=false
|
||||
is_official_build=true
|
||||
jumbo_file_merge_limit=60
|
||||
remove_webcore_debug_symbols=true
|
||||
rtc_build_examples=false
|
||||
safe_browsing_mode=0
|
||||
strip_absolute_paths_from_debug_symbols=true
|
||||
strip_debug_info=false
|
||||
strip_debug_info=true
|
||||
symbol_level=0
|
||||
symbol_level=1
|
||||
target_os="android"
|
||||
use_debug_fission=true
|
||||
|
||||
@@ -39,6 +39,7 @@ safe_browsing-disable-cookie-transmission.patch
|
||||
Disable-safe-browsing.patch
|
||||
Skip-the-first-run-and-metrics.patch
|
||||
Disable-all-promo-dialogs.patch
|
||||
Disable-sync-services-menu-entry.patch
|
||||
Remove-signin-and-data-saver-integrations.patch
|
||||
Remove-background-sync-and-translate-menu-options.patch
|
||||
Hide-passwords-manager-link.patch
|
||||
@@ -68,7 +69,6 @@ Multiple-fingerprinting-mitigations-for-canvas-text-and-client-rectangles.patch
|
||||
Add-flags-to-disable-device-motion-and-orientation-APIs.patch
|
||||
Punt-the-Widevine-version-string.patch
|
||||
Disable-metrics-on-all-I-O-threads.patch
|
||||
Add-a-flag-for-DNS-over-HTTPS.patch
|
||||
Always-respect-async-dns-flag-regardless-of-SDK-version.patch
|
||||
Add-flag-to-configure-maximum-connections-per-host.patch
|
||||
Add-site-settings-option-for-session-only-cookies.patch
|
||||
@@ -139,3 +139,7 @@ Increase-number-of-autocomplete-matches-from-5-to-10.patch
|
||||
Disable-HEAD-requests-for-single-word-Omnibar-searches.patch
|
||||
Block-all-connection-requests-with-qjz9zk-in-the-domain-name-or-with-a-trk-scheme.patch
|
||||
Disable-some-signed-exchange-features.patch
|
||||
Add-flag-to-disable-WebGL.patch
|
||||
Add-user-setting-for-DNS-over-HTTPS-DoH-custom-URL.patch
|
||||
Revert-flags-remove-disable-pull-to-refresh-effect.patch
|
||||
Add-option-to-configure-the-ad-blocker-filters-URL.patch
|
||||
|
||||
@@ -4,3 +4,4 @@ AV1-codec-support.patch
|
||||
Switch-to-fstack-protector-strong.patch
|
||||
Enable-fwrapv-in-Clang-for-non-UBSan-builds.patch
|
||||
Disable-safe-browsing.patch
|
||||
Disable-sync-services-menu-entry.patch
|
||||
|
||||
@@ -1,258 +0,0 @@
|
||||
From: csagan5 <32685696+csagan5@users.noreply.github.com>
|
||||
Date: Sat, 28 Apr 2018 08:30:26 +0200
|
||||
Subject: Add a flag for DNS-over-HTTPS
|
||||
|
||||
Allow selection between Google and Cloudflare endpoints.
|
||||
Serve DoH requests with maximum priority, remove traffic annotation.
|
||||
Reduce HTTP headers in DoH requests to bare minimum.
|
||||
Add AdGuard (default) endpoint
|
||||
Do not fallback to UDP when using DoH
|
||||
|
||||
See also: https://tools.ietf.org/id/draft-ietf-doh-dns-over-https-14.txt
|
||||
---
|
||||
chrome/browser/about_flags.cc | 10 +++++++++-
|
||||
chrome/browser/net/system_network_context_manager.cc | 18 +++++++++++-------
|
||||
chrome/common/chrome_features.cc | 9 ---------
|
||||
chrome/common/chrome_features.h | 2 --
|
||||
.../common/network_features.cc | 6 ++++++
|
||||
.../common/network_features.h | 6 ++++++
|
||||
.../common/network_switch_list.h | 4 ++++
|
||||
net/base/load_flags_list.h | 6 ++++++
|
||||
net/dns/dns_transaction.cc | 4 ++--
|
||||
net/url_request/url_request_http_job.cc | 16 +++++++++++-----
|
||||
10 files changed, 55 insertions(+), 26 deletions(-)
|
||||
|
||||
diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
|
||||
--- a/chrome/browser/about_flags.cc
|
||||
+++ b/chrome/browser/about_flags.cc
|
||||
@@ -418,6 +418,14 @@ const FeatureEntry::FeatureVariation kCCTModuleCacheVariations[] = {
|
||||
base::size(kCCTModuleCache_ThirtyMinutes), nullptr},
|
||||
};
|
||||
|
||||
+const FeatureEntry::Choice kDnsOverHttpsChoices[] = {
|
||||
+ {features::kDnsOverHttpsChoiceDefault, "", ""},
|
||||
+ {features::kDnsOverHttpsChoiceGoogle, switches::kDnsOverHttpsServer, "https://dns.google/dns-query"},
|
||||
+ {features::kDnsOverHttpsChoiceCloudflare, switches::kDnsOverHttpsServer, "https://1.1.1.1/dns-query"},
|
||||
+ {features::kDnsOverHttpsChoiceQuad9, switches::kDnsOverHttpsServer, "https://9.9.9.9/dns-query"},
|
||||
+ {features::kDnsOverHttpsChoiceAdGuard, switches::kDnsOverHttpsServer, "https://dns.adguard.com/dns-query"}
|
||||
+};
|
||||
+
|
||||
#endif // OS_ANDROID
|
||||
|
||||
const FeatureEntry::FeatureParam kForceDark_SimpleHsl[] = {
|
||||
@@ -4491,7 +4499,7 @@ const FeatureEntry kFeatureEntries[] = {
|
||||
{"dns-over-https", flag_descriptions::kDnsOverHttpsName,
|
||||
flag_descriptions::kDnsOverHttpsDescription,
|
||||
kOsMac | kOsWin | kOsCrOS | kOsAndroid,
|
||||
- FEATURE_VALUE_TYPE(features::kDnsOverHttps)},
|
||||
+ MULTI_VALUE_TYPE(kDnsOverHttpsChoices)},
|
||||
|
||||
#if defined(OS_ANDROID)
|
||||
{"tab-switcher-longpress-menu",
|
||||
diff --git a/chrome/browser/net/system_network_context_manager.cc b/chrome/browser/net/system_network_context_manager.cc
|
||||
--- a/chrome/browser/net/system_network_context_manager.cc
|
||||
+++ b/chrome/browser/net/system_network_context_manager.cc
|
||||
@@ -25,6 +25,7 @@
|
||||
#include "chrome/browser/chrome_content_browser_client.h"
|
||||
#include "chrome/browser/component_updater/crl_set_component_installer.h"
|
||||
#include "chrome/browser/net/chrome_mojo_proxy_resolver_factory.h"
|
||||
+#include "components/network_session_configurator/common/network_switches.h"
|
||||
#include "chrome/browser/net/dns_util.h"
|
||||
#include "chrome/browser/safe_browsing/safe_browsing_service.h"
|
||||
#include "chrome/browser/ssl/ssl_config_service_manager.h"
|
||||
@@ -142,6 +143,7 @@ void GetStubResolverConfig(
|
||||
base::SPLIT_WANT_NONEMPTY)) {
|
||||
if (!chrome_browser_net::IsValidDohTemplate(server_template,
|
||||
&server_method)) {
|
||||
+ LOG(ERROR) << "Invalid DoH template: " << server_template << " with method " << server_method;
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -406,14 +408,16 @@ SystemNetworkContextManager::SystemNetworkContextManager(
|
||||
base::Value(ShouldEnableAsyncDns()));
|
||||
std::string default_doh_mode = chrome_browser_net::kDnsOverHttpsModeOff;
|
||||
std::string default_doh_templates = "";
|
||||
- if (base::FeatureList::IsEnabled(features::kDnsOverHttps)) {
|
||||
- if (features::kDnsOverHttpsFallbackParam.Get()) {
|
||||
- default_doh_mode = chrome_browser_net::kDnsOverHttpsModeAutomatic;
|
||||
- } else {
|
||||
- default_doh_mode = chrome_browser_net::kDnsOverHttpsModeSecure;
|
||||
- }
|
||||
- default_doh_templates = features::kDnsOverHttpsTemplatesParam.Get();
|
||||
+
|
||||
+ std::string server =
|
||||
+ base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
|
||||
+ switches::kDnsOverHttpsServer);
|
||||
+ if (!server.empty()) {
|
||||
+ default_doh_mode = chrome_browser_net::kDnsOverHttpsModeSecure;
|
||||
+ // will use POST when URLs do not contain a 'dns' query parameter
|
||||
+ default_doh_templates = server;
|
||||
}
|
||||
+
|
||||
local_state_->SetDefaultPrefValue(prefs::kDnsOverHttpsMode,
|
||||
base::Value(default_doh_mode));
|
||||
local_state_->SetDefaultPrefValue(prefs::kDnsOverHttpsTemplates,
|
||||
diff --git a/chrome/common/chrome_features.cc b/chrome/common/chrome_features.cc
|
||||
--- a/chrome/common/chrome_features.cc
|
||||
+++ b/chrome/common/chrome_features.cc
|
||||
@@ -269,15 +269,6 @@ const base::Feature kDisallowUnsafeHttpDownloads{
|
||||
"DisallowUnsafeHttpDownloads", base::FEATURE_DISABLED_BY_DEFAULT};
|
||||
const char kDisallowUnsafeHttpDownloadsParamName[] = "MimeTypeList";
|
||||
|
||||
-// Enable DNS over HTTPS (DoH).
|
||||
-const base::Feature kDnsOverHttps{"DnsOverHttps",
|
||||
- base::FEATURE_DISABLED_BY_DEFAULT};
|
||||
-
|
||||
-// Set whether fallback to insecure DNS is allowed by default. This setting may
|
||||
-// be overridden for individual transactions.
|
||||
-const base::FeatureParam<bool> kDnsOverHttpsFallbackParam{&kDnsOverHttps,
|
||||
- "Fallback", true};
|
||||
-
|
||||
// Supply one or more space-separated DoH server URI templates to use when this
|
||||
// feature is enabled. If no templates are specified, then a hardcoded mapping
|
||||
// will be used to construct a list of DoH templates associated with the IP
|
||||
diff --git a/chrome/common/chrome_features.h b/chrome/common/chrome_features.h
|
||||
--- a/chrome/common/chrome_features.h
|
||||
+++ b/chrome/common/chrome_features.h
|
||||
@@ -166,8 +166,6 @@ extern const char kDisallowUnsafeHttpDownloadsParamName[];
|
||||
COMPONENT_EXPORT(CHROME_FEATURES)
|
||||
extern const base::Feature kDnsOverHttps;
|
||||
COMPONENT_EXPORT(CHROME_FEATURES)
|
||||
-extern const base::FeatureParam<bool> kDnsOverHttpsFallbackParam;
|
||||
-COMPONENT_EXPORT(CHROME_FEATURES)
|
||||
extern const base::FeatureParam<std::string> kDnsOverHttpsTemplatesParam;
|
||||
|
||||
#if defined(OS_ANDROID)
|
||||
diff --git a/components/network_session_configurator/common/network_features.cc b/components/network_session_configurator/common/network_features.cc
|
||||
--- a/components/network_session_configurator/common/network_features.cc
|
||||
+++ b/components/network_session_configurator/common/network_features.cc
|
||||
@@ -8,4 +8,10 @@
|
||||
|
||||
namespace features {
|
||||
|
||||
+const char kDnsOverHttpsChoiceDefault[] = "Disabled",
|
||||
+ kDnsOverHttpsChoiceGoogle[] = "Google",
|
||||
+ kDnsOverHttpsChoiceCloudflare[] = "Cloudflare",
|
||||
+ kDnsOverHttpsChoiceQuad9[] = "Quad9",
|
||||
+ kDnsOverHttpsChoiceAdGuard[] = "AdGuard";
|
||||
+
|
||||
} // namespace features
|
||||
diff --git a/components/network_session_configurator/common/network_features.h b/components/network_session_configurator/common/network_features.h
|
||||
--- a/components/network_session_configurator/common/network_features.h
|
||||
+++ b/components/network_session_configurator/common/network_features.h
|
||||
@@ -10,6 +10,12 @@
|
||||
|
||||
namespace features {
|
||||
|
||||
+// DNS over HTTPS server endpoint choices
|
||||
+ // (https://tools.ietf.org/id/draft-ietf-doh-dns-over-https-12.txt).
|
||||
+NETWORK_SESSION_CONFIGURATOR_EXPORT extern const char kDnsOverHttpsChoiceDefault[],
|
||||
+ kDnsOverHttpsChoiceGoogle[], kDnsOverHttpsChoiceCloudflare[], kDnsOverHttpsChoiceQuad9[],
|
||||
+ kDnsOverHttpsChoiceAdGuard[];
|
||||
+
|
||||
} // namespace features
|
||||
|
||||
#endif // COMPONENTS_NETWORK_SESSION_CONFIGURATOR_COMMON_NETWORK_FEATURES_H_
|
||||
diff --git a/components/network_session_configurator/common/network_switch_list.h b/components/network_session_configurator/common/network_switch_list.h
|
||||
--- a/components/network_session_configurator/common/network_switch_list.h
|
||||
+++ b/components/network_session_configurator/common/network_switch_list.h
|
||||
@@ -32,6 +32,10 @@ NETWORK_SWITCH(kOriginToForceQuicOn, "origin-to-force-quic-on")
|
||||
// the server.
|
||||
NETWORK_SWITCH(kQuicConnectionOptions, "quic-connection-options")
|
||||
|
||||
+// Specifies an IETF DNS-over-HTTPS server endpoint
|
||||
+// (https://tools.ietf.org/id/draft-ietf-doh-dns-over-https-02.txt).
|
||||
+NETWORK_SWITCH(kDnsOverHttpsServer, "dns-over-https-server")
|
||||
+
|
||||
// Specifies the maximum length for a QUIC packet.
|
||||
NETWORK_SWITCH(kQuicMaxPacketLength, "quic-max-packet-length")
|
||||
|
||||
diff --git a/net/base/load_flags_list.h b/net/base/load_flags_list.h
|
||||
--- a/net/base/load_flags_list.h
|
||||
+++ b/net/base/load_flags_list.h
|
||||
@@ -117,3 +117,9 @@ LOAD_FLAG(RESTRICTED_PREFETCH, 1 << 18)
|
||||
// is considered privileged, and therefore this flag must only be set from a
|
||||
// trusted process.
|
||||
LOAD_FLAG(CAN_USE_RESTRICTED_PREFETCH, 1 << 19)
|
||||
+
|
||||
+// This load will not send Accept-Language or User-Agent headers, and not
|
||||
+// advertise brotli encoding.
|
||||
+// Used to comply with IETF (draft) DNS-over-HTTPS:
|
||||
+// "Implementors SHOULD NOT set non-essential HTTP headers in DoH client requests."
|
||||
+LOAD_FLAG(MINIMAL_HEADERS, 1 << 20)
|
||||
diff --git a/net/dns/dns_transaction.cc b/net/dns/dns_transaction.cc
|
||||
--- a/net/dns/dns_transaction.cc
|
||||
+++ b/net/dns/dns_transaction.cc
|
||||
@@ -403,7 +403,7 @@ class DnsHTTPAttempt : public DnsAttempt, public URLRequest::Delegate {
|
||||
// perspective to prevent the client from sending AIA requests).
|
||||
request_->SetLoadFlags(request_->load_flags() | LOAD_DISABLE_CACHE |
|
||||
LOAD_BYPASS_PROXY |
|
||||
- LOAD_DISABLE_CERT_NETWORK_FETCHES);
|
||||
+ LOAD_DISABLE_CERT_NETWORK_FETCHES | LOAD_MINIMAL_HEADERS);
|
||||
request_->set_allow_credentials(false);
|
||||
}
|
||||
|
||||
@@ -997,7 +997,7 @@ class DnsTransactionImpl : public DnsTransaction,
|
||||
had_tcp_attempt_(false),
|
||||
first_server_index_(0),
|
||||
url_request_context_(url_request_context),
|
||||
- request_priority_(DEFAULT_PRIORITY) {
|
||||
+ request_priority_(MAXIMUM_PRIORITY) {
|
||||
DCHECK(session_.get());
|
||||
DCHECK(!hostname_.empty());
|
||||
DCHECK(!callback_.is_null());
|
||||
diff --git a/net/url_request/url_request_http_job.cc b/net/url_request/url_request_http_job.cc
|
||||
--- a/net/url_request/url_request_http_job.cc
|
||||
+++ b/net/url_request/url_request_http_job.cc
|
||||
@@ -339,6 +339,7 @@ void URLRequestHttpJob::Start() {
|
||||
// plugin could set a referrer although sending the referrer is inhibited.
|
||||
request_info_.extra_headers.RemoveHeader(HttpRequestHeaders::kReferer);
|
||||
|
||||
+ if (!(request_info_.load_flags & LOAD_MINIMAL_HEADERS)) {
|
||||
// Our consumer should have made sure that this is a safe referrer. See for
|
||||
// instance WebCore::FrameLoader::HideReferrer.
|
||||
if (referrer.is_valid()) {
|
||||
@@ -354,11 +355,14 @@ void URLRequestHttpJob::Start() {
|
||||
request_info_.extra_headers.SetHeader(HttpRequestHeaders::kReferer,
|
||||
referer_value);
|
||||
}
|
||||
+ }
|
||||
|
||||
+ if (!(request_info_.load_flags & LOAD_MINIMAL_HEADERS)) {
|
||||
request_info_.extra_headers.SetHeaderIfMissing(
|
||||
HttpRequestHeaders::kUserAgent,
|
||||
http_user_agent_settings_ ?
|
||||
http_user_agent_settings_->GetUserAgent() : std::string());
|
||||
+ }
|
||||
|
||||
AddExtraHeaders();
|
||||
AddCookieHeaderAndStart();
|
||||
@@ -582,10 +586,12 @@ void URLRequestHttpJob::AddExtraHeaders() {
|
||||
} else {
|
||||
// Advertise "br" encoding only if transferred data is opaque to proxy.
|
||||
bool advertise_brotli = false;
|
||||
- if (request()->context()->enable_brotli()) {
|
||||
- if (request()->url().SchemeIsCryptographic() ||
|
||||
- IsLocalhost(request()->url())) {
|
||||
- advertise_brotli = true;
|
||||
+ if (!(request_info_.load_flags & LOAD_MINIMAL_HEADERS)) {
|
||||
+ if (request()->context()->enable_brotli()) {
|
||||
+ if (request()->url().SchemeIsCryptographic() ||
|
||||
+ IsLocalhost(request()->url())) {
|
||||
+ advertise_brotli = true;
|
||||
+ }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -603,7 +609,7 @@ void URLRequestHttpJob::AddExtraHeaders() {
|
||||
}
|
||||
}
|
||||
|
||||
- if (http_user_agent_settings_) {
|
||||
+ if (!(request_info_.load_flags & LOAD_MINIMAL_HEADERS) && http_user_agent_settings_) {
|
||||
// Only add default Accept-Language if the request didn't have it
|
||||
// specified.
|
||||
std::string accept_language =
|
||||
--
|
||||
2.11.0
|
||||
|
||||
@@ -19,7 +19,7 @@ with limited CPU/memory resources and it is disabled by default.
|
||||
diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
|
||||
--- a/chrome/browser/about_flags.cc
|
||||
+++ b/chrome/browser/about_flags.cc
|
||||
@@ -677,6 +677,11 @@ const FeatureEntry::Choice kForceEffectiveConnectionTypeChoices[] = {
|
||||
@@ -669,6 +669,11 @@ const FeatureEntry::Choice kForceEffectiveConnectionTypeChoices[] = {
|
||||
net::kEffectiveConnectionType4G},
|
||||
};
|
||||
|
||||
@@ -31,7 +31,7 @@ diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
|
||||
// Ensure that all effective connection types returned by Network Quality
|
||||
// Estimator (NQE) are also exposed via flags.
|
||||
static_assert(net::EFFECTIVE_CONNECTION_TYPE_LAST + 2 ==
|
||||
@@ -2546,6 +2551,9 @@ const FeatureEntry kFeatureEntries[] = {
|
||||
@@ -2538,6 +2543,9 @@ const FeatureEntry kFeatureEntries[] = {
|
||||
flag_descriptions::kPassiveDocumentEventListenersName,
|
||||
flag_descriptions::kPassiveDocumentEventListenersDescription, kOsAll,
|
||||
FEATURE_VALUE_TYPE(features::kPassiveDocumentEventListeners)},
|
||||
@@ -71,16 +71,14 @@ diff --git a/chrome/browser/flag_descriptions.h b/chrome/browser/flag_descriptio
|
||||
diff --git a/components/network_session_configurator/common/network_features.cc b/components/network_session_configurator/common/network_features.cc
|
||||
--- a/components/network_session_configurator/common/network_features.cc
|
||||
+++ b/components/network_session_configurator/common/network_features.cc
|
||||
@@ -8,6 +8,9 @@
|
||||
@@ -8,4 +8,7 @@
|
||||
|
||||
namespace features {
|
||||
|
||||
+const char kMaxConnectionsPerHostChoiceDefault[] = "6",
|
||||
+ kMaxConnectionsPerHostChoice15[] = "15";
|
||||
+
|
||||
const char kDnsOverHttpsChoiceDefault[] = "Disabled",
|
||||
kDnsOverHttpsChoiceGoogle[] = "Google",
|
||||
kDnsOverHttpsChoiceCloudflare[] = "Cloudflare",
|
||||
} // namespace features
|
||||
diff --git a/components/network_session_configurator/common/network_features.h b/components/network_session_configurator/common/network_features.h
|
||||
--- a/components/network_session_configurator/common/network_features.h
|
||||
+++ b/components/network_session_configurator/common/network_features.h
|
||||
@@ -92,9 +90,9 @@ diff --git a/components/network_session_configurator/common/network_features.h b
|
||||
+ kMaxConnectionsPerHostChoice6[],
|
||||
+ kMaxConnectionsPerHostChoice15[];
|
||||
+
|
||||
// DNS over HTTPS server endpoint choices
|
||||
// (https://tools.ietf.org/id/draft-ietf-doh-dns-over-https-12.txt).
|
||||
NETWORK_SESSION_CONFIGURATOR_EXPORT extern const char kDnsOverHttpsChoiceDefault[],
|
||||
} // namespace features
|
||||
|
||||
#endif // COMPONENTS_NETWORK_SESSION_CONFIGURATOR_COMMON_NETWORK_FEATURES_H_
|
||||
diff --git a/components/network_session_configurator/common/network_switch_list.h b/components/network_session_configurator/common/network_switch_list.h
|
||||
--- a/components/network_session_configurator/common/network_switch_list.h
|
||||
+++ b/components/network_session_configurator/common/network_switch_list.h
|
||||
|
||||
@@ -4,11 +4,11 @@ Subject: Add flag to control video playback resume feature
|
||||
|
||||
Disable it by default on Android as it is everywhere else
|
||||
---
|
||||
chrome/browser/about_flags.cc | 8 ++++----
|
||||
chrome/browser/about_flags.cc | 4 ++++
|
||||
chrome/browser/flag_descriptions.cc | 5 +++++
|
||||
chrome/browser/flag_descriptions.h | 3 +++
|
||||
media/base/media_switches.cc | 6 +-----
|
||||
4 files changed, 13 insertions(+), 9 deletions(-)
|
||||
4 files changed, 13 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
|
||||
--- a/chrome/browser/about_flags.cc
|
||||
@@ -24,17 +24,6 @@ diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
|
||||
{"shared-array-buffer", flag_descriptions::kEnableSharedArrayBufferName,
|
||||
flag_descriptions::kEnableSharedArrayBufferDescription, kOsAll,
|
||||
FEATURE_VALUE_TYPE(features::kSharedArrayBuffer)},
|
||||
@@ -1603,10 +1607,6 @@ const FeatureEntry kFeatureEntries[] = {
|
||||
FEATURE_VALUE_TYPE(features::kAppNotificationStatusMessaging)},
|
||||
#endif // OS_ANDROID
|
||||
{"enable-devtools-experiments", flag_descriptions::kDevtoolsExperimentsName,
|
||||
- {"resume-background-video",
|
||||
- flag_descriptions::kResumeBackgroundVideoName,
|
||||
- flag_descriptions::kResumeBackgroundVideoDescription, kOsAll,
|
||||
- FEATURE_VALUE_TYPE(media::kResumeBackgroundVideo)},
|
||||
flag_descriptions::kDevtoolsExperimentsDescription, kOsDesktop,
|
||||
SINGLE_VALUE_TYPE(switches::kEnableDevToolsExperiments)},
|
||||
{"silent-debugger-extension-api",
|
||||
diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descriptions.cc
|
||||
--- a/chrome/browser/flag_descriptions.cc
|
||||
+++ b/chrome/browser/flag_descriptions.cc
|
||||
|
||||
@@ -16,7 +16,7 @@ Subject: Add flag to disable IPv6 probes
|
||||
diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
|
||||
--- a/chrome/browser/about_flags.cc
|
||||
+++ b/chrome/browser/about_flags.cc
|
||||
@@ -3206,6 +3206,11 @@ const FeatureEntry kFeatureEntries[] = {
|
||||
@@ -3198,6 +3198,11 @@ const FeatureEntry kFeatureEntries[] = {
|
||||
kMarkHttpAsFeatureVariations,
|
||||
"HTTPReallyBadFinal")},
|
||||
|
||||
|
||||
@@ -0,0 +1,53 @@
|
||||
From: csagan5 <32685696+csagan5@users.noreply.github.com>
|
||||
Date: Sat, 16 Nov 2019 11:18:09 +0100
|
||||
Subject: Add flag to disable WebGL
|
||||
|
||||
---
|
||||
chrome/browser/about_flags.cc | 3 +++
|
||||
chrome/browser/flag_descriptions.cc | 4 ++++
|
||||
chrome/browser/flag_descriptions.h | 3 +++
|
||||
3 files changed, 10 insertions(+)
|
||||
|
||||
diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
|
||||
--- a/chrome/browser/about_flags.cc
|
||||
+++ b/chrome/browser/about_flags.cc
|
||||
@@ -1364,6 +1364,9 @@ const FeatureEntry kFeatureEntries[] = {
|
||||
flag_descriptions::kAccelerated2dCanvasName,
|
||||
flag_descriptions::kAccelerated2dCanvasDescription, kOsAll,
|
||||
SINGLE_DISABLE_VALUE_TYPE(switches::kDisableAccelerated2dCanvas)},
|
||||
+ {switches::kDisableWebGL, flag_descriptions::kDisableWebGLName,
|
||||
+ flag_descriptions::kDisableWebGLDescription, kOsAll,
|
||||
+ SINGLE_DISABLE_VALUE_TYPE(switches::kDisableWebGL)},
|
||||
{"composited-layer-borders", flag_descriptions::kCompositedLayerBordersName,
|
||||
flag_descriptions::kCompositedLayerBordersDescription, kOsAll,
|
||||
SINGLE_VALUE_TYPE(cc::switches::kShowCompositedLayerBorders)},
|
||||
diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descriptions.cc
|
||||
--- a/chrome/browser/flag_descriptions.cc
|
||||
+++ b/chrome/browser/flag_descriptions.cc
|
||||
@@ -385,6 +385,10 @@ const char kDisableAudioForDesktopShareDescription[] =
|
||||
"With this flag on, desktop share picker window will not let the user "
|
||||
"choose whether to share audio.";
|
||||
|
||||
+const char kDisableWebGLName[] = "Disable all versions of WebGL";
|
||||
+
|
||||
+const char kDisableWebGLDescription[] = "Disable all versions of WebGL";
|
||||
+
|
||||
const char kDisableBestEffortTasksName[] = "Skip best effort tasks";
|
||||
const char kDisableBestEffortTasksDescription[] =
|
||||
"With this flag on, tasks of the lowest priority will not be executed "
|
||||
diff --git a/chrome/browser/flag_descriptions.h b/chrome/browser/flag_descriptions.h
|
||||
--- a/chrome/browser/flag_descriptions.h
|
||||
+++ b/chrome/browser/flag_descriptions.h
|
||||
@@ -256,6 +256,9 @@ extern const char kDevtoolsExperimentsDescription[];
|
||||
extern const char kDisableAudioForDesktopShareName[];
|
||||
extern const char kDisableAudioForDesktopShareDescription[];
|
||||
|
||||
+extern const char kDisableWebGLName[];
|
||||
+extern const char kDisableWebGLDescription[];
|
||||
+
|
||||
extern const char kDisableBestEffortTasksName[];
|
||||
extern const char kDisableBestEffortTasksDescription[];
|
||||
|
||||
--
|
||||
2.11.0
|
||||
|
||||
@@ -0,0 +1,516 @@
|
||||
From: csagan5 <32685696+csagan5@users.noreply.github.com>
|
||||
Date: Thu, 5 Dec 2019 22:41:25 +0100
|
||||
Subject: Add option to configure the ad blocker filters URL
|
||||
|
||||
---
|
||||
chrome/android/chrome_java_sources.gni | 2 +
|
||||
chrome/android/java/res/layout/adblock_editor.xml | 65 ++++++++++++++++
|
||||
chrome/android/java/res/values/values.xml | 2 +
|
||||
.../android/java/res/xml/adblock_preferences.xml | 25 ++++++
|
||||
chrome/android/java/res/xml/main_preferences.xml | 11 ++-
|
||||
.../chrome/browser/preferences/AdBlockEditor.java | 91 ++++++++++++++++++++++
|
||||
.../browser/preferences/AdBlockPreferences.java | 53 +++++++++++++
|
||||
.../chrome/browser/util/FeatureUtilities.java | 10 +++
|
||||
.../java/strings/android_chrome_strings.grd | 14 ++++
|
||||
chrome/app/generated_resources.grd | 10 +++
|
||||
chrome/browser/android/feature_utilities.cc | 8 ++
|
||||
chrome/browser/browser_process_impl.cc | 3 +-
|
||||
.../browser/net/system_network_context_manager.cc | 3 +
|
||||
chrome/common/pref_names.cc | 3 +
|
||||
chrome/common/pref_names.h | 1 +
|
||||
.../component_updater/adblock_updater_service.cc | 6 +-
|
||||
.../component_updater/adblock_updater_service.h | 3 +-
|
||||
17 files changed, 302 insertions(+), 8 deletions(-)
|
||||
create mode 100644 chrome/android/java/res/layout/adblock_editor.xml
|
||||
create mode 100644 chrome/android/java/res/xml/adblock_preferences.xml
|
||||
create mode 100644 chrome/android/java/src/org/chromium/chrome/browser/preferences/AdBlockEditor.java
|
||||
create mode 100644 chrome/android/java/src/org/chromium/chrome/browser/preferences/AdBlockPreferences.java
|
||||
|
||||
diff --git a/chrome/android/chrome_java_sources.gni b/chrome/android/chrome_java_sources.gni
|
||||
--- a/chrome/android/chrome_java_sources.gni
|
||||
+++ b/chrome/android/chrome_java_sources.gni
|
||||
@@ -1266,6 +1266,8 @@ chrome_java_sources = [
|
||||
"java/src/org/chromium/chrome/browser/preferences/PreferenceUtils.java",
|
||||
"java/src/org/chromium/chrome/browser/preferences/Preferences.java",
|
||||
"java/src/org/chromium/chrome/browser/preferences/PreferencesLauncher.java",
|
||||
+ "java/src/org/chromium/chrome/browser/preferences/AdBlockEditor.java",
|
||||
+ "java/src/org/chromium/chrome/browser/preferences/AdBlockPreferences.java",
|
||||
"java/src/org/chromium/chrome/browser/preferences/SearchEngineAdapter.java",
|
||||
"java/src/org/chromium/chrome/browser/preferences/SearchEnginePreference.java",
|
||||
"java/src/org/chromium/chrome/browser/preferences/SearchUtils.java",
|
||||
diff --git a/chrome/android/java/res/layout/adblock_editor.xml b/chrome/android/java/res/layout/adblock_editor.xml
|
||||
new file mode 100644
|
||||
--- /dev/null
|
||||
+++ b/chrome/android/java/res/layout/adblock_editor.xml
|
||||
@@ -0,0 +1,65 @@
|
||||
+<?xml version="1.0" encoding="utf-8"?>
|
||||
+<!-- Copyright 2015 The Chromium Authors. All rights reserved.
|
||||
+ Use of this source code is governed by a BSD-style license that can be
|
||||
+ found in the LICENSE file. -->
|
||||
+
|
||||
+<FrameLayout
|
||||
+ xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
+ xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
+ xmlns:tools="http://schemas.android.com/tools"
|
||||
+ android:layout_width="match_parent"
|
||||
+ android:layout_height="match_parent" >
|
||||
+
|
||||
+ <ScrollView
|
||||
+ android:layout_width="match_parent"
|
||||
+ android:layout_height="match_parent"
|
||||
+ android:id="@+id/scroll_view"
|
||||
+ android:fillViewport="true" >
|
||||
+
|
||||
+ <LinearLayout
|
||||
+ android:layout_width="match_parent"
|
||||
+ android:layout_height="wrap_content"
|
||||
+ android:orientation="vertical"
|
||||
+ android:focusableInTouchMode="true" >
|
||||
+
|
||||
+ <org.chromium.chrome.browser.widget.ChromeTextInputLayout
|
||||
+ android:id="@+id/adblock_url"
|
||||
+ style="@style/PreferenceScreenLayout"
|
||||
+ android:layout_width="match_parent"
|
||||
+ android:layout_height="wrap_content" >
|
||||
+ <!-- TODO(crbug.com/900912): Fix and remove lint ignore -->
|
||||
+ <EditText
|
||||
+ tools:ignore="Autofill"
|
||||
+ android:id="@+id/adblock_url_edit"
|
||||
+ android:layout_width="match_parent"
|
||||
+ android:layout_height="wrap_content"
|
||||
+ android:inputType="textUri"
|
||||
+ android:singleLine="true"
|
||||
+ android:hint="@string/options_adblock_edit_label" />
|
||||
+ </org.chromium.chrome.browser.widget.ChromeTextInputLayout>
|
||||
+
|
||||
+ <Space style="@style/ButtonBarTopSpacer" />
|
||||
+ <View style="@style/ButtonBarTopDivider" />
|
||||
+
|
||||
+ <LinearLayout style="@style/ButtonBar" >
|
||||
+ <org.chromium.ui.widget.ButtonCompat
|
||||
+ android:id="@+id/adblock_reset"
|
||||
+ style="@style/ButtonBarButton"
|
||||
+ android:text="@string/reset" />
|
||||
+
|
||||
+ <org.chromium.ui.widget.ButtonCompat
|
||||
+ android:id="@+id/adblock_cancel"
|
||||
+ style="@style/ButtonBarButton"
|
||||
+ android:text="@string/cancel" />
|
||||
+
|
||||
+ <org.chromium.ui.widget.ButtonCompat
|
||||
+ android:id="@+id/adblock_save"
|
||||
+ style="@style/ButtonBarButton"
|
||||
+ android:text="@string/save" />
|
||||
+ </LinearLayout>
|
||||
+ </LinearLayout>
|
||||
+ </ScrollView>
|
||||
+
|
||||
+ <include layout="@layout/preferences_action_bar_shadow"/>
|
||||
+
|
||||
+</FrameLayout>
|
||||
diff --git a/chrome/android/java/res/values/values.xml b/chrome/android/java/res/values/values.xml
|
||||
--- a/chrome/android/java/res/values/values.xml
|
||||
+++ b/chrome/android/java/res/values/values.xml
|
||||
@@ -68,6 +68,8 @@
|
||||
<!-- Our manage space activity. Default pre-KitKat to be nothing. -->
|
||||
<string name="manage_space_activity"></string>
|
||||
|
||||
+ <string name="adblock_help_url">https://www.bromite.org/custom-filters</string>
|
||||
+
|
||||
<!-- Value for scaleX to mirror drawables correctly for LTR / RTL layouts. -->
|
||||
<integer name="automirror_scale_x_reverse">-1</integer>
|
||||
|
||||
diff --git a/chrome/android/java/res/xml/adblock_preferences.xml b/chrome/android/java/res/xml/adblock_preferences.xml
|
||||
new file mode 100644
|
||||
--- /dev/null
|
||||
+++ b/chrome/android/java/res/xml/adblock_preferences.xml
|
||||
@@ -0,0 +1,25 @@
|
||||
+<?xml version="1.0" encoding="utf-8"?>
|
||||
+<!-- Copyright 2015 The Chromium Authors. All rights reserved.
|
||||
+ Use of this source code is governed by a BSD-style license that can be
|
||||
+ found in the LICENSE file. -->
|
||||
+
|
||||
+<PreferenceScreen
|
||||
+ xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
+ xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
+
|
||||
+ <org.chromium.chrome.browser.preferences.ChromeSwitchPreference
|
||||
+ android:key="adblock_switch"
|
||||
+ android:summaryOn="@string/text_on"
|
||||
+ android:summaryOff="@string/text_off" />
|
||||
+
|
||||
+ <org.chromium.chrome.browser.preferences.HyperlinkPreference
|
||||
+ android:key="adblock_help"
|
||||
+ android:title="@string/adblock_help"
|
||||
+ app:url="@string/adblock_help_url" />
|
||||
+
|
||||
+ <Preference
|
||||
+ android:key="adblock_edit"
|
||||
+ android:title="@string/options_adblock_edit_label"
|
||||
+ android:fragment="org.chromium.chrome.browser.preferences.AdBlockEditor" />
|
||||
+
|
||||
+</PreferenceScreen>
|
||||
diff --git a/chrome/android/java/res/xml/main_preferences.xml b/chrome/android/java/res/xml/main_preferences.xml
|
||||
--- a/chrome/android/java/res/xml/main_preferences.xml
|
||||
+++ b/chrome/android/java/res/xml/main_preferences.xml
|
||||
@@ -61,19 +61,24 @@
|
||||
android:order="13"
|
||||
android:title="@string/prefs_privacy"/>
|
||||
<Preference
|
||||
+ android:fragment="org.chromium.chrome.browser.preferences.AdBlockPreferences"
|
||||
+ android:key="adblock"
|
||||
+ android:order="14"
|
||||
+ android:title="@string/prefs_adblock"/>
|
||||
+ <Preference
|
||||
android:fragment="org.chromium.chrome.browser.preferences.AccessibilityPreferences"
|
||||
android:key="accessibility"
|
||||
- android:order="14"
|
||||
+ android:order="15"
|
||||
android:title="@string/prefs_accessibility"/>
|
||||
<Preference
|
||||
android:fragment="org.chromium.chrome.browser.preferences.website.SiteSettingsPreferences"
|
||||
android:key="content_settings"
|
||||
- android:order="15"
|
||||
+ android:order="16"
|
||||
android:title="@string/prefs_site_settings"/>
|
||||
<Preference
|
||||
android:fragment="org.chromium.chrome.browser.preferences.languages.LanguagesPreferences"
|
||||
android:key="languages"
|
||||
- android:order="16"
|
||||
+ android:order="17"
|
||||
android:title="@string/prefs_languages"/>
|
||||
<org.chromium.chrome.browser.preferences.ChromeBasePreference
|
||||
android:fragment="org.chromium.chrome.browser.preferences.download.DownloadPreferences"
|
||||
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/preferences/AdBlockEditor.java b/chrome/android/java/src/org/chromium/chrome/browser/preferences/AdBlockEditor.java
|
||||
new file mode 100644
|
||||
--- /dev/null
|
||||
+++ b/chrome/android/java/src/org/chromium/chrome/browser/preferences/AdBlockEditor.java
|
||||
@@ -0,0 +1,91 @@
|
||||
+// Copyright 2015 The Chromium Authors. All rights reserved.
|
||||
+// Use of this source code is governed by a BSD-style license that can be
|
||||
+// found in the LICENSE file.
|
||||
+
|
||||
+package org.chromium.chrome.browser.preferences;
|
||||
+
|
||||
+import android.os.Bundle;
|
||||
+import android.support.v4.app.Fragment;
|
||||
+import android.text.Editable;
|
||||
+import android.text.TextWatcher;
|
||||
+import android.view.LayoutInflater;
|
||||
+import android.view.View;
|
||||
+import android.view.ViewGroup;
|
||||
+import android.widget.Button;
|
||||
+import android.widget.EditText;
|
||||
+
|
||||
+import org.chromium.chrome.browser.util.FeatureUtilities;
|
||||
+import org.chromium.chrome.R;
|
||||
+import org.chromium.components.url_formatter.UrlFormatter;
|
||||
+
|
||||
+/**
|
||||
+ * Provides the Java-UI for editing the DNS-over-HTTPS (AdBlock) preference.
|
||||
+ */
|
||||
+public class AdBlockEditor extends Fragment implements TextWatcher {
|
||||
+ private EditText mAdBlockFiltersUrlEdit;
|
||||
+ private Button mSaveButton;
|
||||
+ private Button mResetButton;
|
||||
+
|
||||
+ @Override
|
||||
+ public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
||||
+ Bundle savedInstanceState) {
|
||||
+ super.onCreate(savedInstanceState);
|
||||
+ getActivity().setTitle(R.string.options_adblock_edit_title);
|
||||
+
|
||||
+ View v = inflater.inflate(R.layout.adblock_editor, container, false);
|
||||
+ View scrollView = v.findViewById(R.id.scroll_view);
|
||||
+ scrollView.getViewTreeObserver().addOnScrollChangedListener(
|
||||
+ PreferenceUtils.getShowShadowOnScrollListener(v, v.findViewById(R.id.shadow)));
|
||||
+ mAdBlockFiltersUrlEdit = (EditText) v.findViewById(R.id.adblock_url_edit);
|
||||
+ mAdBlockFiltersUrlEdit.setText(FeatureUtilities.getAdBlockFiltersURL());
|
||||
+ mAdBlockFiltersUrlEdit.addTextChangedListener(this);
|
||||
+ mAdBlockFiltersUrlEdit.requestFocus();
|
||||
+
|
||||
+ initializeSaveCancelResetButtons(v);
|
||||
+ return v;
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public void beforeTextChanged(CharSequence s, int start, int count, int after) {
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public void onTextChanged(CharSequence s, int start, int before, int count) {
|
||||
+ mSaveButton.setEnabled(s.length() != 0);
|
||||
+ mResetButton.setEnabled(true);
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public void afterTextChanged(Editable s) {
|
||||
+ }
|
||||
+
|
||||
+ private void initializeSaveCancelResetButtons(View v) {
|
||||
+ mResetButton = (Button) v.findViewById(R.id.adblock_reset);
|
||||
+ mResetButton.setOnClickListener(new View.OnClickListener() {
|
||||
+ @Override
|
||||
+ public void onClick(View v) {
|
||||
+ mAdBlockFiltersUrlEdit.setText(FeatureUtilities.getAdBlockFiltersURL());
|
||||
+ getActivity().finish();
|
||||
+ }
|
||||
+ });
|
||||
+
|
||||
+ mSaveButton = (Button) v.findViewById(R.id.adblock_save);
|
||||
+ mSaveButton.setEnabled(false);
|
||||
+ mSaveButton.setOnClickListener(new View.OnClickListener() {
|
||||
+ @Override
|
||||
+ public void onClick(View v) {
|
||||
+ FeatureUtilities.setAdBlockFiltersURL(
|
||||
+ UrlFormatter.fixupUrl(mAdBlockFiltersUrlEdit.getText().toString()));
|
||||
+ getActivity().finish();
|
||||
+ }
|
||||
+ });
|
||||
+
|
||||
+ Button button = (Button) v.findViewById(R.id.adblock_cancel);
|
||||
+ button.setOnClickListener(new View.OnClickListener() {
|
||||
+ @Override
|
||||
+ public void onClick(View v) {
|
||||
+ getActivity().finish();
|
||||
+ }
|
||||
+ });
|
||||
+ }
|
||||
+}
|
||||
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/preferences/AdBlockPreferences.java b/chrome/android/java/src/org/chromium/chrome/browser/preferences/AdBlockPreferences.java
|
||||
new file mode 100644
|
||||
--- /dev/null
|
||||
+++ b/chrome/android/java/src/org/chromium/chrome/browser/preferences/AdBlockPreferences.java
|
||||
@@ -0,0 +1,53 @@
|
||||
+// Copyright 2015 The Chromium Authors. All rights reserved.
|
||||
+// Use of this source code is governed by a BSD-style license that can be
|
||||
+// found in the LICENSE file.
|
||||
+
|
||||
+package org.chromium.chrome.browser.preferences;
|
||||
+
|
||||
+import android.os.Bundle;
|
||||
+import android.support.v7.preference.Preference;
|
||||
+import android.support.v7.preference.PreferenceFragmentCompat;
|
||||
+
|
||||
+import org.chromium.chrome.browser.ContentSettingsType;
|
||||
+import org.chromium.chrome.browser.util.FeatureUtilities;
|
||||
+import org.chromium.base.VisibleForTesting;
|
||||
+import org.chromium.chrome.R;
|
||||
+
|
||||
+/**
|
||||
+ * Fragment that allows the user to configure AdBlock related preferences.
|
||||
+ */
|
||||
+public class AdBlockPreferences extends PreferenceFragmentCompat {
|
||||
+ @VisibleForTesting
|
||||
+ public static final String PREF_ADBLOCK_SWITCH = "adblock_switch";
|
||||
+ private static final String PREF_ADBLOCK_EDIT = "adblock_edit";
|
||||
+
|
||||
+ private Preference mAdBlockEdit;
|
||||
+
|
||||
+ @Override
|
||||
+ public void onCreatePreferences(Bundle savedInstanceState, String rootKey) {
|
||||
+ getActivity().setTitle(R.string.options_adblock_title);
|
||||
+ PreferenceUtils.addPreferencesFromResource(this, R.xml.adblock_preferences);
|
||||
+
|
||||
+ ChromeSwitchPreference mAdBlockSwitch =
|
||||
+ (ChromeSwitchPreference) findPreference(PREF_ADBLOCK_SWITCH);
|
||||
+ boolean isAdBlockEnabled = !PrefServiceBridge.getInstance().isCategoryEnabled(ContentSettingsType.CONTENT_SETTINGS_TYPE_ADS);
|
||||
+ mAdBlockSwitch.setChecked(isAdBlockEnabled);
|
||||
+ mAdBlockSwitch.setOnPreferenceChangeListener((preference, newValue) -> {
|
||||
+ PrefServiceBridge.getInstance().setCategoryEnabled(ContentSettingsType.CONTENT_SETTINGS_TYPE_ADS, !(boolean) newValue);
|
||||
+ return true;
|
||||
+ });
|
||||
+
|
||||
+ mAdBlockEdit = findPreference(PREF_ADBLOCK_EDIT);
|
||||
+ updateCurrentAdBlockUrl();
|
||||
+ }
|
||||
+
|
||||
+ private void updateCurrentAdBlockUrl() {
|
||||
+ mAdBlockEdit.setSummary(FeatureUtilities.getAdBlockFiltersURL());
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public void onResume() {
|
||||
+ super.onResume();
|
||||
+ updateCurrentAdBlockUrl();
|
||||
+ }
|
||||
+}
|
||||
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/util/FeatureUtilities.java b/chrome/android/java/src/org/chromium/chrome/browser/util/FeatureUtilities.java
|
||||
--- a/chrome/android/java/src/org/chromium/chrome/browser/util/FeatureUtilities.java
|
||||
+++ b/chrome/android/java/src/org/chromium/chrome/browser/util/FeatureUtilities.java
|
||||
@@ -237,6 +237,14 @@ public class FeatureUtilities {
|
||||
cacheServiceManagerForBackgroundPrefetch();
|
||||
}
|
||||
|
||||
+ public static void setAdBlockFiltersURL(String url) {
|
||||
+ nativeSetAdBlockFiltersURL(url);
|
||||
+ }
|
||||
+
|
||||
+ public static String getAdBlockFiltersURL() {
|
||||
+ return nativeGetAdBlockFiltersURL();
|
||||
+ }
|
||||
+
|
||||
/**
|
||||
* @return True if tab model merging for Android N+ is enabled.
|
||||
*/
|
||||
@@ -924,4 +932,6 @@ public class FeatureUtilities {
|
||||
private static native String nativeGetDoHTemplates();
|
||||
private static native void nativeSetIsInMultiWindowMode(boolean isInMultiWindowMode);
|
||||
private static native boolean nativeIsNetworkServiceWarmUpEnabled();
|
||||
+ private static native void nativeSetAdBlockFiltersURL(String url);
|
||||
+ private static native String nativeGetAdBlockFiltersURL();
|
||||
}
|
||||
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
|
||||
@@ -898,6 +898,20 @@ Your Google account may have other forms of browsing history like searches and a
|
||||
Captions
|
||||
</message>
|
||||
|
||||
+ <!-- AdBlock settings -->
|
||||
+ <message name="IDS_PREFS_ADBLOCK" desc="Title of the AdBlock Settings screen. [CHAR-LIMIT=32]">
|
||||
+ AdBlock settings
|
||||
+ </message>
|
||||
+ <message name="IDS_OPTIONS_ADBLOCK_EDIT_TITLE" desc="The title of the screen that allows users to change the URL that is used to fetch the ad blocker filters.">
|
||||
+ Edit filters URL
|
||||
+ </message>
|
||||
+ <message name="IDS_OPTIONS_ADBLOCK_EDIT_LABEL" desc="The label for the edit text field that allows the user to change the URL that is used to fetch the ad blocker filters.">
|
||||
+ Filters URL
|
||||
+ </message>
|
||||
+ <message name="IDS_ADBLOCK_HELP" desc="The title of the hyperlink that allows users to visit the web page with instructions for custom ad blocker filters.">
|
||||
+ Visit help page
|
||||
+ </message>
|
||||
+
|
||||
<!-- Site settings -->
|
||||
<message name="IDS_PREFS_SITE_SETTINGS" desc="Title of the Website Settings screen. [CHAR-LIMIT=32]">
|
||||
Site settings
|
||||
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
|
||||
@@ -9505,6 +9505,16 @@ Please help our engineers fix this problem. Tell us what happened right before y
|
||||
Never show this again.
|
||||
</message>
|
||||
|
||||
+ <!-- Ad Blocking preferences -->
|
||||
+ <if expr="is_android">
|
||||
+ <message name="IDS_OPTIONS_ADBLOCK_TITLE" desc="The title of the Ad Blocking option on Android" formatter_data="android_java">
|
||||
+ Ad Blocking
|
||||
+ </message>
|
||||
+ <message name="IDS_OPTIONS_ADBLOCK_SUMMARY" desc="The title of the Ad Blocking summary on Android" formatter_data="android_java">
|
||||
+ Configure Ad Blocking and filters URL
|
||||
+ </message>
|
||||
+ </if>
|
||||
+
|
||||
<!-- Ad Blocking UI strings. -->
|
||||
<message name="IDS_ALWAYS_ALLOW_ADS" desc="Explanation associated with a toggle to allow ads after ads have been blocked on the page. To be used on pages where the ad blocking UI is governed by a persistent permissions-based whitelist.">
|
||||
Always allow ads on this site
|
||||
diff --git a/chrome/browser/android/feature_utilities.cc b/chrome/browser/android/feature_utilities.cc
|
||||
--- a/chrome/browser/android/feature_utilities.cc
|
||||
+++ b/chrome/browser/android/feature_utilities.cc
|
||||
@@ -58,6 +58,14 @@ std::string GetReachedCodeProfilerTrialGroup() {
|
||||
} // namespace android
|
||||
} // namespace chrome
|
||||
|
||||
+static ScopedJavaLocalRef<jstring> JNI_FeatureUtilities_GetAdBlockFiltersURL(JNIEnv* env) {
|
||||
+ return base::android::ConvertUTF8ToJavaString(env, g_browser_process->local_state()->GetString(prefs::kAdBlockFiltersURL));
|
||||
+}
|
||||
+
|
||||
+static void JNI_FeatureUtilities_SetAdBlockFiltersURL(JNIEnv* env, const JavaParamRef<jstring>& url) {
|
||||
+ g_browser_process->local_state()->SetString(prefs::kAdBlockFiltersURL, base::android::ConvertJavaStringToUTF8(env, url));
|
||||
+}
|
||||
+
|
||||
static void JNI_FeatureUtilities_SetCustomTabVisible(
|
||||
JNIEnv* env,
|
||||
jboolean visible) {
|
||||
diff --git a/chrome/browser/browser_process_impl.cc b/chrome/browser/browser_process_impl.cc
|
||||
--- a/chrome/browser/browser_process_impl.cc
|
||||
+++ b/chrome/browser/browser_process_impl.cc
|
||||
@@ -1032,7 +1032,8 @@ BrowserProcessImpl::adblock_updater() {
|
||||
adblock_updater_ = std::make_unique<adblock_updater::AdBlockUpdaterService>(
|
||||
g_browser_process->system_network_context_manager()->GetSharedURLLoaderFactory(),
|
||||
std::move(scheduler),
|
||||
- g_browser_process->subresource_filter_ruleset_service());
|
||||
+ g_browser_process->subresource_filter_ruleset_service(),
|
||||
+ local_state()->GetString(prefs::kAdBlockFiltersURL));
|
||||
|
||||
return adblock_updater_.get();
|
||||
}
|
||||
diff --git a/chrome/browser/net/system_network_context_manager.cc b/chrome/browser/net/system_network_context_manager.cc
|
||||
--- a/chrome/browser/net/system_network_context_manager.cc
|
||||
+++ b/chrome/browser/net/system_network_context_manager.cc
|
||||
@@ -391,6 +391,8 @@ SystemNetworkContextManager::SystemNetworkContextManager(
|
||||
ssl_config_service_manager_(
|
||||
SSLConfigServiceManager::CreateDefaultManager(local_state_)),
|
||||
proxy_config_monitor_(local_state_) {
|
||||
+ local_state_->SetDefaultPrefValue(prefs::kAdBlockFiltersURL,
|
||||
+ base::Value("https://www.bromite.org/filters/filters.dat"));
|
||||
#if !defined(OS_ANDROID)
|
||||
// QuicAllowed was not part of Android policy.
|
||||
const base::Value* value =
|
||||
@@ -462,6 +464,7 @@ SystemNetworkContextManager::~SystemNetworkContextManager() {
|
||||
}
|
||||
|
||||
void SystemNetworkContextManager::RegisterPrefs(PrefRegistrySimple* registry) {
|
||||
+ registry->RegisterStringPref(prefs::kAdBlockFiltersURL, std::string());
|
||||
// Register the DnsClient and DoH preferences. The feature list has not been
|
||||
// initialized yet, so setting the preference defaults here to reflect the
|
||||
// corresponding features will only cause the preference defaults to reflect
|
||||
diff --git a/chrome/common/pref_names.cc b/chrome/common/pref_names.cc
|
||||
--- a/chrome/common/pref_names.cc
|
||||
+++ b/chrome/common/pref_names.cc
|
||||
@@ -1871,6 +1871,9 @@ const char kAudioCaptureAllowed[] = "hardware.audio_capture_enabled";
|
||||
// capture devices without prompt.
|
||||
const char kAudioCaptureAllowedUrls[] = "hardware.audio_capture_allowed_urls";
|
||||
|
||||
+// Holds the URL to an indexed subresource filters file.
|
||||
+const char kAdBlockFiltersURL[] = "adblock.filters_url";
|
||||
+
|
||||
// A pref holding the value of the policy used to explicitly allow or deny
|
||||
// access to video capture devices. When enabled or not set, the user is
|
||||
// prompted for device access. When disabled, access to video capture devices
|
||||
diff --git a/chrome/common/pref_names.h b/chrome/common/pref_names.h
|
||||
--- a/chrome/common/pref_names.h
|
||||
+++ b/chrome/common/pref_names.h
|
||||
@@ -30,6 +30,7 @@ extern const char kDownloadRestrictions[];
|
||||
extern const char kForceEphemeralProfiles[];
|
||||
extern const char kHomePageIsNewTabPage[];
|
||||
extern const char kHomePage[];
|
||||
+extern const char kAdBlockFiltersURL[];
|
||||
extern const char kImportantSitesDialogHistory[];
|
||||
#if defined(OS_WIN)
|
||||
extern const char kLastProfileResetTimestamp[];
|
||||
diff --git a/components/component_updater/adblock_updater_service.cc b/components/component_updater/adblock_updater_service.cc
|
||||
--- a/components/component_updater/adblock_updater_service.cc
|
||||
+++ b/components/component_updater/adblock_updater_service.cc
|
||||
@@ -46,12 +46,12 @@ const int initial_check_delay = 5,
|
||||
next_check_delay = 60*60*24*7, // 1 week
|
||||
on_demand_check_delay = 60; // minimum 1 minute between each on-demand check
|
||||
|
||||
-AdBlockUpdaterService::AdBlockUpdaterService(scoped_refptr<network::SharedURLLoaderFactory> shared_url_network_factory, std::unique_ptr<component_updater::UpdateScheduler> scheduler, subresource_filter::RulesetService* ruleset_service)
|
||||
+AdBlockUpdaterService::AdBlockUpdaterService(scoped_refptr<network::SharedURLLoaderFactory> shared_url_network_factory, std::unique_ptr<component_updater::UpdateScheduler> scheduler,
|
||||
+ subresource_filter::RulesetService* ruleset_service, std::string filters_url)
|
||||
: ruleset_service_(ruleset_service), shared_url_network_factory_(shared_url_network_factory), scheduler_(std::move(scheduler)) {
|
||||
DCHECK(ruleset_service);
|
||||
|
||||
- //TODO: retrieve filters URL from config/prefs
|
||||
- filters_url_ = "https://www.bromite.org/filters/filters.dat";
|
||||
+ filters_url_ = filters_url;
|
||||
}
|
||||
|
||||
AdBlockUpdaterService::~AdBlockUpdaterService() {
|
||||
diff --git a/components/component_updater/adblock_updater_service.h b/components/component_updater/adblock_updater_service.h
|
||||
--- a/components/component_updater/adblock_updater_service.h
|
||||
+++ b/components/component_updater/adblock_updater_service.h
|
||||
@@ -54,7 +54,8 @@ class Observer {
|
||||
// All methods are safe to call ONLY from the browser's main thread.
|
||||
class AdBlockUpdaterService {
|
||||
public:
|
||||
- AdBlockUpdaterService(scoped_refptr<network::SharedURLLoaderFactory> shared_url_network_factory, std::unique_ptr<component_updater::UpdateScheduler> scheduler, subresource_filter::RulesetService* ruleset_service);
|
||||
+ AdBlockUpdaterService(scoped_refptr<network::SharedURLLoaderFactory> shared_url_network_factory, std::unique_ptr<component_updater::UpdateScheduler> scheduler,
|
||||
+ subresource_filter::RulesetService* ruleset_service, std::string filters_url);
|
||||
~AdBlockUpdaterService();
|
||||
|
||||
// Adds an observer for this class. An observer should not be added more
|
||||
--
|
||||
2.11.0
|
||||
|
||||
@@ -0,0 +1,519 @@
|
||||
From: csagan5 <32685696+csagan5@users.noreply.github.com>
|
||||
Date: Sat, 23 Nov 2019 10:55:16 +0100
|
||||
Subject: Add user setting for DNS-over-HTTPS (DoH) custom URL
|
||||
|
||||
---
|
||||
chrome/android/chrome_java_sources.gni | 2 +
|
||||
chrome/android/java/res/layout/doh_editor.xml | 65 ++++++++++++++++
|
||||
chrome/android/java/res/values/values.xml | 2 +
|
||||
chrome/android/java/res/xml/doh_preferences.xml | 25 ++++++
|
||||
.../android/java/res/xml/privacy_preferences.xml | 5 ++
|
||||
.../chrome/browser/preferences/DoHEditor.java | 91 ++++++++++++++++++++++
|
||||
.../chrome/browser/preferences/DoHPreferences.java | 52 +++++++++++++
|
||||
.../chrome/browser/util/FeatureUtilities.java | 25 ++++++
|
||||
.../java/strings/android_chrome_strings.grd | 11 +++
|
||||
chrome/app/generated_resources.grd | 6 ++
|
||||
chrome/browser/android/feature_utilities.cc | 23 ++++++
|
||||
.../browser/net/system_network_context_manager.cc | 46 +++--------
|
||||
chrome/common/chrome_features.cc | 4 +-
|
||||
13 files changed, 320 insertions(+), 37 deletions(-)
|
||||
create mode 100644 chrome/android/java/res/layout/doh_editor.xml
|
||||
create mode 100644 chrome/android/java/res/xml/doh_preferences.xml
|
||||
create mode 100644 chrome/android/java/src/org/chromium/chrome/browser/preferences/DoHEditor.java
|
||||
create mode 100644 chrome/android/java/src/org/chromium/chrome/browser/preferences/DoHPreferences.java
|
||||
|
||||
diff --git a/chrome/android/chrome_java_sources.gni b/chrome/android/chrome_java_sources.gni
|
||||
--- a/chrome/android/chrome_java_sources.gni
|
||||
+++ b/chrome/android/chrome_java_sources.gni
|
||||
@@ -1251,7 +1251,9 @@ chrome_java_sources = [
|
||||
"java/src/org/chromium/chrome/browser/preferences/ClearBrowsingDataCheckBoxPreference.java",
|
||||
"java/src/org/chromium/chrome/browser/preferences/ExpandablePreferenceGroup.java",
|
||||
"java/src/org/chromium/chrome/browser/preferences/HomepageEditor.java",
|
||||
+ "java/src/org/chromium/chrome/browser/preferences/DoHEditor.java",
|
||||
"java/src/org/chromium/chrome/browser/preferences/HomepagePreferences.java",
|
||||
+ "java/src/org/chromium/chrome/browser/preferences/DoHPreferences.java",
|
||||
"java/src/org/chromium/chrome/browser/preferences/HyperlinkPreference.java",
|
||||
"java/src/org/chromium/chrome/browser/preferences/LearnMorePreference.java",
|
||||
"java/src/org/chromium/chrome/browser/preferences/LegalInformationPreferences.java",
|
||||
diff --git a/chrome/android/java/res/layout/doh_editor.xml b/chrome/android/java/res/layout/doh_editor.xml
|
||||
new file mode 100644
|
||||
--- /dev/null
|
||||
+++ b/chrome/android/java/res/layout/doh_editor.xml
|
||||
@@ -0,0 +1,65 @@
|
||||
+<?xml version="1.0" encoding="utf-8"?>
|
||||
+<!-- Copyright 2015 The Chromium Authors. All rights reserved.
|
||||
+ Use of this source code is governed by a BSD-style license that can be
|
||||
+ found in the LICENSE file. -->
|
||||
+
|
||||
+<FrameLayout
|
||||
+ xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
+ xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
+ xmlns:tools="http://schemas.android.com/tools"
|
||||
+ android:layout_width="match_parent"
|
||||
+ android:layout_height="match_parent" >
|
||||
+
|
||||
+ <ScrollView
|
||||
+ android:layout_width="match_parent"
|
||||
+ android:layout_height="match_parent"
|
||||
+ android:id="@+id/scroll_view"
|
||||
+ android:fillViewport="true" >
|
||||
+
|
||||
+ <LinearLayout
|
||||
+ android:layout_width="match_parent"
|
||||
+ android:layout_height="wrap_content"
|
||||
+ android:orientation="vertical"
|
||||
+ android:focusableInTouchMode="true" >
|
||||
+
|
||||
+ <org.chromium.chrome.browser.widget.ChromeTextInputLayout
|
||||
+ android:id="@+id/doh_url"
|
||||
+ style="@style/PreferenceScreenLayout"
|
||||
+ android:layout_width="match_parent"
|
||||
+ android:layout_height="wrap_content" >
|
||||
+ <!-- TODO(crbug.com/900912): Fix and remove lint ignore -->
|
||||
+ <EditText
|
||||
+ tools:ignore="Autofill"
|
||||
+ android:id="@+id/doh_url_edit"
|
||||
+ android:layout_width="match_parent"
|
||||
+ android:layout_height="wrap_content"
|
||||
+ android:inputType="textUri"
|
||||
+ android:singleLine="true"
|
||||
+ android:hint="@string/options_doh_edit_label" />
|
||||
+ </org.chromium.chrome.browser.widget.ChromeTextInputLayout>
|
||||
+
|
||||
+ <Space style="@style/ButtonBarTopSpacer" />
|
||||
+ <View style="@style/ButtonBarTopDivider" />
|
||||
+
|
||||
+ <LinearLayout style="@style/ButtonBar" >
|
||||
+ <org.chromium.ui.widget.ButtonCompat
|
||||
+ android:id="@+id/doh_reset"
|
||||
+ style="@style/ButtonBarButton"
|
||||
+ android:text="@string/reset" />
|
||||
+
|
||||
+ <org.chromium.ui.widget.ButtonCompat
|
||||
+ android:id="@+id/doh_cancel"
|
||||
+ style="@style/ButtonBarButton"
|
||||
+ android:text="@string/cancel" />
|
||||
+
|
||||
+ <org.chromium.ui.widget.ButtonCompat
|
||||
+ android:id="@+id/doh_save"
|
||||
+ style="@style/ButtonBarButton"
|
||||
+ android:text="@string/save" />
|
||||
+ </LinearLayout>
|
||||
+ </LinearLayout>
|
||||
+ </ScrollView>
|
||||
+
|
||||
+ <include layout="@layout/preferences_action_bar_shadow"/>
|
||||
+
|
||||
+</FrameLayout>
|
||||
diff --git a/chrome/android/java/res/values/values.xml b/chrome/android/java/res/values/values.xml
|
||||
--- a/chrome/android/java/res/values/values.xml
|
||||
+++ b/chrome/android/java/res/values/values.xml
|
||||
@@ -88,6 +88,8 @@
|
||||
<integer name="download_infobar_bar_fill_in_delay">400</integer>
|
||||
<integer name="download_infobar_bar_fill_out_delay">200</integer>
|
||||
|
||||
+ <string name="doh_help_url">https://www.bromite.org/doh</string>
|
||||
+
|
||||
<!-- Bottom navigation bar styling. -->
|
||||
<bool name="window_light_navigation_bar">true</bool>
|
||||
|
||||
diff --git a/chrome/android/java/res/xml/doh_preferences.xml b/chrome/android/java/res/xml/doh_preferences.xml
|
||||
new file mode 100644
|
||||
--- /dev/null
|
||||
+++ b/chrome/android/java/res/xml/doh_preferences.xml
|
||||
@@ -0,0 +1,25 @@
|
||||
+<?xml version="1.0" encoding="utf-8"?>
|
||||
+<!-- Copyright 2015 The Chromium Authors. All rights reserved.
|
||||
+ Use of this source code is governed by a BSD-style license that can be
|
||||
+ found in the LICENSE file. -->
|
||||
+
|
||||
+<PreferenceScreen
|
||||
+ xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
+ xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
+
|
||||
+ <org.chromium.chrome.browser.preferences.ChromeSwitchPreference
|
||||
+ android:key="doh_switch"
|
||||
+ android:summaryOn="@string/text_on"
|
||||
+ android:summaryOff="@string/text_off" />
|
||||
+
|
||||
+ <org.chromium.chrome.browser.preferences.HyperlinkPreference
|
||||
+ android:key="doh_help"
|
||||
+ android:title="@string/doh_help"
|
||||
+ app:url="@string/doh_help_url" />
|
||||
+
|
||||
+ <Preference
|
||||
+ android:key="doh_edit"
|
||||
+ android:title="@string/options_doh_edit_label"
|
||||
+ android:fragment="org.chromium.chrome.browser.preferences.DoHEditor" />
|
||||
+
|
||||
+</PreferenceScreen>
|
||||
diff --git a/chrome/android/java/res/xml/privacy_preferences.xml b/chrome/android/java/res/xml/privacy_preferences.xml
|
||||
--- a/chrome/android/java/res/xml/privacy_preferences.xml
|
||||
+++ b/chrome/android/java/res/xml/privacy_preferences.xml
|
||||
@@ -19,6 +19,11 @@
|
||||
android:key="can_make_payment"
|
||||
android:title="@string/can_make_payment_title"
|
||||
android:summary="@string/settings_can_make_payment_toggle_label" />
|
||||
+ <Preference
|
||||
+ android:fragment="org.chromium.chrome.browser.preferences.DoHPreferences"
|
||||
+ android:key="doh"
|
||||
+ android:title="@string/options_doh_title"
|
||||
+ android:summary="@string/options_doh_summary" />
|
||||
<org.chromium.chrome.browser.preferences.ChromeBaseCheckBoxPreference
|
||||
android:key="preload_pages"
|
||||
android:title="@string/preload_pages_title"
|
||||
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/preferences/DoHEditor.java b/chrome/android/java/src/org/chromium/chrome/browser/preferences/DoHEditor.java
|
||||
new file mode 100644
|
||||
--- /dev/null
|
||||
+++ b/chrome/android/java/src/org/chromium/chrome/browser/preferences/DoHEditor.java
|
||||
@@ -0,0 +1,91 @@
|
||||
+// Copyright 2015 The Chromium Authors. All rights reserved.
|
||||
+// Use of this source code is governed by a BSD-style license that can be
|
||||
+// found in the LICENSE file.
|
||||
+
|
||||
+package org.chromium.chrome.browser.preferences;
|
||||
+
|
||||
+import android.os.Bundle;
|
||||
+import android.support.v4.app.Fragment;
|
||||
+import android.text.Editable;
|
||||
+import android.text.TextWatcher;
|
||||
+import android.view.LayoutInflater;
|
||||
+import android.view.View;
|
||||
+import android.view.ViewGroup;
|
||||
+import android.widget.Button;
|
||||
+import android.widget.EditText;
|
||||
+
|
||||
+import org.chromium.chrome.browser.util.FeatureUtilities;
|
||||
+import org.chromium.chrome.R;
|
||||
+import org.chromium.components.url_formatter.UrlFormatter;
|
||||
+
|
||||
+/**
|
||||
+ * Provides the Java-UI for editing the DNS-over-HTTPS (DoH) preference.
|
||||
+ */
|
||||
+public class DoHEditor extends Fragment implements TextWatcher {
|
||||
+ private EditText mDoHUrlEdit;
|
||||
+ private Button mSaveButton;
|
||||
+ private Button mResetButton;
|
||||
+
|
||||
+ @Override
|
||||
+ public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
||||
+ Bundle savedInstanceState) {
|
||||
+ super.onCreate(savedInstanceState);
|
||||
+ getActivity().setTitle(R.string.options_doh_edit_title);
|
||||
+
|
||||
+ View v = inflater.inflate(R.layout.doh_editor, container, false);
|
||||
+ View scrollView = v.findViewById(R.id.scroll_view);
|
||||
+ scrollView.getViewTreeObserver().addOnScrollChangedListener(
|
||||
+ PreferenceUtils.getShowShadowOnScrollListener(v, v.findViewById(R.id.shadow)));
|
||||
+ mDoHUrlEdit = (EditText) v.findViewById(R.id.doh_url_edit);
|
||||
+ mDoHUrlEdit.setText(FeatureUtilities.getDoHTemplates());
|
||||
+ mDoHUrlEdit.addTextChangedListener(this);
|
||||
+ mDoHUrlEdit.requestFocus();
|
||||
+
|
||||
+ initializeSaveCancelResetButtons(v);
|
||||
+ return v;
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public void beforeTextChanged(CharSequence s, int start, int count, int after) {
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public void onTextChanged(CharSequence s, int start, int before, int count) {
|
||||
+ mSaveButton.setEnabled(s.length() != 0);
|
||||
+ mResetButton.setEnabled(true);
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public void afterTextChanged(Editable s) {
|
||||
+ }
|
||||
+
|
||||
+ private void initializeSaveCancelResetButtons(View v) {
|
||||
+ mResetButton = (Button) v.findViewById(R.id.doh_reset);
|
||||
+ mResetButton.setOnClickListener(new View.OnClickListener() {
|
||||
+ @Override
|
||||
+ public void onClick(View v) {
|
||||
+ mDoHUrlEdit.setText(FeatureUtilities.getDoHTemplates());
|
||||
+ getActivity().finish();
|
||||
+ }
|
||||
+ });
|
||||
+
|
||||
+ mSaveButton = (Button) v.findViewById(R.id.doh_save);
|
||||
+ mSaveButton.setEnabled(false);
|
||||
+ mSaveButton.setOnClickListener(new View.OnClickListener() {
|
||||
+ @Override
|
||||
+ public void onClick(View v) {
|
||||
+ FeatureUtilities.setDoHTemplates(
|
||||
+ mDoHUrlEdit.getText().toString());
|
||||
+ getActivity().finish();
|
||||
+ }
|
||||
+ });
|
||||
+
|
||||
+ Button button = (Button) v.findViewById(R.id.doh_cancel);
|
||||
+ button.setOnClickListener(new View.OnClickListener() {
|
||||
+ @Override
|
||||
+ public void onClick(View v) {
|
||||
+ getActivity().finish();
|
||||
+ }
|
||||
+ });
|
||||
+ }
|
||||
+}
|
||||
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/preferences/DoHPreferences.java b/chrome/android/java/src/org/chromium/chrome/browser/preferences/DoHPreferences.java
|
||||
new file mode 100644
|
||||
--- /dev/null
|
||||
+++ b/chrome/android/java/src/org/chromium/chrome/browser/preferences/DoHPreferences.java
|
||||
@@ -0,0 +1,52 @@
|
||||
+// Copyright 2015 The Chromium Authors. All rights reserved.
|
||||
+// Use of this source code is governed by a BSD-style license that can be
|
||||
+// found in the LICENSE file.
|
||||
+
|
||||
+package org.chromium.chrome.browser.preferences;
|
||||
+
|
||||
+import android.os.Bundle;
|
||||
+import android.support.v7.preference.Preference;
|
||||
+import android.support.v7.preference.PreferenceFragmentCompat;
|
||||
+
|
||||
+import org.chromium.chrome.browser.util.FeatureUtilities;
|
||||
+import org.chromium.base.VisibleForTesting;
|
||||
+import org.chromium.chrome.R;
|
||||
+
|
||||
+/**
|
||||
+ * Fragment that allows the user to configure DoH related preferences.
|
||||
+ */
|
||||
+public class DoHPreferences extends PreferenceFragmentCompat {
|
||||
+ @VisibleForTesting
|
||||
+ public static final String PREF_DOH_SWITCH = "doh_switch";
|
||||
+ private static final String PREF_DOH_EDIT = "doh_edit";
|
||||
+
|
||||
+ private Preference mDoHEdit;
|
||||
+
|
||||
+ @Override
|
||||
+ public void onCreatePreferences(Bundle savedInstanceState, String rootKey) {
|
||||
+ getActivity().setTitle(R.string.options_doh_title);
|
||||
+ PreferenceUtils.addPreferencesFromResource(this, R.xml.doh_preferences);
|
||||
+
|
||||
+ ChromeSwitchPreference mDoHSwitch =
|
||||
+ (ChromeSwitchPreference) findPreference(PREF_DOH_SWITCH);
|
||||
+ boolean isDoHEnabled = FeatureUtilities.getDoHEnabled();
|
||||
+ mDoHSwitch.setChecked(isDoHEnabled);
|
||||
+ mDoHSwitch.setOnPreferenceChangeListener((preference, newValue) -> {
|
||||
+ FeatureUtilities.setDoHEnabled((boolean) newValue);
|
||||
+ return true;
|
||||
+ });
|
||||
+
|
||||
+ mDoHEdit = findPreference(PREF_DOH_EDIT);
|
||||
+ updateCurrentDoHUrl();
|
||||
+ }
|
||||
+
|
||||
+ private void updateCurrentDoHUrl() {
|
||||
+ mDoHEdit.setSummary(FeatureUtilities.getDoHTemplates());
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public void onResume() {
|
||||
+ super.onResume();
|
||||
+ updateCurrentDoHUrl();
|
||||
+ }
|
||||
+}
|
||||
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/util/FeatureUtilities.java b/chrome/android/java/src/org/chromium/chrome/browser/util/FeatureUtilities.java
|
||||
--- a/chrome/android/java/src/org/chromium/chrome/browser/util/FeatureUtilities.java
|
||||
+++ b/chrome/android/java/src/org/chromium/chrome/browser/util/FeatureUtilities.java
|
||||
@@ -163,6 +163,27 @@ public class FeatureUtilities {
|
||||
nativeSetCustomTabVisible(visible);
|
||||
}
|
||||
|
||||
+ /**
|
||||
+ * Records whether custom URL for DoH is enabled with native-side feature utilities.
|
||||
+ * @param url Whether custom URL is enabled or not.
|
||||
+ */
|
||||
+ public static void setDoHEnabled(boolean enabled) {
|
||||
+ nativeSetDoHEnabled(enabled);
|
||||
+ }
|
||||
+
|
||||
+ public static boolean getDoHEnabled() {
|
||||
+ return nativeGetDoHEnabled();
|
||||
+ }
|
||||
+
|
||||
+ public static void setDoHTemplates(String t) {
|
||||
+ nativeSetDoHTemplates(t);
|
||||
+ }
|
||||
+
|
||||
+ public static String getDoHTemplates() {
|
||||
+ return nativeGetDoHTemplates();
|
||||
+ }
|
||||
+
|
||||
+
|
||||
/**
|
||||
* Records whether the activity is in multi-window mode with native-side feature utilities.
|
||||
* @param isInMultiWindowMode Whether the activity is in Android N multi-window mode.
|
||||
@@ -897,6 +918,10 @@ public class FeatureUtilities {
|
||||
}
|
||||
|
||||
private static native void nativeSetCustomTabVisible(boolean visible);
|
||||
+ private static native void nativeSetDoHEnabled(boolean enabled);
|
||||
+ private static native boolean nativeGetDoHEnabled();
|
||||
+ private static native void nativeSetDoHTemplates(String templates);
|
||||
+ private static native String nativeGetDoHTemplates();
|
||||
private static native void nativeSetIsInMultiWindowMode(boolean isInMultiWindowMode);
|
||||
private static native boolean nativeIsNetworkServiceWarmUpEnabled();
|
||||
}
|
||||
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
|
||||
@@ -656,6 +656,17 @@ CHAR-LIMIT guidelines:
|
||||
Chrome Passwords
|
||||
</message>
|
||||
|
||||
+ <!-- DoH preferences -->
|
||||
+ <message name="IDS_OPTIONS_DOH_EDIT_TITLE" desc="The title of the screen that allows users to change the URL that is used for DNS-over-HTTPS queries.">
|
||||
+ Edit DoH template URLs
|
||||
+ </message>
|
||||
+ <message name="IDS_OPTIONS_DOH_EDIT_LABEL" desc="The label for the edit text field that allows the user to change the URL that is used for DNS-over-HTTPS queries.">
|
||||
+ DoH template URLs
|
||||
+ </message>
|
||||
+ <message name="IDS_DOH_HELP" desc="The title of the hyperlink that allows users to visit the wiki page with instructions for DNS-over-HTTPS configuration.">
|
||||
+ Visit help page
|
||||
+ </message>
|
||||
+
|
||||
<!-- Homepage preferences -->
|
||||
<message name="IDS_OPTIONS_HOMEPAGE_EDIT_TITLE" desc="The title of the screen that allows users to change the URL that opens when they tap on the home page button in the omnibox.">
|
||||
Edit home page
|
||||
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
|
||||
@@ -6507,6 +6507,12 @@ the Bookmarks menu.">
|
||||
<message name="IDS_OPTIONS_HOMEPAGE_TITLE" desc="The title of the home page overlay on Android" formatter_data="android_java">
|
||||
Home page
|
||||
</message>
|
||||
+ <message name="IDS_OPTIONS_DOH_TITLE" desc="The title of the DNS-over-HTTPS option on Android" formatter_data="android_java">
|
||||
+ Secure DNS
|
||||
+ </message>
|
||||
+ <message name="IDS_OPTIONS_DOH_SUMMARY" desc="The title of the DNS-over-HTTPS summary on Android" formatter_data="android_java">
|
||||
+ Configure DNS-over-HTTPS (DoH) secure DNS
|
||||
+ </message>
|
||||
</if>
|
||||
|
||||
<!-- Autofill dialog: field labels. -->
|
||||
diff --git a/chrome/browser/android/feature_utilities.cc b/chrome/browser/android/feature_utilities.cc
|
||||
--- a/chrome/browser/android/feature_utilities.cc
|
||||
+++ b/chrome/browser/android/feature_utilities.cc
|
||||
@@ -7,6 +7,9 @@
|
||||
#include "chrome/android/chrome_jni_headers/FeatureUtilities_jni.h"
|
||||
|
||||
#include "base/android/jni_string.h"
|
||||
+#include "chrome/browser/browser_process.h"
|
||||
+#include "components/prefs/pref_service.h"
|
||||
+#include "chrome/common/pref_names.h"
|
||||
#include "chrome/browser/ntp_snippets/content_suggestions_service_factory.h"
|
||||
#include "chrome/browser/profiles/profile_manager.h"
|
||||
#include "components/ntp_snippets/content_suggestions_service.h"
|
||||
@@ -73,3 +76,23 @@ static jboolean JNI_FeatureUtilities_IsNetworkServiceWarmUpEnabled(
|
||||
return content::IsOutOfProcessNetworkService() &&
|
||||
base::FeatureList::IsEnabled(features::kWarmUpNetworkProcess);
|
||||
}
|
||||
+
|
||||
+static jboolean JNI_FeatureUtilities_GetDoHEnabled(JNIEnv* env) {
|
||||
+ std::string doh_mode = g_browser_process->local_state()->GetString(prefs::kDnsOverHttpsMode);
|
||||
+ return ((doh_mode == "secure") || (doh_mode == "auto"));
|
||||
+}
|
||||
+
|
||||
+static void JNI_FeatureUtilities_SetDoHEnabled(JNIEnv* env, jboolean enabled) {
|
||||
+ if (enabled)
|
||||
+ g_browser_process->local_state()->SetString(prefs::kDnsOverHttpsMode, "secure");
|
||||
+ else
|
||||
+ g_browser_process->local_state()->SetString(prefs::kDnsOverHttpsMode, "off");
|
||||
+}
|
||||
+
|
||||
+static ScopedJavaLocalRef<jstring> JNI_FeatureUtilities_GetDoHTemplates(JNIEnv* env) {
|
||||
+ return base::android::ConvertUTF8ToJavaString(env, g_browser_process->local_state()->GetString(prefs::kDnsOverHttpsTemplates));
|
||||
+}
|
||||
+
|
||||
+static void JNI_FeatureUtilities_SetDoHTemplates(JNIEnv* env, const JavaParamRef<jstring>& templates) {
|
||||
+ g_browser_process->local_state()->SetString(prefs::kDnsOverHttpsTemplates, base::android::ConvertJavaStringToUTF8(env, templates));
|
||||
+}
|
||||
diff --git a/chrome/browser/net/system_network_context_manager.cc b/chrome/browser/net/system_network_context_manager.cc
|
||||
--- a/chrome/browser/net/system_network_context_manager.cc
|
||||
+++ b/chrome/browser/net/system_network_context_manager.cc
|
||||
@@ -134,9 +134,14 @@ void GetStubResolverConfig(
|
||||
|
||||
std::string doh_templates =
|
||||
local_state->GetString(prefs::kDnsOverHttpsTemplates);
|
||||
- std::string server_method;
|
||||
- if (!doh_templates.empty() &&
|
||||
- *secure_dns_mode != net::DnsConfig::SecureDnsMode::OFF) {
|
||||
+ if (doh_templates.empty()) {
|
||||
+ *secure_dns_mode = net::DnsConfig::SecureDnsMode::OFF;
|
||||
+ doh_mode = chrome_browser_net::kDnsOverHttpsModeOff;
|
||||
+ }
|
||||
+
|
||||
+ LOG(INFO) << "DoH templates: '" << doh_templates << "' with mode " << doh_mode;
|
||||
+ if (*secure_dns_mode != net::DnsConfig::SecureDnsMode::OFF) {
|
||||
+ std::string server_method;
|
||||
for (const std::string& server_template :
|
||||
SplitString(doh_templates, " ", base::TRIM_WHITESPACE,
|
||||
base::SPLIT_WANT_NONEMPTY)) {
|
||||
@@ -404,40 +409,11 @@ SystemNetworkContextManager::SystemNetworkContextManager(
|
||||
// features before registering change callbacks for these preferences.
|
||||
local_state_->SetDefaultPrefValue(prefs::kBuiltInDnsClientEnabled,
|
||||
base::Value(ShouldEnableAsyncDns()));
|
||||
- std::string default_doh_mode = chrome_browser_net::kDnsOverHttpsModeOff;
|
||||
- std::string default_doh_templates = "";
|
||||
- if (base::FeatureList::IsEnabled(features::kDnsOverHttps)) {
|
||||
- if (features::kDnsOverHttpsFallbackParam.Get()) {
|
||||
- default_doh_mode = chrome_browser_net::kDnsOverHttpsModeAutomatic;
|
||||
- } else {
|
||||
- default_doh_mode = chrome_browser_net::kDnsOverHttpsModeSecure;
|
||||
- }
|
||||
- default_doh_templates = features::kDnsOverHttpsTemplatesParam.Get();
|
||||
- }
|
||||
+ //NOTE: DoH fallback feature to insecure mode is not evaluated
|
||||
local_state_->SetDefaultPrefValue(prefs::kDnsOverHttpsMode,
|
||||
- base::Value(default_doh_mode));
|
||||
+ base::Value(chrome_browser_net::kDnsOverHttpsModeOff));
|
||||
local_state_->SetDefaultPrefValue(prefs::kDnsOverHttpsTemplates,
|
||||
- base::Value(default_doh_templates));
|
||||
-
|
||||
- // If the user has explicitly enabled or disabled the DoH experiment in
|
||||
- // chrome://flags, store that choice in the user prefs so that it can be
|
||||
- // persisted after the experiment ends. Also make sure to remove the stored
|
||||
- // prefs value if the user has changed their chrome://flags selection to the
|
||||
- // default.
|
||||
- flags_ui::PrefServiceFlagsStorage flags_storage(local_state_);
|
||||
- std::set<std::string> entries = flags_storage.GetFlags();
|
||||
- if (entries.count("dns-over-https@1")) {
|
||||
- // The user has "Enabled" selected.
|
||||
- local_state_->SetString(prefs::kDnsOverHttpsMode,
|
||||
- chrome_browser_net::kDnsOverHttpsModeAutomatic);
|
||||
- } else if (entries.count("dns-over-https@2")) {
|
||||
- // The user has "Disabled" selected.
|
||||
- local_state_->SetString(prefs::kDnsOverHttpsMode,
|
||||
- chrome_browser_net::kDnsOverHttpsModeOff);
|
||||
- } else {
|
||||
- // The user has "Default" selected.
|
||||
- local_state_->ClearPref(prefs::kDnsOverHttpsMode);
|
||||
- }
|
||||
+ base::Value(features::kDnsOverHttpsTemplatesParam.Get()));
|
||||
|
||||
PrefChangeRegistrar::NamedChangeCallback dns_pref_callback =
|
||||
base::BindRepeating(&OnStubResolverConfigChanged,
|
||||
diff --git a/chrome/common/chrome_features.cc b/chrome/common/chrome_features.cc
|
||||
--- a/chrome/common/chrome_features.cc
|
||||
+++ b/chrome/common/chrome_features.cc
|
||||
@@ -271,12 +271,12 @@ const char kDisallowUnsafeHttpDownloadsParamName[] = "MimeTypeList";
|
||||
|
||||
// Enable DNS over HTTPS (DoH).
|
||||
const base::Feature kDnsOverHttps{"DnsOverHttps",
|
||||
- base::FEATURE_DISABLED_BY_DEFAULT};
|
||||
+ base::FEATURE_ENABLED_BY_DEFAULT};
|
||||
|
||||
// Set whether fallback to insecure DNS is allowed by default. This setting may
|
||||
// be overridden for individual transactions.
|
||||
const base::FeatureParam<bool> kDnsOverHttpsFallbackParam{&kDnsOverHttps,
|
||||
- "Fallback", true};
|
||||
+ "Fallback", false};
|
||||
|
||||
// Supply one or more space-separated DoH server URI templates to use when this
|
||||
// feature is enabled. If no templates are specified, then a hardcoded mapping
|
||||
--
|
||||
2.11.0
|
||||
|
||||
@@ -3,25 +3,10 @@ Date: Thu, 2 Nov 2017 18:21:16 +0200
|
||||
Subject: Allow playing audio in background
|
||||
|
||||
---
|
||||
chrome/browser/about_flags.cc | 4 ++++
|
||||
media/blink/webmediaplayer_impl.cc | 12 +++++++++++-
|
||||
media/blink/webmediaplayer_impl.h | 2 ++
|
||||
3 files changed, 17 insertions(+), 1 deletion(-)
|
||||
2 files changed, 13 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
|
||||
--- a/chrome/browser/about_flags.cc
|
||||
+++ b/chrome/browser/about_flags.cc
|
||||
@@ -1603,6 +1603,10 @@ const FeatureEntry kFeatureEntries[] = {
|
||||
FEATURE_VALUE_TYPE(features::kAppNotificationStatusMessaging)},
|
||||
#endif // OS_ANDROID
|
||||
{"enable-devtools-experiments", flag_descriptions::kDevtoolsExperimentsName,
|
||||
+ {"resume-background-video",
|
||||
+ flag_descriptions::kResumeBackgroundVideoName,
|
||||
+ flag_descriptions::kResumeBackgroundVideoDescription, kOsAll,
|
||||
+ FEATURE_VALUE_TYPE(media::kResumeBackgroundVideo)},
|
||||
flag_descriptions::kDevtoolsExperimentsDescription, kOsDesktop,
|
||||
SINGLE_VALUE_TYPE(switches::kEnableDevToolsExperiments)},
|
||||
{"silent-debugger-extension-api",
|
||||
diff --git a/media/blink/webmediaplayer_impl.cc b/media/blink/webmediaplayer_impl.cc
|
||||
--- a/media/blink/webmediaplayer_impl.cc
|
||||
+++ b/media/blink/webmediaplayer_impl.cc
|
||||
|
||||
@@ -11,7 +11,7 @@ Do not read experiment value for cronet async DNS configuration
|
||||
diff --git a/chrome/browser/net/system_network_context_manager.cc b/chrome/browser/net/system_network_context_manager.cc
|
||||
--- a/chrome/browser/net/system_network_context_manager.cc
|
||||
+++ b/chrome/browser/net/system_network_context_manager.cc
|
||||
@@ -244,7 +244,7 @@ void OnAuthPrefsChanged(PrefService* local_state,
|
||||
@@ -242,7 +242,7 @@ void OnAuthPrefsChanged(PrefService* local_state,
|
||||
// Android this includes checking the Android version in the field trial.
|
||||
bool ShouldEnableAsyncDns() {
|
||||
bool feature_can_be_enabled = true;
|
||||
|
||||
@@ -43,7 +43,7 @@ diff --git a/third_party/blink/renderer/modules/webaudio/audio_buffer.idl b/thir
|
||||
diff --git a/third_party/blink/renderer/modules/webaudio/audio_context.cc b/third_party/blink/renderer/modules/webaudio/audio_context.cc
|
||||
--- a/third_party/blink/renderer/modules/webaudio/audio_context.cc
|
||||
+++ b/third_party/blink/renderer/modules/webaudio/audio_context.cc
|
||||
@@ -343,6 +343,7 @@ void AudioContext::StopRendering() {
|
||||
@@ -358,6 +358,7 @@ void AudioContext::StopRendering() {
|
||||
double AudioContext::baseLatency() const {
|
||||
DCHECK(IsMainThread());
|
||||
DCHECK(destination());
|
||||
|
||||
@@ -404,7 +404,7 @@ diff --git a/chrome/android/java/strings/android_chrome_strings.grd b/chrome/and
|
||||
<message name="IDS_CONTEXTUAL_SEARCH_TITLE" desc="Name for the Contextual Search feature, which allows users to search for a term in a web page by tapping on it.">
|
||||
Tap to Search
|
||||
</message>
|
||||
@@ -4038,9 +4008,6 @@ The site does NOT gain access to the camera. The camera images are only visible
|
||||
@@ -4041,9 +4011,6 @@ The site does NOT gain access to the camera. The camera images are only visible
|
||||
<message name="IDS_USAGE_STATS_CONSENT_PROMPT" desc="Consent prompt when authorizing Digital Wellbeing to access Chrome usage data">
|
||||
You can see sites you visit in Chrome and set timers for them.\n\nGoogle gets info about the sites you set timers for and how long you visit them. This info is used to make Digital Wellbeing better.
|
||||
</message>
|
||||
@@ -417,7 +417,7 @@ diff --git a/chrome/android/java/strings/android_chrome_strings.grd b/chrome/and
|
||||
diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
|
||||
--- a/chrome/browser/BUILD.gn
|
||||
+++ b/chrome/browser/BUILD.gn
|
||||
@@ -3037,8 +3037,6 @@ jumbo_split_static_library("browser") {
|
||||
@@ -3039,8 +3039,6 @@ jumbo_split_static_library("browser") {
|
||||
"download/download_commands.h",
|
||||
"download/download_crx_util.cc",
|
||||
"download/download_crx_util.h",
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
From: csagan5 <32685696+csagan5@users.noreply.github.com>
|
||||
Date: Mon, 11 Nov 2019 23:09:48 +0100
|
||||
Subject: Disable sync services menu entry
|
||||
|
||||
---
|
||||
chrome/android/java/res/xml/main_preferences.xml | 6 ------
|
||||
chrome/android/java/res/xml/privacy_preferences.xml | 7 -------
|
||||
2 files changed, 13 deletions(-)
|
||||
|
||||
diff --git a/chrome/android/java/res/xml/main_preferences.xml b/chrome/android/java/res/xml/main_preferences.xml
|
||||
--- a/chrome/android/java/res/xml/main_preferences.xml
|
||||
+++ b/chrome/android/java/res/xml/main_preferences.xml
|
||||
@@ -14,12 +14,6 @@
|
||||
android:key="sign_in"
|
||||
android:order="1"
|
||||
android:title="@string/sign_in_to_chrome"/>
|
||||
- <org.chromium.chrome.browser.preferences.ChromeBasePreference
|
||||
- android:key="sync_and_services"
|
||||
- android:order="2"
|
||||
- android:layout="@layout/account_management_account_row"
|
||||
- android:title="@string/prefs_sync_and_services"
|
||||
- android:fragment="org.chromium.chrome.browser.preferences.sync.SyncAndServicesPreferences"/>
|
||||
|
||||
<PreferenceCategory
|
||||
android:key="basics_section"
|
||||
diff --git a/chrome/android/java/res/xml/privacy_preferences.xml b/chrome/android/java/res/xml/privacy_preferences.xml
|
||||
--- a/chrome/android/java/res/xml/privacy_preferences.xml
|
||||
+++ b/chrome/android/java/res/xml/privacy_preferences.xml
|
||||
@@ -33,12 +33,5 @@
|
||||
android:title="@string/clear_browsing_data_title"
|
||||
android:summary="@string/clear_browsing_data_summary"
|
||||
android:fragment="org.chromium.chrome.browser.preferences.privacy.ClearBrowsingDataTabsFragment" />
|
||||
- <android.support.v7.preference.Preference
|
||||
- android:key="sync_and_services_link_divider"
|
||||
- android:layout="@layout/divider_preference"
|
||||
- android:selectable="false"/>
|
||||
- <org.chromium.chrome.browser.preferences.TextMessagePreference
|
||||
- android:key="sync_and_services_link"
|
||||
- android:summary="@string/privacy_sync_and_services_link"
|
||||
app:allowDividerBelow="false" />
|
||||
</PreferenceScreen>
|
||||
--
|
||||
2.11.0
|
||||
|
||||
@@ -63,7 +63,7 @@ diff --git a/chrome/browser/android/search_permissions/search_permissions_servic
|
||||
diff --git a/chrome/common/chrome_features.cc b/chrome/common/chrome_features.cc
|
||||
--- a/chrome/common/chrome_features.cc
|
||||
+++ b/chrome/common/chrome_features.cc
|
||||
@@ -279,7 +279,7 @@ const base::FeatureParam<std::string> kDnsOverHttpsTemplatesParam{
|
||||
@@ -288,7 +288,7 @@ const base::FeatureParam<std::string> kDnsOverHttpsTemplatesParam{
|
||||
#if defined(OS_ANDROID)
|
||||
// Enable changing default downloads storage location on Android.
|
||||
const base::Feature kDownloadsLocationChange{"DownloadsLocationChange",
|
||||
|
||||
@@ -9,7 +9,7 @@ Subject: Enable changing default downloads storage location by default
|
||||
diff --git a/chrome/common/chrome_features.cc b/chrome/common/chrome_features.cc
|
||||
--- a/chrome/common/chrome_features.cc
|
||||
+++ b/chrome/common/chrome_features.cc
|
||||
@@ -279,7 +279,7 @@ const base::FeatureParam<std::string> kDnsOverHttpsTemplatesParam{
|
||||
@@ -288,7 +288,7 @@ const base::FeatureParam<std::string> kDnsOverHttpsTemplatesParam{
|
||||
#if defined(OS_ANDROID)
|
||||
// Enable changing default downloads storage location on Android.
|
||||
const base::Feature kDownloadsLocationChange{"DownloadsLocationChange",
|
||||
|
||||
+2
-2
@@ -9,7 +9,7 @@ Subject: Enable site per process isolation for devices with enough memory
|
||||
diff --git a/chrome/common/chrome_features.cc b/chrome/common/chrome_features.cc
|
||||
--- a/chrome/common/chrome_features.cc
|
||||
+++ b/chrome/common/chrome_features.cc
|
||||
@@ -608,11 +608,7 @@ const base::Feature kShowTrustedPublisherURL{"ShowTrustedPublisherURL",
|
||||
@@ -617,11 +617,7 @@ const base::Feature kShowTrustedPublisherURL{"ShowTrustedPublisherURL",
|
||||
// browser_features, as they are only used on the browser side.
|
||||
const base::Feature kSitePerProcess {
|
||||
"site-per-process",
|
||||
@@ -21,7 +21,7 @@ diff --git a/chrome/common/chrome_features.cc b/chrome/common/chrome_features.cc
|
||||
};
|
||||
|
||||
// Controls a mode for dynamically process-isolating sites where the user has
|
||||
@@ -634,7 +630,7 @@ const base::Feature kSiteIsolationForPasswordSites{
|
||||
@@ -643,7 +639,7 @@ const base::Feature kSiteIsolationForPasswordSites{
|
||||
// base::SysInfo::AmountOfPhysicalMemoryMB().
|
||||
const base::Feature kSitePerProcessOnlyForHighMemoryClients{
|
||||
"site-per-process-only-for-high-memory-clients",
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -18,8 +18,7 @@ ld.lld: error: undefined symbol: notifier::NotifierOptions::NotifierOptions()
|
||||
---
|
||||
chrome/android/BUILD.gn | 4 +-
|
||||
chrome/android/java/AndroidManifest.xml | 27 -----
|
||||
chrome/android/java/res/xml/main_preferences.xml | 20 ----
|
||||
.../android/java/res/xml/privacy_preferences.xml | 7 --
|
||||
chrome/android/java/res/xml/main_preferences.xml | 14 ---
|
||||
.../chromium/chrome/browser/ChromeActivity.java | 34 ------
|
||||
.../browser/preferences/MainPreferences.java | 86 +--------------
|
||||
.../DataReductionPreferenceFragment.java | 17 +--
|
||||
@@ -35,7 +34,7 @@ ld.lld: error: undefined symbol: notifier::NotifierOptions::NotifierOptions()
|
||||
.../components/sync/AndroidSyncSettings.java | 24 +---
|
||||
.../chromium/net/HttpNegotiateAuthenticator.java | 122 +--------------------
|
||||
.../chromoting/base/OAuthTokenFetcher.java | 2 -
|
||||
19 files changed, 26 insertions(+), 501 deletions(-)
|
||||
18 files changed, 26 insertions(+), 488 deletions(-)
|
||||
|
||||
diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn
|
||||
--- a/chrome/android/BUILD.gn
|
||||
@@ -129,7 +128,7 @@ diff --git a/chrome/android/java/AndroidManifest.xml b/chrome/android/java/Andro
|
||||
diff --git a/chrome/android/java/res/xml/main_preferences.xml b/chrome/android/java/res/xml/main_preferences.xml
|
||||
--- a/chrome/android/java/res/xml/main_preferences.xml
|
||||
+++ b/chrome/android/java/res/xml/main_preferences.xml
|
||||
@@ -7,21 +7,6 @@
|
||||
@@ -7,15 +7,6 @@
|
||||
android:orderingFromXml="false">
|
||||
|
||||
<PreferenceCategory
|
||||
@@ -140,18 +139,12 @@ diff --git a/chrome/android/java/res/xml/main_preferences.xml b/chrome/android/j
|
||||
- android:key="sign_in"
|
||||
- android:order="1"
|
||||
- android:title="@string/sign_in_to_chrome"/>
|
||||
- <org.chromium.chrome.browser.preferences.ChromeBasePreference
|
||||
- android:key="sync_and_services"
|
||||
- android:order="2"
|
||||
- android:layout="@layout/account_management_account_row"
|
||||
- android:title="@string/prefs_sync_and_services"
|
||||
- android:fragment="org.chromium.chrome.browser.preferences.sync.SyncAndServicesPreferences"/>
|
||||
-
|
||||
- <PreferenceCategory
|
||||
android:key="basics_section"
|
||||
android:order="3"
|
||||
android:title="@string/prefs_section_basics"/>
|
||||
@@ -91,11 +76,6 @@
|
||||
@@ -85,11 +76,6 @@
|
||||
android:order="16"
|
||||
android:title="@string/prefs_languages"/>
|
||||
<org.chromium.chrome.browser.preferences.ChromeBasePreference
|
||||
@@ -163,22 +156,6 @@ diff --git a/chrome/android/java/res/xml/main_preferences.xml b/chrome/android/j
|
||||
android:fragment="org.chromium.chrome.browser.preferences.download.DownloadPreferences"
|
||||
android:key="downloads"
|
||||
android:order="18"
|
||||
diff --git a/chrome/android/java/res/xml/privacy_preferences.xml b/chrome/android/java/res/xml/privacy_preferences.xml
|
||||
--- a/chrome/android/java/res/xml/privacy_preferences.xml
|
||||
+++ b/chrome/android/java/res/xml/privacy_preferences.xml
|
||||
@@ -33,12 +33,5 @@
|
||||
android:title="@string/clear_browsing_data_title"
|
||||
android:summary="@string/clear_browsing_data_summary"
|
||||
android:fragment="org.chromium.chrome.browser.preferences.privacy.ClearBrowsingDataTabsFragment" />
|
||||
- <android.support.v7.preference.Preference
|
||||
- android:key="sync_and_services_link_divider"
|
||||
- android:layout="@layout/divider_preference"
|
||||
- android:selectable="false"/>
|
||||
- <org.chromium.chrome.browser.preferences.TextMessagePreference
|
||||
- android:key="sync_and_services_link"
|
||||
- android:summary="@string/privacy_sync_and_services_link"
|
||||
app:allowDividerBelow="false" />
|
||||
</PreferenceScreen>
|
||||
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
|
||||
|
||||
@@ -45,7 +45,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/omnibox/suggest
|
||||
diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
|
||||
--- a/chrome/browser/about_flags.cc
|
||||
+++ b/chrome/browser/about_flags.cc
|
||||
@@ -1974,6 +1974,9 @@ const FeatureEntry kFeatureEntries[] = {
|
||||
@@ -1966,6 +1966,9 @@ const FeatureEntry kFeatureEntries[] = {
|
||||
{"enable-homepage-tile", flag_descriptions::kHomepageTileName,
|
||||
flag_descriptions::kHomepageTileDescription, kOsAndroid,
|
||||
FEATURE_VALUE_TYPE(chrome::android::kHomepageTile)},
|
||||
|
||||
@@ -0,0 +1,71 @@
|
||||
From: csagan5 <32685696+csagan5@users.noreply.github.com>
|
||||
Date: Mon, 2 Dec 2019 21:15:32 +0100
|
||||
Subject: Revert "flags: remove disable-pull-to-refresh-effect"
|
||||
|
||||
This reverts commit 4e598f38a0e6dd3dbede009c6a99b2a520a94e1f.
|
||||
---
|
||||
chrome/browser/about_flags.cc | 4 ++++
|
||||
chrome/browser/flag-metadata.json | 5 +++++
|
||||
chrome/browser/flag_descriptions.cc | 4 ++++
|
||||
chrome/browser/flag_descriptions.h | 3 +++
|
||||
4 files changed, 16 insertions(+)
|
||||
|
||||
diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
|
||||
--- a/chrome/browser/about_flags.cc
|
||||
+++ b/chrome/browser/about_flags.cc
|
||||
@@ -1927,6 +1927,10 @@ const FeatureEntry kFeatureEntries[] = {
|
||||
SINGLE_VALUE_TYPE(switches::kHostedAppQuitNotification)},
|
||||
#endif // OS_MACOSX
|
||||
#if defined(OS_ANDROID)
|
||||
+ {"disable-pull-to-refresh-effect",
|
||||
+ flag_descriptions::kPullToRefreshEffectName,
|
||||
+ flag_descriptions::kPullToRefreshEffectDescription, kOsAndroid,
|
||||
+ SINGLE_DISABLE_VALUE_TYPE(switches::kDisablePullToRefreshEffect)},
|
||||
{"translate-force-trigger-on-english",
|
||||
flag_descriptions::kTranslateForceTriggerOnEnglishName,
|
||||
flag_descriptions::kTranslateForceTriggerOnEnglishDescription, kOsAndroid,
|
||||
diff --git a/chrome/browser/flag-metadata.json b/chrome/browser/flag-metadata.json
|
||||
--- a/chrome/browser/flag-metadata.json
|
||||
+++ b/chrome/browser/flag-metadata.json
|
||||
@@ -681,6 +681,11 @@
|
||||
"expiry_milestone": 83
|
||||
},
|
||||
{
|
||||
+ "name": "disable-pull-to-refresh-effect",
|
||||
+ // "owners": [ "your-team" ],
|
||||
+ "expiry_milestone": -1
|
||||
+ },
|
||||
+ {
|
||||
// See https://crbug.com/882238.
|
||||
"name": "disable-pushstate-throttle",
|
||||
"owners": [ "arthursonzogni@ch40m1um.qjz9zk", "palmer@ch40m1um.qjz9zk" ],
|
||||
diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descriptions.cc
|
||||
--- a/chrome/browser/flag_descriptions.cc
|
||||
+++ b/chrome/browser/flag_descriptions.cc
|
||||
@@ -2679,6 +2679,10 @@ extern const char kProcessSharingWithStrictSiteInstancesDescription[] =
|
||||
"separated like strict site isolation, but process selection puts multiple "
|
||||
"site instances in a single process.";
|
||||
|
||||
+const char kPullToRefreshEffectName[] = "The pull-to-refresh effect";
|
||||
+const char kPullToRefreshEffectDescription[] =
|
||||
+ "Page reloads triggered by vertically overscrolling content.";
|
||||
+
|
||||
const char kReaderModeHeuristicsName[] = "Reader Mode triggering";
|
||||
const char kReaderModeHeuristicsDescription[] =
|
||||
"Determines what pages the Reader Mode infobar is shown on.";
|
||||
diff --git a/chrome/browser/flag_descriptions.h b/chrome/browser/flag_descriptions.h
|
||||
--- a/chrome/browser/flag_descriptions.h
|
||||
+++ b/chrome/browser/flag_descriptions.h
|
||||
@@ -1583,6 +1583,9 @@ extern const char kProcessSharingWithDefaultSiteInstancesDescription[];
|
||||
extern const char kProcessSharingWithStrictSiteInstancesName[];
|
||||
extern const char kProcessSharingWithStrictSiteInstancesDescription[];
|
||||
|
||||
+extern const char kPullToRefreshEffectName[];
|
||||
+extern const char kPullToRefreshEffectDescription[];
|
||||
+
|
||||
extern const char kReaderModeHeuristicsName[];
|
||||
extern const char kReaderModeHeuristicsDescription[];
|
||||
extern const char kReaderModeHeuristicsMarkup[];
|
||||
--
|
||||
2.11.0
|
||||
|
||||
@@ -18,7 +18,7 @@ diff --git a/components/version_info/version_info.cc b/components/version_info/v
|
||||
std::string GetProductNameAndVersionForUserAgent() {
|
||||
- return "Chrome/" + GetVersionNumber();
|
||||
+ // latest stable version
|
||||
+ return "Chrome/78.0.3904.96";
|
||||
+ return "Chrome/78.0.3904.108";
|
||||
}
|
||||
|
||||
std::string GetProductName() {
|
||||
|
||||
Reference in New Issue
Block a user