v117 final patches
This commit is contained in:
@@ -3,7 +3,9 @@ eyeo-117.0.5938.0-chrome_integration.patch
|
||||
eyeo-117.0.5938.0-android_api.patch
|
||||
eyeo-117.0.5938.0-android_settings.patch
|
||||
eyeo-117.0.5938.0-extension_api.patch
|
||||
00Fix-eyeo-Browser-Ad-filtering-patches.patch
|
||||
00Eyeo-Adblock-Remove-Privacy-Issues.patch
|
||||
00AdblockPlus-add-blocking-in-service-workers.patch
|
||||
|
||||
Remove-EV-certificates.patch
|
||||
do-not-hide-.orig-files.patch
|
||||
@@ -202,7 +204,6 @@ Add-kill-switch-for-unsupported-clangd-flags.patch
|
||||
00WIN-Add-some-prefs-to-secure-preferences.patch
|
||||
00WIN-Disable-search-for-image.patch
|
||||
|
||||
00Temp-Disable-kAutomaticLazyFrameLoadingToEmbeds.patch
|
||||
00Remove-experimental-relative-c---abi-vtables.patch
|
||||
AudioBuffer-AnalyserNode-fp-mitigations.patch
|
||||
00Disable-Component-Updates.patch
|
||||
@@ -244,10 +245,6 @@ AudioBuffer-AnalyserNode-fp-mitigations.patch
|
||||
00Disallow-Android-App-Scheme-as-referrer.patch
|
||||
00Deprecate-Data-URL-in-SVGUseElement.patch
|
||||
|
||||
00TEMP-Add-a-log-to-track-strange-behavior.patch
|
||||
00v113-temp-fix-build.patch
|
||||
00114-temp-disable-find-bad-constructs-external-repo.patch
|
||||
|
||||
bromite-build-utils.patch
|
||||
Content-settings-infrastructure.patch
|
||||
Add-autoplay-site-setting.patch
|
||||
@@ -272,8 +269,13 @@ Timezone-customization.patch
|
||||
00do-not-block-build-incompatible-profiles.patch
|
||||
00Allow-DocumentPiP-if-PopupsAndRedirects-are-active.patch
|
||||
00allow-the-download-of-clang-for-windows-crossbuild.patch
|
||||
00Temp-disable-predictive-back-gesture.patch
|
||||
00Add-option-to-disable-snapshots.patch
|
||||
00Disable-PartnerCustomizations.patch
|
||||
00Enable-Android-Dynamic-Performance-Framework.patch
|
||||
00Remove-GoogleAccountsPrivateApiHost.patch
|
||||
00Remove-GoogleAccountsPrivateApiHost.patch
|
||||
00Fix-crash-on-customize-profile-ui.patch
|
||||
|
||||
00Temp-Disable-kAutomaticLazyFrameLoadingToEmbeds.patch
|
||||
00Temp-disable-predictive-back-gesture.patch
|
||||
00TEMP-Add-a-log-to-track-strange-behavior.patch
|
||||
00Fix-chromium-build-bugs.patch
|
||||
@@ -1,59 +0,0 @@
|
||||
From: uazo <uazo@users.noreply.github.com>
|
||||
Date: Tue, 30 May 2023 15:45:59 +0000
|
||||
Subject: 114 temp disable find_bad_constructs external repo
|
||||
|
||||
License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html
|
||||
---
|
||||
build/config/android/rules.gni | 1 +
|
||||
crypto/BUILD.gn | 1 +
|
||||
net/BUILD.gn | 1 +
|
||||
third_party/libevent/BUILD.gn | 2 ++
|
||||
4 files changed, 5 insertions(+)
|
||||
|
||||
diff --git a/build/config/android/rules.gni b/build/config/android/rules.gni
|
||||
--- a/build/config/android/rules.gni
|
||||
+++ b/build/config/android/rules.gni
|
||||
@@ -4989,6 +4989,7 @@ if (enable_java_templates && is_android) {
|
||||
_module_build_config = _module.build_config
|
||||
_module_build_config_target = _module.build_config_target
|
||||
_module_target_name = get_label_info(_module_target, "name")
|
||||
+ not_needed(["_module_target_name"])
|
||||
|
||||
if (!_proguard_enabled) {
|
||||
_dex_target = "${_module_target_name}__final_dex"
|
||||
diff --git a/crypto/BUILD.gn b/crypto/BUILD.gn
|
||||
--- a/crypto/BUILD.gn
|
||||
+++ b/crypto/BUILD.gn
|
||||
@@ -14,6 +14,7 @@ buildflag_header("buildflags") {
|
||||
}
|
||||
|
||||
component("crypto") {
|
||||
+ configs -= [ "//build/config/clang:find_bad_constructs" ]
|
||||
output_name = "crcrypto" # Avoid colliding with OpenSSL's libcrypto.
|
||||
sources = [
|
||||
"aead.cc",
|
||||
diff --git a/net/BUILD.gn b/net/BUILD.gn
|
||||
--- a/net/BUILD.gn
|
||||
+++ b/net/BUILD.gn
|
||||
@@ -1657,6 +1657,7 @@ component("net") {
|
||||
configs -= [ "//build/config/compiler:default_optimization" ]
|
||||
configs += [ "//build/config/compiler:optimize_max" ]
|
||||
}
|
||||
+ configs -= [ "//build/config/clang:find_bad_constructs" ]
|
||||
}
|
||||
|
||||
# net_export.h has its own build target so that code (eg
|
||||
diff --git a/third_party/libevent/BUILD.gn b/third_party/libevent/BUILD.gn
|
||||
--- a/third_party/libevent/BUILD.gn
|
||||
+++ b/third_party/libevent/BUILD.gn
|
||||
@@ -69,6 +69,8 @@ static_library("libevent") {
|
||||
configs += [ "//build/config/compiler:optimize_max" ]
|
||||
}
|
||||
|
||||
+ configs -= [ "//build/config/clang:find_bad_constructs" ]
|
||||
+
|
||||
configs -= [ "//build/config/compiler:chromium_code" ]
|
||||
configs += [ "//build/config/compiler:no_chromium_code" ]
|
||||
}
|
||||
--
|
||||
2.25.1
|
||||
@@ -0,0 +1,732 @@
|
||||
From: uazo <uazo@users.noreply.github.com>
|
||||
Date: Thu, 7 Sep 2023 07:25:25 +0000
|
||||
Subject: AdblockPlus add blocking in service workers
|
||||
|
||||
License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html
|
||||
---
|
||||
.../adblock/adblock_content_browser_client.cc | 184 ++++++++++++------
|
||||
.../adblock/adblock_content_browser_client.h | 27 ++-
|
||||
.../browser/chrome_content_browser_client.cc | 6 +-
|
||||
.../browser/chrome_content_browser_client.h | 6 +-
|
||||
.../browser/adblock_url_loader_factory.cc | 10 +-
|
||||
.../browser/adblock_url_loader_factory.h | 3 +
|
||||
.../browser/frame_hierarchy_builder.cc | 3 +-
|
||||
.../browser/resource_classification_runner.h | 8 +
|
||||
.../resource_classification_runner_impl.cc | 30 ++-
|
||||
.../resource_classification_runner_impl.h | 8 +
|
||||
.../websockets/websocket_connector_impl.cc | 6 +-
|
||||
.../public/browser/content_browser_client.cc | 4 +-
|
||||
.../public/browser/content_browser_client.h | 4 +-
|
||||
13 files changed, 216 insertions(+), 83 deletions(-)
|
||||
|
||||
diff --git a/chrome/browser/adblock/adblock_content_browser_client.cc b/chrome/browser/adblock/adblock_content_browser_client.cc
|
||||
--- a/chrome/browser/adblock/adblock_content_browser_client.cc
|
||||
+++ b/chrome/browser/adblock/adblock_content_browser_client.cc
|
||||
@@ -45,6 +45,7 @@
|
||||
#include "content/public/browser/web_contents.h"
|
||||
#include "mojo/public/cpp/bindings/self_owned_receiver.h"
|
||||
#include "services/network/public/mojom/websocket.mojom.h"
|
||||
+#include "services/network/public/mojom/web_transport.mojom.h"
|
||||
#include "services/service_manager/public/cpp/binder_registry.h"
|
||||
#include "third_party/blink/public/common/loader/url_loader_throttle.h"
|
||||
|
||||
@@ -58,6 +59,29 @@
|
||||
|
||||
namespace {
|
||||
|
||||
+bool IsFilteringNeeded(Profile* profile, const GURL& embedder_url) {
|
||||
+ DCHECK(profile);
|
||||
+
|
||||
+ if(embedder_url.is_empty()) {
|
||||
+ // in android can be empty because it was created by
|
||||
+ // RenderFrameHostImpl::CreateSubresourceLoaderFactoriesForInitialEmptyDocument
|
||||
+ return true;
|
||||
+ }
|
||||
+
|
||||
+ HostContentSettingsMap* settings_map = HostContentSettingsMapFactory::GetForProfile(profile);
|
||||
+ if (settings_map && settings_map->GetContentSetting(embedder_url, GURL(), ContentSettingsType::ADS)
|
||||
+ == CONTENT_SETTING_ALLOW) {
|
||||
+ return false;
|
||||
+ }
|
||||
+ // Filtering may be needed if there's at least one enabled
|
||||
+ // FilteringConfiguration.
|
||||
+ bool ret = base::ranges::any_of(
|
||||
+ adblock::SubscriptionServiceFactory::GetForBrowserContext(profile)
|
||||
+ ->GetInstalledFilteringConfigurations(),
|
||||
+ &adblock::FilteringConfiguration::IsEnabled);
|
||||
+ return ret;
|
||||
+}
|
||||
+
|
||||
bool IsFilteringNeeded(content::RenderFrameHost* frame) {
|
||||
if (frame) {
|
||||
auto* profile =
|
||||
@@ -65,17 +89,7 @@ bool IsFilteringNeeded(content::RenderFrameHost* frame) {
|
||||
if (profile) {
|
||||
content::RenderFrameHost* embedder = frame->GetOutermostMainFrameOrEmbedder();
|
||||
const auto& embedder_url = embedder->GetLastCommittedURL();
|
||||
- HostContentSettingsMap* settings_map = HostContentSettingsMapFactory::GetForProfile(profile);
|
||||
- if (settings_map && settings_map->GetContentSetting(embedder_url, GURL(), ContentSettingsType::ADS)
|
||||
- == CONTENT_SETTING_ALLOW) {
|
||||
- return false;
|
||||
- }
|
||||
- // Filtering may be needed if there's at least one enabled
|
||||
- // FilteringConfiguration.
|
||||
- return base::ranges::any_of(
|
||||
- adblock::SubscriptionServiceFactory::GetForBrowserContext(profile)
|
||||
- ->GetInstalledFilteringConfigurations(),
|
||||
- &adblock::FilteringConfiguration::IsEnabled);
|
||||
+ return IsFilteringNeeded(profile, embedder_url);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
@@ -90,6 +104,8 @@ class AdblockContextData : public base::SupportsUserData::Data {
|
||||
|
||||
static void StartProxying(
|
||||
Profile* profile,
|
||||
+ content::BrowserContext* browser_context,
|
||||
+ const url::Origin& request_initiator,
|
||||
content::RenderFrameHost* frame,
|
||||
int render_process_id,
|
||||
mojo::PendingReceiver<network::mojom::URLLoaderFactory> receiver,
|
||||
@@ -102,8 +118,6 @@ class AdblockContextData : public base::SupportsUserData::Data {
|
||||
self = new AdblockContextData();
|
||||
profile->SetUserData(kAdblockContextUserDataKey, base::WrapUnique(self));
|
||||
}
|
||||
- auto* browser_context =
|
||||
- content::WebContents::FromRenderFrameHost(frame)->GetBrowserContext();
|
||||
adblock::AdblockURLLoaderFactoryConfig config{
|
||||
adblock::SubscriptionServiceFactory::GetForBrowserContext(
|
||||
browser_context),
|
||||
@@ -115,8 +129,9 @@ class AdblockContextData : public base::SupportsUserData::Data {
|
||||
browser_context)};
|
||||
auto proxy = std::make_unique<adblock::AdblockURLLoaderFactory>(
|
||||
std::move(config),
|
||||
+ request_initiator.GetURL(),
|
||||
content::GlobalRenderFrameHostId(render_process_id,
|
||||
- frame->GetRoutingID()),
|
||||
+ frame ? frame->GetRoutingID() : MSG_ROUTING_NONE),
|
||||
std::move(receiver), std::move(target_factory),
|
||||
embedder_support::GetUserAgent(),
|
||||
base::BindOnce(&AdblockContextData::RemoveProxy,
|
||||
@@ -157,47 +172,50 @@ void AdblockContentBrowserClient::ForceAdblockProxyForTesting() {
|
||||
#endif
|
||||
|
||||
bool AdblockContentBrowserClient::WillInterceptWebSocket(
|
||||
- content::RenderFrameHost* frame) {
|
||||
+ content::RenderFrameHost* frame,
|
||||
+ content::RenderProcessHost* process,
|
||||
+ const url::Origin& origin) {
|
||||
if (IsFilteringNeeded(frame)) {
|
||||
return true;
|
||||
+ } else {
|
||||
+ auto* browser_context = process->GetBrowserContext();
|
||||
+ auto* profile = Profile::FromBrowserContext(browser_context);
|
||||
+ if (IsFilteringNeeded(profile, origin.GetURL().GetAsReferrer())) {
|
||||
+ return true;
|
||||
+ }
|
||||
}
|
||||
|
||||
- return ChromeContentBrowserClient::WillInterceptWebSocket(frame);
|
||||
+ return ChromeContentBrowserClient::WillInterceptWebSocket(frame, process, origin);
|
||||
}
|
||||
|
||||
void AdblockContentBrowserClient::CreateWebSocket(
|
||||
+ content::RenderProcessHost* process,
|
||||
content::RenderFrameHost* frame,
|
||||
WebSocketFactory factory,
|
||||
const GURL& url,
|
||||
+ const url::Origin& initiator_origin,
|
||||
const net::SiteForCookies& site_for_cookies,
|
||||
const absl::optional<std::string>& user_agent,
|
||||
mojo::PendingRemote<network::mojom::WebSocketHandshakeClient>
|
||||
handshake_client) {
|
||||
- if (IsFilteringNeeded(frame)) {
|
||||
- CreateWebSocketInternal(frame->GetGlobalId(), std::move(factory), url,
|
||||
- site_for_cookies, user_agent,
|
||||
- std::move(handshake_client));
|
||||
- } else {
|
||||
- DCHECK(ChromeContentBrowserClient::WillInterceptWebSocket(frame));
|
||||
- ChromeContentBrowserClient::CreateWebSocket(frame, std::move(factory), url,
|
||||
- site_for_cookies, user_agent,
|
||||
- std::move(handshake_client));
|
||||
- }
|
||||
+ CreateWebSocketInternal(process,
|
||||
+ frame ? frame->GetGlobalId() : content::GlobalRenderFrameHostId(),
|
||||
+ std::move(factory), url, initiator_origin,
|
||||
+ site_for_cookies, user_agent,
|
||||
+ std::move(handshake_client));
|
||||
}
|
||||
|
||||
void AdblockContentBrowserClient::CreateWebSocketInternal(
|
||||
+ content::RenderProcessHost* process,
|
||||
content::GlobalRenderFrameHostId render_frame_host_id,
|
||||
WebSocketFactory factory,
|
||||
const GURL& url,
|
||||
+ const url::Origin& initiator_origin,
|
||||
const net::SiteForCookies& site_for_cookies,
|
||||
const absl::optional<std::string>& user_agent,
|
||||
mojo::PendingRemote<network::mojom::WebSocketHandshakeClient>
|
||||
handshake_client) {
|
||||
- auto* frame = content::RenderFrameHost::FromID(render_frame_host_id);
|
||||
- if (!frame) {
|
||||
- return;
|
||||
- }
|
||||
- auto* browser_context = frame->GetProcess()->GetBrowserContext();
|
||||
+ auto* browser_context = process->GetBrowserContext();
|
||||
auto* subscription_service =
|
||||
adblock::SubscriptionServiceFactory::GetForBrowserContext(
|
||||
browser_context);
|
||||
@@ -205,33 +223,33 @@ void AdblockContentBrowserClient::CreateWebSocketInternal(
|
||||
adblock::ResourceClassificationRunnerFactory::GetForBrowserContext(
|
||||
browser_context);
|
||||
classification_runner->CheckRequestFilterMatchForWebSocket(
|
||||
- subscription_service->GetCurrentSnapshot(), url, render_frame_host_id,
|
||||
+ subscription_service->GetCurrentSnapshot(), url,
|
||||
+ std::move(initiator_origin.GetURL().GetAsReferrer()), render_frame_host_id,
|
||||
base::BindOnce(
|
||||
&AdblockContentBrowserClient::OnWebSocketFilterCheckCompleted,
|
||||
- weak_factory_.GetWeakPtr(), render_frame_host_id, std::move(factory),
|
||||
- url, site_for_cookies, user_agent, std::move(handshake_client)));
|
||||
+ weak_factory_.GetWeakPtr(), process, render_frame_host_id, std::move(factory),
|
||||
+ url, initiator_origin, site_for_cookies, user_agent, std::move(handshake_client)));
|
||||
}
|
||||
|
||||
void AdblockContentBrowserClient::OnWebSocketFilterCheckCompleted(
|
||||
+ content::RenderProcessHost* process,
|
||||
content::GlobalRenderFrameHostId render_frame_host_id,
|
||||
ChromeContentBrowserClient::WebSocketFactory factory,
|
||||
const GURL& url,
|
||||
+ const url::Origin& initiator_origin,
|
||||
const net::SiteForCookies& site_for_cookies,
|
||||
const absl::optional<std::string>& user_agent,
|
||||
mojo::PendingRemote<network::mojom::WebSocketHandshakeClient>
|
||||
handshake_client,
|
||||
adblock::FilterMatchResult result) {
|
||||
auto* frame = content::RenderFrameHost::FromID(render_frame_host_id);
|
||||
- if (!frame) {
|
||||
- return;
|
||||
- }
|
||||
const bool has_blocking_filter =
|
||||
result == adblock::FilterMatchResult::kBlockRule;
|
||||
if (!has_blocking_filter) {
|
||||
VLOG(1) << "[eyeo] Web socket allowed for " << url;
|
||||
- if (ChromeContentBrowserClient::WillInterceptWebSocket(frame)) {
|
||||
+ if (ChromeContentBrowserClient::WillInterceptWebSocket(frame, process, initiator_origin)) {
|
||||
ChromeContentBrowserClient::CreateWebSocket(
|
||||
- frame, std::move(factory), url, site_for_cookies, user_agent,
|
||||
+ process, frame, std::move(factory), url, initiator_origin, site_for_cookies, user_agent,
|
||||
std::move(handshake_client));
|
||||
return;
|
||||
}
|
||||
@@ -248,6 +266,72 @@ void AdblockContentBrowserClient::OnWebSocketFilterCheckCompleted(
|
||||
VLOG(1) << "[eyeo] Web socket blocked for " << url;
|
||||
}
|
||||
|
||||
+void AdblockContentBrowserClient::WillCreateWebTransport(
|
||||
+ int process_id,
|
||||
+ int frame_routing_id,
|
||||
+ const GURL& url,
|
||||
+ const url::Origin& initiator_origin,
|
||||
+ mojo::PendingRemote<network::mojom::WebTransportHandshakeClient>
|
||||
+ handshake_client,
|
||||
+ WillCreateWebTransportCallback callback) {
|
||||
+ auto* process = content::RenderProcessHost::FromID(process_id);
|
||||
+ DCHECK(process);
|
||||
+
|
||||
+ auto* browser_context = process->GetBrowserContext();
|
||||
+ auto* profile = Profile::FromBrowserContext(browser_context);
|
||||
+ if (IsFilteringNeeded(profile, initiator_origin.GetURL().GetAsReferrer())) {
|
||||
+ auto* subscription_service =
|
||||
+ adblock::SubscriptionServiceFactory::GetForBrowserContext(
|
||||
+ browser_context);
|
||||
+ auto* classification_runner =
|
||||
+ adblock::ResourceClassificationRunnerFactory::GetForBrowserContext(
|
||||
+ browser_context);
|
||||
+
|
||||
+ classification_runner->CheckRequestFilterMatchForWebTransport(
|
||||
+ subscription_service->GetCurrentSnapshot(), url,
|
||||
+ std::move(initiator_origin.GetURL().GetAsReferrer()),
|
||||
+ content::GlobalRenderFrameHostId(),
|
||||
+ base::BindOnce(
|
||||
+ &AdblockContentBrowserClient::OnWebTransportFilterCheckCompleted,
|
||||
+ weak_factory_.GetWeakPtr(),
|
||||
+ process_id, frame_routing_id, url,
|
||||
+ std::move(initiator_origin), std::move(handshake_client),
|
||||
+ std::move(callback)));
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ ChromeContentBrowserClient::WillCreateWebTransport(
|
||||
+ process_id, frame_routing_id,
|
||||
+ url, std::move(initiator_origin),
|
||||
+ std::move(handshake_client), std::move(callback));
|
||||
+}
|
||||
+
|
||||
+void AdblockContentBrowserClient::OnWebTransportFilterCheckCompleted(
|
||||
+ int process_id,
|
||||
+ int frame_routing_id,
|
||||
+ const GURL& url,
|
||||
+ const url::Origin& initiator_origin,
|
||||
+ mojo::PendingRemote<network::mojom::WebTransportHandshakeClient>
|
||||
+ handshake_client,
|
||||
+ WillCreateWebTransportCallback callback,
|
||||
+ adblock::FilterMatchResult result) {
|
||||
+ const bool has_blocking_filter =
|
||||
+ result == adblock::FilterMatchResult::kBlockRule;
|
||||
+ if (!has_blocking_filter) {
|
||||
+ VLOG(1) << "[eyeo] Web transport allowed for " << url;
|
||||
+ ChromeContentBrowserClient::WillCreateWebTransport(
|
||||
+ process_id, frame_routing_id,
|
||||
+ url, std::move(initiator_origin),
|
||||
+ std::move(handshake_client), std::move(callback));
|
||||
+ return;
|
||||
+ }
|
||||
+ VLOG(1) << "[eyeo] Web transport blocked for " << url;
|
||||
+ std::move(callback).Run(std::move(handshake_client),
|
||||
+ network::mojom::WebTransportError::New(
|
||||
+ net::ERR_BLOCKED_BY_ADMINISTRATOR, quic::QUIC_INTERNAL_ERROR,
|
||||
+ "Blocked", false));
|
||||
+}
|
||||
+
|
||||
bool AdblockContentBrowserClient::WillCreateURLLoaderFactory(
|
||||
content::BrowserContext* browser_context,
|
||||
content::RenderFrameHost* frame,
|
||||
@@ -271,24 +355,12 @@ bool AdblockContentBrowserClient::WillCreateURLLoaderFactory(
|
||||
navigation_id, ukm_source_id, factory_receiver, header_client,
|
||||
bypass_redirect_checks, disable_secure_dns, factory_override,
|
||||
navigation_response_task_runner);
|
||||
- auto* profile = frame ? Profile::FromBrowserContext(
|
||||
- frame->GetProcess()->GetBrowserContext())
|
||||
- : nullptr;
|
||||
-
|
||||
-#if BUILDFLAG(ENABLE_EXTENSIONS)
|
||||
- if (!force_adblock_proxy_for_testing_ &&
|
||||
- request_initiator.scheme() == extensions::kExtensionScheme) {
|
||||
- VLOG(1) << "[eyeo] Do not use adblock proxy for extensions requests "
|
||||
- "[extension id:"
|
||||
- << request_initiator.host() << "].";
|
||||
- return use_chrome_proxy;
|
||||
- }
|
||||
-#endif
|
||||
+ auto* profile = Profile::FromBrowserContext(browser_context);
|
||||
|
||||
bool use_adblock_proxy =
|
||||
- (type == URLLoaderFactoryType::kDocumentSubResource ||
|
||||
- type == URLLoaderFactoryType::kNavigation) &&
|
||||
- IsFilteringNeeded(frame);
|
||||
+ type != URLLoaderFactoryType::kDownload &&
|
||||
+ (frame ? IsFilteringNeeded(frame)
|
||||
+ : IsFilteringNeeded(profile, request_initiator.GetURL().GetAsReferrer()));
|
||||
|
||||
bool use_test_loader = false;
|
||||
#ifdef EYEO_INTERCEPT_DEBUG_URL
|
||||
@@ -307,7 +379,7 @@ bool AdblockContentBrowserClient::WillCreateURLLoaderFactory(
|
||||
mojo::PendingRemote<network::mojom::URLLoaderFactory> target_factory_remote;
|
||||
*factory_receiver = target_factory_remote.InitWithNewPipeAndPassReceiver();
|
||||
AdblockContextData::StartProxying(
|
||||
- profile, frame, render_process_id, std::move(proxied_receiver),
|
||||
+ profile, browser_context, request_initiator, frame, render_process_id, std::move(proxied_receiver),
|
||||
std::move(target_factory_remote), use_test_loader);
|
||||
}
|
||||
return use_adblock_proxy || use_chrome_proxy;
|
||||
diff --git a/chrome/browser/adblock/adblock_content_browser_client.h b/chrome/browser/adblock/adblock_content_browser_client.h
|
||||
--- a/chrome/browser/adblock/adblock_content_browser_client.h
|
||||
+++ b/chrome/browser/adblock/adblock_content_browser_client.h
|
||||
@@ -44,16 +44,27 @@ class AdblockContentBrowserClient : public ChromeContentBrowserClient {
|
||||
static void ForceAdblockProxyForTesting();
|
||||
#endif
|
||||
|
||||
- bool WillInterceptWebSocket(content::RenderFrameHost* frame) override;
|
||||
+ bool WillInterceptWebSocket(content::RenderFrameHost* frame, content::RenderProcessHost* process, const url::Origin& origin) override;
|
||||
void CreateWebSocket(
|
||||
+ content::RenderProcessHost* process,
|
||||
content::RenderFrameHost* frame,
|
||||
WebSocketFactory factory,
|
||||
const GURL& url,
|
||||
+ const url::Origin& initiator_origin,
|
||||
const net::SiteForCookies& site_for_cookies,
|
||||
const absl::optional<std::string>& user_agent,
|
||||
mojo::PendingRemote<network::mojom::WebSocketHandshakeClient>
|
||||
handshake_client) override;
|
||||
|
||||
+ void WillCreateWebTransport(
|
||||
+ int process_id,
|
||||
+ int frame_routing_id,
|
||||
+ const GURL& url,
|
||||
+ const url::Origin& initiator_origin,
|
||||
+ mojo::PendingRemote<network::mojom::WebTransportHandshakeClient>
|
||||
+ handshake_client,
|
||||
+ WillCreateWebTransportCallback callback) override;
|
||||
+
|
||||
bool WillCreateURLLoaderFactory(
|
||||
content::BrowserContext* browser_context,
|
||||
content::RenderFrameHost* frame,
|
||||
@@ -73,23 +84,35 @@ class AdblockContentBrowserClient : public ChromeContentBrowserClient {
|
||||
|
||||
private:
|
||||
void CreateWebSocketInternal(
|
||||
+ content::RenderProcessHost* process,
|
||||
content::GlobalRenderFrameHostId render_frame_host_id,
|
||||
WebSocketFactory factory,
|
||||
const GURL& url,
|
||||
+ const url::Origin& initiator_origin,
|
||||
const net::SiteForCookies& site_for_cookies,
|
||||
const absl::optional<std::string>& user_agent,
|
||||
mojo::PendingRemote<network::mojom::WebSocketHandshakeClient>
|
||||
handshake_client);
|
||||
void OnWebSocketFilterCheckCompleted(
|
||||
+ content::RenderProcessHost* process,
|
||||
content::GlobalRenderFrameHostId render_frame_host_id,
|
||||
ChromeContentBrowserClient::WebSocketFactory factory,
|
||||
const GURL& url,
|
||||
+ const url::Origin& initiator_origin,
|
||||
const net::SiteForCookies& site_for_cookies,
|
||||
const absl::optional<std::string>& user_agent,
|
||||
mojo::PendingRemote<network::mojom::WebSocketHandshakeClient>
|
||||
handshake_client,
|
||||
adblock::FilterMatchResult result);
|
||||
-
|
||||
+ void OnWebTransportFilterCheckCompleted(
|
||||
+ int process_id,
|
||||
+ int frame_routing_id,
|
||||
+ const GURL& url,
|
||||
+ const url::Origin& initiator_origin,
|
||||
+ mojo::PendingRemote<network::mojom::WebTransportHandshakeClient>
|
||||
+ handshake_client,
|
||||
+ WillCreateWebTransportCallback callback,
|
||||
+ adblock::FilterMatchResult result);
|
||||
base::WeakPtrFactory<AdblockContentBrowserClient> weak_factory_{this};
|
||||
|
||||
#if BUILDFLAG(ENABLE_EXTENSIONS)
|
||||
diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc
|
||||
--- a/chrome/browser/chrome_content_browser_client.cc
|
||||
+++ b/chrome/browser/chrome_content_browser_client.cc
|
||||
@@ -6252,7 +6252,9 @@ ChromeContentBrowserClient::
|
||||
}
|
||||
|
||||
bool ChromeContentBrowserClient::WillInterceptWebSocket(
|
||||
- content::RenderFrameHost* frame) {
|
||||
+ content::RenderFrameHost* frame,
|
||||
+ content::RenderProcessHost* process,
|
||||
+ const url::Origin& origin) {
|
||||
#if BUILDFLAG(ENABLE_EXTENSIONS)
|
||||
if (!frame) {
|
||||
return false;
|
||||
@@ -6273,9 +6275,11 @@ bool ChromeContentBrowserClient::WillInterceptWebSocket(
|
||||
}
|
||||
|
||||
void ChromeContentBrowserClient::CreateWebSocket(
|
||||
+ content::RenderProcessHost* process,
|
||||
content::RenderFrameHost* frame,
|
||||
WebSocketFactory factory,
|
||||
const GURL& url,
|
||||
+ const url::Origin& initiator_origin,
|
||||
const net::SiteForCookies& site_for_cookies,
|
||||
const absl::optional<std::string>& user_agent,
|
||||
mojo::PendingRemote<network::mojom::WebSocketHandshakeClient>
|
||||
diff --git a/chrome/browser/chrome_content_browser_client.h b/chrome/browser/chrome_content_browser_client.h
|
||||
--- a/chrome/browser/chrome_content_browser_client.h
|
||||
+++ b/chrome/browser/chrome_content_browser_client.h
|
||||
@@ -610,11 +610,15 @@ class ChromeContentBrowserClient : public content::ContentBrowserClient {
|
||||
CreateURLLoaderHandlerForServiceWorkerNavigationPreload(
|
||||
int frame_tree_node_id,
|
||||
const network::ResourceRequest& resource_request) override;
|
||||
- bool WillInterceptWebSocket(content::RenderFrameHost* frame) override;
|
||||
+ bool WillInterceptWebSocket(content::RenderFrameHost* frame,
|
||||
+ content::RenderProcessHost* process,
|
||||
+ const url::Origin& origin) override;
|
||||
void CreateWebSocket(
|
||||
+ content::RenderProcessHost* process,
|
||||
content::RenderFrameHost* frame,
|
||||
WebSocketFactory factory,
|
||||
const GURL& url,
|
||||
+ const url::Origin& initiator_origin,
|
||||
const net::SiteForCookies& site_for_cookies,
|
||||
const absl::optional<std::string>& user_agent,
|
||||
mojo::PendingRemote<network::mojom::WebSocketHandshakeClient>
|
||||
diff --git a/components/adblock/content/browser/adblock_url_loader_factory.cc b/components/adblock/content/browser/adblock_url_loader_factory.cc
|
||||
--- a/components/adblock/content/browser/adblock_url_loader_factory.cc
|
||||
+++ b/components/adblock/content/browser/adblock_url_loader_factory.cc
|
||||
@@ -342,12 +342,6 @@ void AdblockURLLoaderFactory::InProgressRequest::OnRequestError(
|
||||
|
||||
void AdblockURLLoaderFactory::InProgressRequest::CheckFilterMatch(
|
||||
CheckFilterMatchCallback callback) {
|
||||
- if (!factory_->CheckHostValid()) {
|
||||
- PostFilterMatchCallbackToUI(std::move(callback),
|
||||
- FilterMatchResult::kNoRule);
|
||||
- return;
|
||||
- }
|
||||
-
|
||||
auto subscription_service = factory_->config_.subscription_service;
|
||||
if (is_document_request_) {
|
||||
auto* host = content::RenderFrameHost::FromID(factory_->host_id_);
|
||||
@@ -386,7 +380,7 @@ void AdblockURLLoaderFactory::InProgressRequest::CheckFilterMatch(
|
||||
} else {
|
||||
factory_->config_.resource_classifier->CheckRequestFilterMatch(
|
||||
subscription_service->GetCurrentSnapshot(), request_url_,
|
||||
- adblock_resource_type_, factory_->host_id_,
|
||||
+ factory_->request_initiator_, adblock_resource_type_, factory_->host_id_,
|
||||
base::BindOnce(
|
||||
&AdblockURLLoaderFactory::InProgressRequest::OnRequestUrlClassified,
|
||||
weak_factory_.GetWeakPtr(),
|
||||
@@ -675,12 +669,14 @@ void AdblockURLLoaderFactory::InProgressRequest::OnRequestFilterMatchResult(
|
||||
|
||||
AdblockURLLoaderFactory::AdblockURLLoaderFactory(
|
||||
AdblockURLLoaderFactoryConfig config,
|
||||
+ GURL request_initiator,
|
||||
content::GlobalRenderFrameHostId host_id,
|
||||
mojo::PendingReceiver<network::mojom::URLLoaderFactory> receiver,
|
||||
mojo::PendingRemote<network::mojom::URLLoaderFactory> target_factory,
|
||||
std::string user_agent_string,
|
||||
DisconnectCallback on_disconnect)
|
||||
: config_(std::move(config)),
|
||||
+ request_initiator_(std::move(request_initiator)),
|
||||
host_id_(host_id),
|
||||
user_agent_string_(std::move(user_agent_string)),
|
||||
on_disconnect_(std::move(on_disconnect)) {
|
||||
diff --git a/components/adblock/content/browser/adblock_url_loader_factory.h b/components/adblock/content/browser/adblock_url_loader_factory.h
|
||||
--- a/components/adblock/content/browser/adblock_url_loader_factory.h
|
||||
+++ b/components/adblock/content/browser/adblock_url_loader_factory.h
|
||||
@@ -25,6 +25,7 @@
|
||||
#include "mojo/public/cpp/bindings/receiver_set.h"
|
||||
#include "mojo/public/cpp/bindings/remote.h"
|
||||
#include "services/network/public/mojom/url_loader_factory.mojom.h"
|
||||
+#include "url/gurl.h"
|
||||
|
||||
namespace adblock {
|
||||
|
||||
@@ -49,6 +50,7 @@ class AdblockURLLoaderFactory : public network::mojom::URLLoaderFactory {
|
||||
|
||||
AdblockURLLoaderFactory(
|
||||
AdblockURLLoaderFactoryConfig config,
|
||||
+ GURL request_initiator,
|
||||
content::GlobalRenderFrameHostId host_id,
|
||||
mojo::PendingReceiver<network::mojom::URLLoaderFactory> receiver,
|
||||
mojo::PendingRemote<network::mojom::URLLoaderFactory> target_factory,
|
||||
@@ -78,6 +80,7 @@ class AdblockURLLoaderFactory : public network::mojom::URLLoaderFactory {
|
||||
void MaybeDestroySelf();
|
||||
|
||||
AdblockURLLoaderFactoryConfig config_;
|
||||
+ const GURL request_initiator_;
|
||||
content::GlobalRenderFrameHostId host_id_;
|
||||
mojo::ReceiverSet<network::mojom::URLLoaderFactory> proxy_receivers_;
|
||||
std::set<std::unique_ptr<InProgressRequest>, base::UniquePtrComparator>
|
||||
diff --git a/components/adblock/content/browser/frame_hierarchy_builder.cc b/components/adblock/content/browser/frame_hierarchy_builder.cc
|
||||
--- a/components/adblock/content/browser/frame_hierarchy_builder.cc
|
||||
+++ b/components/adblock/content/browser/frame_hierarchy_builder.cc
|
||||
@@ -76,9 +76,8 @@ std::vector<GURL> FrameHierarchyBuilder::BuildFrameHierarchy(
|
||||
content::RenderFrameHost* host) const {
|
||||
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
|
||||
|
||||
- DCHECK(host) << "RenderFrameHost is needed to build frame hierarchy";
|
||||
-
|
||||
std::vector<GURL> referrers_chain;
|
||||
+ if (!host) return referrers_chain;
|
||||
for (auto* iter = host; iter; iter = iter->GetParent()) {
|
||||
auto last_commited_referrer = GetUrlAsReferrer(iter);
|
||||
if (IsValidForFrameHierarchy(last_commited_referrer)) {
|
||||
diff --git a/components/adblock/content/browser/resource_classification_runner.h b/components/adblock/content/browser/resource_classification_runner.h
|
||||
--- a/components/adblock/content/browser/resource_classification_runner.h
|
||||
+++ b/components/adblock/content/browser/resource_classification_runner.h
|
||||
@@ -81,14 +81,22 @@ class ResourceClassificationRunner : public KeyedService {
|
||||
virtual void CheckRequestFilterMatch(
|
||||
SubscriptionService::Snapshot subscription_collections,
|
||||
const GURL& request_url,
|
||||
+ const GURL& request_initiator,
|
||||
ContentType adblock_resource_type,
|
||||
content::GlobalRenderFrameHostId render_frame_host_id,
|
||||
CheckFilterMatchCallback callback) = 0;
|
||||
virtual void CheckRequestFilterMatchForWebSocket(
|
||||
SubscriptionService::Snapshot subscription_collections,
|
||||
const GURL& request_url,
|
||||
+ const GURL& request_initiator,
|
||||
content::GlobalRenderFrameHostId render_frame_host_id,
|
||||
CheckFilterMatchCallback callback) = 0;
|
||||
+ virtual void CheckRequestFilterMatchForWebTransport(
|
||||
+ SubscriptionService::Snapshot subscription_collections,
|
||||
+ const GURL& request_url,
|
||||
+ const GURL& request_initiator,
|
||||
+ content::GlobalRenderFrameHostId render_frame_host_id,
|
||||
+ CheckFilterMatchCallback callback);
|
||||
// No callback, just notify observers
|
||||
virtual void CheckDocumentAllowlisted(
|
||||
SubscriptionService::Snapshot subscription_collection,
|
||||
diff --git a/components/adblock/content/browser/resource_classification_runner_impl.cc b/components/adblock/content/browser/resource_classification_runner_impl.cc
|
||||
--- a/components/adblock/content/browser/resource_classification_runner_impl.cc
|
||||
+++ b/components/adblock/content/browser/resource_classification_runner_impl.cc
|
||||
@@ -169,15 +169,28 @@ void ResourceClassificationRunnerImpl::CheckPopupFilterMatch(
|
||||
void ResourceClassificationRunnerImpl::CheckRequestFilterMatchForWebSocket(
|
||||
SubscriptionService::Snapshot subscription_collections,
|
||||
const GURL& request_url,
|
||||
+ const GURL& request_initiator,
|
||||
content::GlobalRenderFrameHostId render_frame_host_id,
|
||||
CheckFilterMatchCallback callback) {
|
||||
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
|
||||
DCHECK(request_url.SchemeIsWSOrWSS());
|
||||
- CheckRequestFilterMatch(std::move(subscription_collections), request_url,
|
||||
+ CheckRequestFilterMatch(std::move(subscription_collections), request_url, request_initiator,
|
||||
ContentType::Websocket, render_frame_host_id,
|
||||
std::move(callback));
|
||||
}
|
||||
|
||||
+void ResourceClassificationRunnerImpl::CheckRequestFilterMatchForWebTransport(
|
||||
+ SubscriptionService::Snapshot subscription_collections,
|
||||
+ const GURL& request_url,
|
||||
+ const GURL& request_initiator,
|
||||
+ content::GlobalRenderFrameHostId render_frame_host_id,
|
||||
+ CheckFilterMatchCallback callback) {
|
||||
+ DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
|
||||
+ CheckRequestFilterMatch(std::move(subscription_collections), request_url, request_initiator,
|
||||
+ ContentType::Other, render_frame_host_id,
|
||||
+ std::move(callback));
|
||||
+}
|
||||
+
|
||||
void ResourceClassificationRunnerImpl::CheckDocumentAllowlisted(
|
||||
SubscriptionService::Snapshot subscription_collections,
|
||||
const GURL& request_url,
|
||||
@@ -212,6 +225,7 @@ void ResourceClassificationRunnerImpl::ProcessDocumentAllowlistedResponse(
|
||||
void ResourceClassificationRunnerImpl::CheckRequestFilterMatch(
|
||||
SubscriptionService::Snapshot subscription_collections,
|
||||
const GURL& request_url,
|
||||
+ const GURL& request_initiator,
|
||||
ContentType adblock_resource_type,
|
||||
content::GlobalRenderFrameHostId frame_host_id,
|
||||
CheckFilterMatchCallback callback) {
|
||||
@@ -220,14 +234,10 @@ void ResourceClassificationRunnerImpl::CheckRequestFilterMatch(
|
||||
DVLOG(1) << "[eyeo] CheckRequestFilterMatchImpl for " << request_url.spec();
|
||||
|
||||
auto* host = content::RenderFrameHost::FromID(frame_host_id);
|
||||
- if (!host) {
|
||||
- // Host has died, likely because this is a deferred execution. It does not
|
||||
- // matter anymore whether the resource is blocked, the page is gone.
|
||||
- std::move(callback).Run(FilterMatchResult::kNoRule);
|
||||
- return;
|
||||
- }
|
||||
- const std::vector<GURL> frame_hierarchy_chain =
|
||||
+ std::vector<GURL> frame_hierarchy_chain =
|
||||
frame_hierarchy_builder_->BuildFrameHierarchy(host);
|
||||
+ if (!host && frame_hierarchy_chain.size() == 0)
|
||||
+ frame_hierarchy_chain.emplace_back(request_initiator.GetAsReferrer());
|
||||
|
||||
DVLOG(1) << "[eyeo] Got " << frame_hierarchy_chain.size()
|
||||
<< " frame_hierarchy for " << request_url.spec();
|
||||
@@ -275,7 +285,8 @@ ResourceClassificationRunnerImpl::CheckRequestFilterMatchInternal(
|
||||
adblock_resource_type, sitekey);
|
||||
|
||||
if (classification_result.decision == ClassificationDecision::Allowed) {
|
||||
- VLOG(1) << "[eyeo] Document allowed due to allowing filter " << request_url;
|
||||
+ VLOG(1) << "[eyeo] Document allowed due to allowing filter " << request_url
|
||||
+ << " " << classification_result.decisive_subscription.spec();
|
||||
return CheckResourceFilterMatchResult{
|
||||
FilterMatchResult::kAllowRule,
|
||||
classification_result.decisive_subscription,
|
||||
@@ -290,6 +301,7 @@ ResourceClassificationRunnerImpl::CheckRequestFilterMatchInternal(
|
||||
classification_result.decisive_configuration_name};
|
||||
}
|
||||
|
||||
+ VLOG(1) << "[eyeo] No Rule for " << request_url;
|
||||
return CheckResourceFilterMatchResult{FilterMatchResult::kNoRule, {}, {}};
|
||||
}
|
||||
|
||||
diff --git a/components/adblock/content/browser/resource_classification_runner_impl.h b/components/adblock/content/browser/resource_classification_runner_impl.h
|
||||
--- a/components/adblock/content/browser/resource_classification_runner_impl.h
|
||||
+++ b/components/adblock/content/browser/resource_classification_runner_impl.h
|
||||
@@ -55,12 +55,14 @@ class ResourceClassificationRunnerImpl final
|
||||
void CheckRequestFilterMatch(
|
||||
SubscriptionService::Snapshot subscription_collections,
|
||||
const GURL& request_url,
|
||||
+ const GURL& request_initiator,
|
||||
ContentType adblock_resource_type,
|
||||
content::GlobalRenderFrameHostId render_frame_host_id,
|
||||
CheckFilterMatchCallback callback) final;
|
||||
void CheckRequestFilterMatchForWebSocket(
|
||||
SubscriptionService::Snapshot subscription_collections,
|
||||
const GURL& request_url,
|
||||
+ const GURL& request_initiator,
|
||||
content::GlobalRenderFrameHostId render_frame_host_id,
|
||||
CheckFilterMatchCallback callback) final;
|
||||
// No callback, just notify observers
|
||||
@@ -68,6 +70,12 @@ class ResourceClassificationRunnerImpl final
|
||||
SubscriptionService::Snapshot subscription_collections,
|
||||
const GURL& request_url,
|
||||
content::GlobalRenderFrameHostId render_frame_host_id) final;
|
||||
+ void CheckRequestFilterMatchForWebTransport(
|
||||
+ SubscriptionService::Snapshot subscription_collections,
|
||||
+ const GURL& request_url,
|
||||
+ const GURL& request_initiator,
|
||||
+ content::GlobalRenderFrameHostId render_frame_host_id,
|
||||
+ CheckFilterMatchCallback callback) final;
|
||||
void CheckResponseFilterMatch(
|
||||
SubscriptionService::Snapshot subscription_collections,
|
||||
const GURL& response_url,
|
||||
diff --git a/content/browser/websockets/websocket_connector_impl.cc b/content/browser/websockets/websocket_connector_impl.cc
|
||||
--- a/content/browser/websockets/websocket_connector_impl.cc
|
||||
+++ b/content/browser/websockets/websocket_connector_impl.cc
|
||||
@@ -87,14 +87,14 @@ void WebSocketConnectorImpl::Connect(
|
||||
const uint32_t options =
|
||||
GetContentClient()->browser()->GetWebSocketOptions(frame);
|
||||
|
||||
- if (GetContentClient()->browser()->WillInterceptWebSocket(frame)) {
|
||||
+ if (GetContentClient()->browser()->WillInterceptWebSocket(frame, process, origin_)) {
|
||||
GetContentClient()->browser()->CreateWebSocket(
|
||||
- frame,
|
||||
+ process, frame,
|
||||
base::BindOnce(ConnectCalledByContentBrowserClient, requested_protocols,
|
||||
site_for_cookies, isolation_info_, process_id_,
|
||||
frame_id_, origin_, options,
|
||||
std::move(throttling_profile_id)),
|
||||
- url, site_for_cookies, user_agent, std::move(handshake_client));
|
||||
+ url, origin_, site_for_cookies, user_agent, std::move(handshake_client));
|
||||
return;
|
||||
}
|
||||
std::vector<network::mojom::HttpHeaderPtr> headers;
|
||||
diff --git a/content/public/browser/content_browser_client.cc b/content/public/browser/content_browser_client.cc
|
||||
--- a/content/public/browser/content_browser_client.cc
|
||||
+++ b/content/public/browser/content_browser_client.cc
|
||||
@@ -967,7 +967,7 @@ bool ContentBrowserClient::WillCreateURLLoaderFactory(
|
||||
return false;
|
||||
}
|
||||
|
||||
-bool ContentBrowserClient::WillInterceptWebSocket(RenderFrameHost*) {
|
||||
+bool ContentBrowserClient::WillInterceptWebSocket(RenderFrameHost*, RenderProcessHost*, const url::Origin& origin) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -976,9 +976,11 @@ uint32_t ContentBrowserClient::GetWebSocketOptions(RenderFrameHost* frame) {
|
||||
}
|
||||
|
||||
void ContentBrowserClient::CreateWebSocket(
|
||||
+ RenderProcessHost* process,
|
||||
RenderFrameHost* frame,
|
||||
WebSocketFactory factory,
|
||||
const GURL& url,
|
||||
+ const url::Origin& initiator_origin,
|
||||
const net::SiteForCookies& site_for_cookies,
|
||||
const absl::optional<std::string>& user_agent,
|
||||
mojo::PendingRemote<network::mojom::WebSocketHandshakeClient>
|
||||
diff --git a/content/public/browser/content_browser_client.h b/content/public/browser/content_browser_client.h
|
||||
--- a/content/public/browser/content_browser_client.h
|
||||
+++ b/content/public/browser/content_browser_client.h
|
||||
@@ -1746,7 +1746,7 @@ class CONTENT_EXPORT ContentBrowserClient {
|
||||
scoped_refptr<base::SequencedTaskRunner> navigation_response_task_runner);
|
||||
|
||||
// Returns true when the embedder wants to intercept a websocket connection.
|
||||
- virtual bool WillInterceptWebSocket(RenderFrameHost* frame);
|
||||
+ virtual bool WillInterceptWebSocket(RenderFrameHost* frame, RenderProcessHost* process, const url::Origin& origin);
|
||||
|
||||
// Returns the WebSocket creation options.
|
||||
virtual uint32_t GetWebSocketOptions(RenderFrameHost* frame);
|
||||
@@ -1768,9 +1768,11 @@ class CONTENT_EXPORT ContentBrowserClient {
|
||||
// Always called on the UI thread and only when the Network Service is
|
||||
// enabled.
|
||||
virtual void CreateWebSocket(
|
||||
+ RenderProcessHost* process,
|
||||
RenderFrameHost* frame,
|
||||
WebSocketFactory factory,
|
||||
const GURL& url,
|
||||
+ const url::Origin& initiator_origin,
|
||||
const net::SiteForCookies& site_for_cookies,
|
||||
const absl::optional<std::string>& user_agent,
|
||||
mojo::PendingRemote<network::mojom::WebSocketHandshakeClient>
|
||||
--
|
||||
2.25.1
|
||||
@@ -384,7 +384,7 @@ diff --git a/chrome/browser/profiles/android/profile_manager_utils.cc b/chrome/b
|
||||
diff --git a/chrome/browser/profiles/profile_manager.cc b/chrome/browser/profiles/profile_manager.cc
|
||||
--- a/chrome/browser/profiles/profile_manager.cc
|
||||
+++ b/chrome/browser/profiles/profile_manager.cc
|
||||
@@ -1449,6 +1449,19 @@ void ProfileManager::DoFinalInit(ProfileInfo* profile_info,
|
||||
@@ -1451,6 +1451,19 @@ void ProfileManager::DoFinalInit(ProfileInfo* profile_info,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ diff --git a/third_party/blink/renderer/modules/webgpu/gpu.cc b/third_party/blin
|
||||
"WebGPU is experimental on this platform. See "
|
||||
"https://github.com/gpuweb/gpuweb/wiki/"
|
||||
"Implementation-Status#implementation-status"));
|
||||
+ (UAZO) add exception
|
||||
+ //(UAZO) add site setting
|
||||
}
|
||||
|
||||
auto* resolver = MakeGarbageCollected<ScriptPromiseResolver>(script_state);
|
||||
|
||||
@@ -5,12 +5,11 @@ Subject: Eyeo Adblock for Bromite
|
||||
Change the normal behaviour of Eyeo Chromium SDK to
|
||||
suit Bromite logic
|
||||
---
|
||||
.../android/java/res/xml/main_preferences.xml | 11 +-
|
||||
.../android/java/res/xml/main_preferences.xml | 19 +-
|
||||
chrome/browser/BUILD.gn | 2 -
|
||||
.../adblock/adblock_content_browser_client.cc | 26 +-
|
||||
.../adblock/subscription_service_factory.h | 1 +
|
||||
chrome/browser/android/adblock/adblock_jni.cc | 50 +-
|
||||
.../adblock_private/adblock_private_api.cc | 68 +-
|
||||
.../adblock_private/adblock_private_api.cc | 66 +-
|
||||
.../api/adblock_private/adblock_private_api.h | 49 +
|
||||
.../eyeo_filtering_private_api.cc | 20 +-
|
||||
...hrome_browser_main_extra_parts_profiles.cc | 2 -
|
||||
@@ -24,12 +23,12 @@ suit Bromite logic
|
||||
chrome/browser/resources/settings/router.ts | 1 +
|
||||
chrome/browser/resources/settings/settings.ts | 1 +
|
||||
.../settings/settings_menu/settings_menu.html | 5 +
|
||||
chrome/browser/ui/tab_helpers.cc | 5 +-
|
||||
chrome/browser/ui/tab_helpers.cc | 6 +-
|
||||
.../extensions/api/_permission_features.json | 8 -
|
||||
.../common/extensions/api/adblock_private.idl | 8 +
|
||||
chrome/test/BUILD.gn | 5 -
|
||||
components/adblock/android/BUILD.gn | 2 +-
|
||||
.../adblock/android/adblock_strings.grd | 48 +-
|
||||
components/adblock/android/BUILD.gn | 4 +-
|
||||
.../adblock/android/adblock_strings.grd | 54 +-
|
||||
.../java/res/layout/adblock_custom_item.xml | 14 +-
|
||||
.../layout/adblock_filter_lists_list_item.xml | 15 +
|
||||
...ences.xml => eyeo_adblock_preferences.xml} | 39 +-
|
||||
@@ -40,25 +39,24 @@ suit Bromite logic
|
||||
.../settings/AdblockCustomItemFragment.java | 20 +-
|
||||
.../settings/AdblockFilterListsAdapter.java | 6 +
|
||||
.../settings/AdblockSettingsFragment.java | 45 +-
|
||||
components/adblock/content/browser/BUILD.gn | 16 +-
|
||||
.../adblock_controller_factory_base.cc | 2 +-
|
||||
.../adblock_telemetry_service_factory_base.cc | 49 -
|
||||
.../adblock_telemetry_service_factory_base.h | 24 -
|
||||
components/adblock/content/browser/BUILD.gn | 18 +-
|
||||
.../adblock_controller_factory_base.cc | 5 +-
|
||||
.../browser/adblock_webcontents_observer.cc | 25 +-
|
||||
.../browser/adblock_webcontents_observer.h | 5 +-
|
||||
.../content_security_policy_injector_impl.cc | 1 +
|
||||
.../subscription_service_factory_base.cc | 10 +-
|
||||
.../subscription_service_factory_base.cc | 11 +-
|
||||
.../subscription_service_factory_base.h | 1 +
|
||||
components/adblock/core/BUILD.gn | 39 -
|
||||
.../activeping_telemetry_topic_provider.cc | 243 --
|
||||
.../activeping_telemetry_topic_provider.h | 84 -
|
||||
components/adblock/core/adblock_controller.h | 6 +
|
||||
.../adblock/core/adblock_controller_impl.cc | 35 +-
|
||||
.../adblock/core/adblock_controller_impl.h | 5 +
|
||||
components/adblock/core/adblock_controller.h | 8 +
|
||||
.../adblock/core/adblock_controller_impl.cc | 58 +-
|
||||
.../adblock/core/adblock_controller_impl.h | 7 +
|
||||
components/adblock/core/adblock_switches.cc | 1 -
|
||||
components/adblock/core/adblock_switches.h | 1 -
|
||||
.../adblock/core/adblock_telemetry_service.cc | 244 --
|
||||
.../adblock/core/adblock_telemetry_service.h | 107 -
|
||||
components/adblock/core/common/BUILD.gn | 10 -
|
||||
components/adblock/core/common/BUILD.gn | 8 -
|
||||
.../adblock/core/common/adblock_constants.cc | 2 -
|
||||
.../adblock/core/common/adblock_constants.h | 1 -
|
||||
.../adblock/core/common/adblock_prefs.cc | 47 +-
|
||||
@@ -107,8 +105,9 @@ suit Bromite logic
|
||||
.../blink/renderer/core/css/style_engine.cc | 8 +
|
||||
.../blink/renderer/core/css/style_engine.h | 1 +
|
||||
.../renderer/core/exported/web_document.cc | 13 +-
|
||||
tools/gritsettings/resource_ids.spec | 9 +-
|
||||
.../definitions/adblock_private.d.ts | 14 +
|
||||
103 files changed, 5038 insertions(+), 1142 deletions(-)
|
||||
102 files changed, 5079 insertions(+), 1083 deletions(-)
|
||||
create mode 100644 chrome/browser/resources/settings/adblock_page/adblock_page.html
|
||||
create mode 100644 chrome/browser/resources/settings/adblock_page/adblock_page.ts
|
||||
rename components/adblock/android/java/res/xml/{adblock_preferences.xml => eyeo_adblock_preferences.xml} (56%)
|
||||
@@ -138,15 +137,30 @@ diff --git a/chrome/android/java/res/xml/main_preferences.xml b/chrome/android/j
|
||||
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:orderingFromXml="false">
|
||||
@@ -106,7 +97,7 @@ Use of this source code is governed by the GPLv3 that can be found in the compon
|
||||
android:title="@string/prefs_accessibility"/>
|
||||
<Preference
|
||||
android:fragment="org.chromium.components.adblock.settings.AdblockSettingsFragment"
|
||||
- android:key="adblock"
|
||||
@@ -75,6 +66,11 @@ Use of this source code is governed by the GPLv3 that can be found in the compon
|
||||
android:key="safety_check"
|
||||
android:order="12"
|
||||
android:title="@string/prefs_safety_check"/>
|
||||
+ <Preference
|
||||
+ android:fragment="org.chromium.components.adblock.settings.AdblockSettingsFragment"
|
||||
+ android:key="eyeo_adblock"
|
||||
android:order="18"
|
||||
android:title="@string/adblock_settings_title" />
|
||||
+ android:order="13"
|
||||
+ android:title="@string/adblock_settings_title" />
|
||||
<Preference
|
||||
android:key="notifications"
|
||||
android:order="13"
|
||||
@@ -104,11 +100,6 @@ Use of this source code is governed by the GPLv3 that can be found in the compon
|
||||
android:key="accessibility"
|
||||
android:order="18"
|
||||
android:title="@string/prefs_accessibility"/>
|
||||
- <Preference
|
||||
- android:fragment="org.chromium.components.adblock.settings.AdblockSettingsFragment"
|
||||
- android:key="adblock"
|
||||
- android:order="18"
|
||||
- android:title="@string/adblock_settings_title" />
|
||||
<Preference
|
||||
android:fragment="org.chromium.components.browser_ui.site_settings.SiteSettings"
|
||||
android:key="content_settings"
|
||||
diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
|
||||
--- a/chrome/browser/BUILD.gn
|
||||
+++ b/chrome/browser/BUILD.gn
|
||||
@@ -209,17 +223,6 @@ diff --git a/chrome/browser/adblock/adblock_content_browser_client.cc b/chrome/b
|
||||
auto proxy = std::make_unique<adblock::AdblockURLLoaderFactory>(
|
||||
std::move(config),
|
||||
content::GlobalRenderFrameHostId(render_process_id,
|
||||
diff --git a/chrome/browser/adblock/subscription_service_factory.h b/chrome/browser/adblock/subscription_service_factory.h
|
||||
--- a/chrome/browser/adblock/subscription_service_factory.h
|
||||
+++ b/chrome/browser/adblock/subscription_service_factory.h
|
||||
@@ -34,6 +34,7 @@ class SubscriptionServiceFactory : public SubscriptionServiceFactoryBase {
|
||||
protected:
|
||||
PrefService* GetPrefs(content::BrowserContext* context) const override;
|
||||
SubscriptionPersistentMetadata* GetSubscriptionPersistentMetadata(
|
||||
+ bool allow_privileged_filter,
|
||||
content::BrowserContext* context) const override;
|
||||
|
||||
private:
|
||||
diff --git a/chrome/browser/android/adblock/adblock_jni.cc b/chrome/browser/android/adblock/adblock_jni.cc
|
||||
--- a/chrome/browser/android/adblock/adblock_jni.cc
|
||||
+++ b/chrome/browser/android/adblock/adblock_jni.cc
|
||||
@@ -414,15 +417,6 @@ diff --git a/chrome/browser/extensions/api/adblock_private/adblock_private_api.c
|
||||
AdblockPrivateSetEnabledFunction::AdblockPrivateSetEnabledFunction() {}
|
||||
|
||||
AdblockPrivateSetEnabledFunction::~AdblockPrivateSetEnabledFunction() {}
|
||||
@@ -403,7 +431,7 @@ AdblockPrivateIsAcceptableAdsEnabledFunction::Run() {
|
||||
browser_context());
|
||||
return RespondNow(ArgumentList(
|
||||
api::adblock_private::IsAcceptableAdsEnabled::Results::Create(
|
||||
- controller->IsAcceptableAdsEnabled())));
|
||||
+ controller, controller->IsAcceptableAdsEnabled())));
|
||||
}
|
||||
|
||||
AdblockPrivateGetBuiltInSubscriptionsFunction::
|
||||
@@ -486,7 +514,7 @@ AdblockPrivateGetInstalledSubscriptionsFunction::Run() {
|
||||
browser_context());
|
||||
return RespondNow(ArgumentList(
|
||||
@@ -1169,7 +1163,15 @@ diff --git a/chrome/browser/resources/settings/settings_menu/settings_menu.html
|
||||
diff --git a/chrome/browser/ui/tab_helpers.cc b/chrome/browser/ui/tab_helpers.cc
|
||||
--- a/chrome/browser/ui/tab_helpers.cc
|
||||
+++ b/chrome/browser/ui/tab_helpers.cc
|
||||
@@ -353,6 +353,8 @@ void TabHelpers::AttachTabHelpers(WebContents* web_contents) {
|
||||
@@ -21,6 +21,7 @@
|
||||
#include "chrome/browser/adblock/element_hider_factory.h"
|
||||
#include "chrome/browser/adblock/sitekey_storage_factory.h"
|
||||
#include "chrome/browser/adblock/subscription_service_factory.h"
|
||||
+#include "chrome/browser/adblock/adblock_controller_factory.h"
|
||||
#include "chrome/browser/bookmarks/bookmark_model_factory.h"
|
||||
#include "chrome/browser/breadcrumbs/breadcrumb_manager_tab_helper.h"
|
||||
#include "chrome/browser/browser_process.h"
|
||||
@@ -349,6 +350,8 @@ void TabHelpers::AttachTabHelpers(WebContents* web_contents) {
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -1178,7 +1180,7 @@ diff --git a/chrome/browser/ui/tab_helpers.cc b/chrome/browser/ui/tab_helpers.cc
|
||||
AdblockWebContentObserver::CreateForWebContents(
|
||||
web_contents,
|
||||
adblock::SubscriptionServiceFactory::GetForBrowserContext(
|
||||
@@ -361,7 +363,8 @@ void TabHelpers::AttachTabHelpers(WebContents* web_contents) {
|
||||
@@ -357,7 +360,8 @@ void TabHelpers::AttachTabHelpers(WebContents* web_contents) {
|
||||
web_contents->GetBrowserContext()),
|
||||
adblock::SitekeyStorageFactory::GetForBrowserContext(
|
||||
web_contents->GetBrowserContext()),
|
||||
@@ -1263,6 +1265,15 @@ diff --git a/chrome/test/BUILD.gn b/chrome/test/BUILD.gn
|
||||
diff --git a/components/adblock/android/BUILD.gn b/components/adblock/android/BUILD.gn
|
||||
--- a/components/adblock/android/BUILD.gn
|
||||
+++ b/components/adblock/android/BUILD.gn
|
||||
@@ -53,7 +53,7 @@ android_library("adblock_java") {
|
||||
"//third_party/androidx:androidx_preference_preference_java",
|
||||
]
|
||||
|
||||
- annotation_processor_deps = [ "//base/android/jni_generator:jni_processor" ]
|
||||
+ srcjar_deps = [ ":jni_headers" ]
|
||||
resources_package = "org.chromium.components.adblock"
|
||||
}
|
||||
|
||||
@@ -91,7 +91,7 @@ android_resources("java_resources") {
|
||||
"java/res/layout/adblock_custom_item_settings.xml",
|
||||
"java/res/layout/adblock_filter_lists_list_item.xml",
|
||||
@@ -1275,10 +1286,13 @@ diff --git a/components/adblock/android/BUILD.gn b/components/adblock/android/BU
|
||||
diff --git a/components/adblock/android/adblock_strings.grd b/components/adblock/android/adblock_strings.grd
|
||||
--- a/components/adblock/android/adblock_strings.grd
|
||||
+++ b/components/adblock/android/adblock_strings.grd
|
||||
@@ -188,8 +188,50 @@
|
||||
@@ -186,10 +186,52 @@
|
||||
<release seq="1">
|
||||
<messages fallback_to_english="true">
|
||||
<message name="IDS_ADBLOCK_SETTINGS_TITLE" desc="Title of Adblock settings menu item [CHAR-LIMIT=12]">
|
||||
Ad blocking
|
||||
</message>
|
||||
- Ad blocking
|
||||
+ Adblock Plus settings
|
||||
+ </message>
|
||||
+ <message name="IDS_ADBLOCK_SETTINGS_ENABLE" desc="">
|
||||
+ Enable Adblock Plus
|
||||
+ </message>
|
||||
@@ -1320,31 +1334,39 @@ diff --git a/components/adblock/android/adblock_strings.grd b/components/adblock
|
||||
+ </message>
|
||||
+ <message name="IDS_FRAGMENT_ADBLOCK_MORE_OPTIONS_CUSTOM_FILTERS_TITLE_COUNT" desc="Title of the Preference and fragment for adding custom filters">
|
||||
+ Custom Filters (<ph name="COUNT">%s</ph> selected)
|
||||
+ </message>
|
||||
</message>
|
||||
<message name="IDS_FRAGMENT_ADBLOCK_SETTINGS_ENABLED_SUMMARY" desc="Summary of SwitchPreference to enable/disable Adblock">
|
||||
- Allow ad blocking on websites in this app
|
||||
+ Block ads on websites
|
||||
</message>
|
||||
<message name="IDS_FRAGMENT_ADBLOCK_SETTINGS_FILTER_LISTS_TITLE" desc="Title of MultiSelectListPreference to choose filter lists">
|
||||
Filter lists
|
||||
@@ -219,7 +261,7 @@
|
||||
Custom ad filtering settings
|
||||
@@ -216,10 +258,10 @@
|
||||
More blocking options
|
||||
</message>
|
||||
<message name="IDS_FRAGMENT_ADBLOCK_MORE_OPTIONS_CUSTOM_FILTER_LISTS_TITLE" desc="Title of the Preference and fragment for adding custom filter lists">
|
||||
- Custom ad filtering settings
|
||||
+ Custom ad filtering urls
|
||||
</message>
|
||||
<message name="IDS_FRAGMENT_ADBLOCK_MORE_OPTIONS_CUSTOM_FILTER_LISTS_SUMMARY" desc="Title of the Preference for adding custom filter lists">
|
||||
- Add custom filter lists
|
||||
+ Add custom filter commands
|
||||
+ Add custom filter urls
|
||||
</message>
|
||||
<message name="IDS_FRAGMENT_ADBLOCK_MORE_OPTIONS_ADD_CUSTOM_FILTER_LIST" desc="Hint shown in a EditView for adding custom filter list URL">
|
||||
https://example.org/myFilterList.txt
|
||||
@@ -228,7 +270,7 @@
|
||||
@@ -228,10 +270,10 @@
|
||||
Custom Filters
|
||||
</message>
|
||||
<message name="IDS_FRAGMENT_ADBLOCK_MORE_OPTIONS_CUSTOM_FILTERS_SUMMARY" desc="Title of the Preference for adding custom filters">
|
||||
- Add custom filters
|
||||
+ Add custom filter urls
|
||||
+ Add custom filter commands
|
||||
</message>
|
||||
<message name="IDS_FRAGMENT_ADBLOCK_MORE_OPTIONS_CUSTOM_FILTERS_HINT" desc="Hint shown in a EditView for adding custom filter">
|
||||
Enter filter
|
||||
- Enter filter
|
||||
+ Enter filter command
|
||||
</message>
|
||||
</messages>
|
||||
</release>
|
||||
diff --git a/components/adblock/android/java/res/layout/adblock_custom_item.xml b/components/adblock/android/java/res/layout/adblock_custom_item.xml
|
||||
--- a/components/adblock/android/java/res/layout/adblock_custom_item.xml
|
||||
+++ b/components/adblock/android/java/res/layout/adblock_custom_item.xml
|
||||
@@ -1873,7 +1895,16 @@ diff --git a/components/adblock/content/browser/BUILD.gn b/components/adblock/co
|
||||
}
|
||||
|
||||
source_set("browser_impl") {
|
||||
@@ -62,15 +55,10 @@ source_set("browser_impl") {
|
||||
@@ -34,8 +27,6 @@ source_set("browser_impl") {
|
||||
"adblock_controller_factory_base.cc",
|
||||
"adblock_controller_factory_base.h",
|
||||
"adblock_filter_match.h",
|
||||
- "adblock_telemetry_service_factory_base.cc",
|
||||
- "adblock_telemetry_service_factory_base.h",
|
||||
"adblock_url_loader_factory.cc",
|
||||
"adblock_url_loader_factory.h",
|
||||
"adblock_webcontents_observer.cc",
|
||||
@@ -62,15 +53,10 @@ source_set("browser_impl") {
|
||||
|
||||
]
|
||||
|
||||
@@ -1894,106 +1925,18 @@ diff --git a/components/adblock/content/browser/BUILD.gn b/components/adblock/co
|
||||
diff --git a/components/adblock/content/browser/adblock_controller_factory_base.cc b/components/adblock/content/browser/adblock_controller_factory_base.cc
|
||||
--- a/components/adblock/content/browser/adblock_controller_factory_base.cc
|
||||
+++ b/components/adblock/content/browser/adblock_controller_factory_base.cc
|
||||
@@ -47,7 +47,7 @@ KeyedService* AdblockControllerFactoryBase::BuildServiceInstanceFor(
|
||||
@@ -47,10 +47,7 @@ KeyedService* AdblockControllerFactoryBase::BuildServiceInstanceFor(
|
||||
std::make_unique<PersistentFilteringConfiguration>(
|
||||
prefs, kAdblockFilteringConfigurationName);
|
||||
|
||||
- if (base::CommandLine::ForCurrentProcess()->HasSwitch(
|
||||
+ if ((true) && base::CommandLine::ForCurrentProcess()->HasSwitch(
|
||||
adblock::switches::kDisableAcceptableAds)) {
|
||||
adblock_filtering_configuration->RemoveFilterList(AcceptableAdsUrl());
|
||||
}
|
||||
diff --git a/components/adblock/content/browser/adblock_telemetry_service_factory_base.cc b/components/adblock/content/browser/adblock_telemetry_service_factory_base.cc
|
||||
--- a/components/adblock/content/browser/adblock_telemetry_service_factory_base.cc
|
||||
+++ b/components/adblock/content/browser/adblock_telemetry_service_factory_base.cc
|
||||
@@ -48,53 +48,4 @@ base::TimeDelta GetCheckInterval() {
|
||||
|
||||
} // namespace
|
||||
|
||||
-AdblockTelemetryServiceFactoryBase::AdblockTelemetryServiceFactoryBase()
|
||||
- : BrowserContextKeyedServiceFactory(
|
||||
- "AdblockTelemetryService",
|
||||
- BrowserContextDependencyManager::GetInstance()) {}
|
||||
-
|
||||
-AdblockTelemetryServiceFactoryBase::~AdblockTelemetryServiceFactoryBase() =
|
||||
- default;
|
||||
-
|
||||
-KeyedService* AdblockTelemetryServiceFactoryBase::BuildServiceInstanceFor(
|
||||
- content::BrowserContext* context) const {
|
||||
- // Need to use a URLLoaderFactory specific to the browser context, not from
|
||||
- // system_network_context_manager(), because the required Accept-Language
|
||||
- // header depends on user's language settings and is not present in requests
|
||||
- // made from the System network context.
|
||||
- scoped_refptr<network::SharedURLLoaderFactory> url_loader_factory =
|
||||
- context->GetDefaultStoragePartition()
|
||||
- ->GetURLLoaderFactoryForBrowserProcess();
|
||||
- auto* prefs = GetPrefs(context);
|
||||
- auto service = std::make_unique<AdblockTelemetryService>(
|
||||
- GetSubscriptionService(context)->GetAdblockFilteringConfiguration(),
|
||||
- url_loader_factory, GetInitialDelay(), GetCheckInterval());
|
||||
- service->AddTopicProvider(std::make_unique<ActivepingTelemetryTopicProvider>(
|
||||
- utils::GetAppInfo(), prefs, GetAdblockController(context),
|
||||
- ActivepingTelemetryTopicProvider::DefaultBaseUrl(),
|
||||
- ActivepingTelemetryTopicProvider::DefaultAuthToken()));
|
||||
-
|
||||
- if (url_loader_factory) {
|
||||
- service->Start();
|
||||
- adblock::switches::kDisableAcceptableAds)) {
|
||||
- adblock_filtering_configuration->RemoveFilterList(AcceptableAdsUrl());
|
||||
- }
|
||||
-
|
||||
- return service.release();
|
||||
-}
|
||||
-
|
||||
-bool AdblockTelemetryServiceFactoryBase::ServiceIsNULLWhileTesting() const {
|
||||
- return true;
|
||||
-}
|
||||
-
|
||||
-bool AdblockTelemetryServiceFactoryBase::ServiceIsCreatedWithBrowserContext()
|
||||
- const {
|
||||
- return true;
|
||||
-}
|
||||
-
|
||||
-void AdblockTelemetryServiceFactoryBase::SetCheckAndDelayIntervalsForTesting(
|
||||
- base::TimeDelta check_interval,
|
||||
- base::TimeDelta initial_delay) {
|
||||
- g_check_interval_for_testing = check_interval;
|
||||
- g_initial_delay_for_testing = initial_delay;
|
||||
-}
|
||||
-
|
||||
} // namespace adblock
|
||||
diff --git a/components/adblock/content/browser/adblock_telemetry_service_factory_base.h b/components/adblock/content/browser/adblock_telemetry_service_factory_base.h
|
||||
--- a/components/adblock/content/browser/adblock_telemetry_service_factory_base.h
|
||||
+++ b/components/adblock/content/browser/adblock_telemetry_service_factory_base.h
|
||||
@@ -27,30 +27,6 @@ namespace adblock {
|
||||
|
||||
class AdblockController;
|
||||
class SubscriptionService;
|
||||
-class AdblockTelemetryServiceFactoryBase
|
||||
- : public BrowserContextKeyedServiceFactory {
|
||||
- public:
|
||||
- // Sets the initial delay and interval checks required for browser tests.
|
||||
- // Must be called before BuildServiceInstanceFor().
|
||||
- void SetCheckAndDelayIntervalsForTesting(base::TimeDelta check_interval,
|
||||
- base::TimeDelta initial_delay);
|
||||
-
|
||||
- protected:
|
||||
- virtual PrefService* GetPrefs(content::BrowserContext* context) const = 0;
|
||||
- virtual AdblockController* GetAdblockController(
|
||||
- content::BrowserContext* context) const = 0;
|
||||
- virtual SubscriptionService* GetSubscriptionService(
|
||||
- content::BrowserContext* context) const = 0;
|
||||
- AdblockTelemetryServiceFactoryBase();
|
||||
- ~AdblockTelemetryServiceFactoryBase() override;
|
||||
-
|
||||
- private:
|
||||
- // BrowserContextKeyedServiceFactory:
|
||||
- KeyedService* BuildServiceInstanceFor(
|
||||
- content::BrowserContext* context) const override;
|
||||
- bool ServiceIsNULLWhileTesting() const override;
|
||||
- bool ServiceIsCreatedWithBrowserContext() const override;
|
||||
-};
|
||||
|
||||
} // namespace adblock
|
||||
|
||||
+ adblock_filtering_configuration->RemoveFilterList(AcceptableAdsUrl());
|
||||
if (base::CommandLine::ForCurrentProcess()->HasSwitch(
|
||||
switches::kDisableAdblock) ||
|
||||
base::CommandLine::ForCurrentProcess()->HasSwitch(
|
||||
diff --git a/components/adblock/content/browser/adblock_webcontents_observer.cc b/components/adblock/content/browser/adblock_webcontents_observer.cc
|
||||
--- a/components/adblock/content/browser/adblock_webcontents_observer.cc
|
||||
+++ b/components/adblock/content/browser/adblock_webcontents_observer.cc
|
||||
@@ -2138,7 +2081,11 @@ diff --git a/components/adblock/content/browser/subscription_service_factory_bas
|
||||
}
|
||||
base::DeleteFile(path);
|
||||
return result;
|
||||
@@ -205,7 +207,7 @@ void SubscriptionServiceFactoryBase::ConvertFilterListFile(
|
||||
@@ -202,10 +204,11 @@ SubscriptionServiceFactoryBase::ConvertCustomFilters(
|
||||
void SubscriptionServiceFactoryBase::ConvertFilterListFile(
|
||||
const GURL& subscription_url,
|
||||
const base::FilePath& path,
|
||||
+ bool allow_privileged_filter,
|
||||
base::OnceCallback<void(ConversionResult)> result_callback) const {
|
||||
base::ThreadPool::PostTaskAndReplyWithResult(
|
||||
FROM_HERE, {base::MayBlock()},
|
||||
@@ -2147,6 +2094,17 @@ diff --git a/components/adblock/content/browser/subscription_service_factory_bas
|
||||
std::move(result_callback));
|
||||
}
|
||||
|
||||
diff --git a/components/adblock/content/browser/subscription_service_factory_base.h b/components/adblock/content/browser/subscription_service_factory_base.h
|
||||
--- a/components/adblock/content/browser/subscription_service_factory_base.h
|
||||
+++ b/components/adblock/content/browser/subscription_service_factory_base.h
|
||||
@@ -39,6 +39,7 @@ class SubscriptionServiceFactoryBase : public BrowserContextKeyedServiceFactory,
|
||||
void ConvertFilterListFile(
|
||||
const GURL& subscription_url,
|
||||
const base::FilePath& path,
|
||||
+ bool allow_privileged_filter,
|
||||
base::OnceCallback<void(ConversionResult)>) const override;
|
||||
|
||||
protected:
|
||||
diff --git a/components/adblock/core/BUILD.gn b/components/adblock/core/BUILD.gn
|
||||
--- a/components/adblock/core/BUILD.gn
|
||||
+++ b/components/adblock/core/BUILD.gn
|
||||
@@ -2571,7 +2529,7 @@ diff --git a/components/adblock/core/adblock_controller.h b/components/adblock/c
|
||||
#include "components/keyed_service/core/keyed_service.h"
|
||||
|
||||
class GURL;
|
||||
@@ -43,6 +44,11 @@ class AdblockController : public KeyedService {
|
||||
@@ -43,10 +44,17 @@ class AdblockController : public KeyedService {
|
||||
virtual void SetAcceptableAdsEnabled(bool enabled) = 0;
|
||||
virtual bool IsAcceptableAdsEnabled() const = 0;
|
||||
|
||||
@@ -2583,10 +2541,32 @@ diff --git a/components/adblock/core/adblock_controller.h b/components/adblock/c
|
||||
virtual void InstallSubscription(const GURL& url) = 0;
|
||||
virtual void UninstallSubscription(const GURL& url) = 0;
|
||||
virtual std::vector<scoped_refptr<Subscription>> GetInstalledSubscriptions()
|
||||
const = 0;
|
||||
+ virtual std::vector<scoped_refptr<Subscription>> GetCustomSubscriptions()
|
||||
+ const = 0;
|
||||
|
||||
virtual void AddAllowedDomain(const std::string& domain) = 0;
|
||||
virtual void RemoveAllowedDomain(const std::string& domain) = 0;
|
||||
diff --git a/components/adblock/core/adblock_controller_impl.cc b/components/adblock/core/adblock_controller_impl.cc
|
||||
--- a/components/adblock/core/adblock_controller_impl.cc
|
||||
+++ b/components/adblock/core/adblock_controller_impl.cc
|
||||
@@ -103,6 +103,7 @@ bool AdblockControllerImpl::IsAdblockEnabled() const {
|
||||
@@ -73,6 +73,15 @@ absl::optional<bool> MigrateBoolFromPrefs(PrefService* pref_service,
|
||||
return absl::nullopt;
|
||||
}
|
||||
|
||||
+bool IsKnownSubscription(
|
||||
+ const std::vector<KnownSubscriptionInfo>& known_subscriptions,
|
||||
+ const GURL& url) {
|
||||
+ return base::ranges::any_of(known_subscriptions,
|
||||
+ [&](const auto& known_subscription) {
|
||||
+ return known_subscription.url == url;
|
||||
+ });
|
||||
+}
|
||||
+
|
||||
} // namespace
|
||||
|
||||
AdblockControllerImpl::AdblockControllerImpl(
|
||||
@@ -103,6 +112,7 @@ bool AdblockControllerImpl::IsAdblockEnabled() const {
|
||||
}
|
||||
|
||||
void AdblockControllerImpl::SetAcceptableAdsEnabled(bool enabled) {
|
||||
@@ -2594,7 +2574,7 @@ diff --git a/components/adblock/core/adblock_controller_impl.cc b/components/adb
|
||||
if (enabled) {
|
||||
InstallSubscription(AcceptableAdsUrl());
|
||||
} else {
|
||||
@@ -116,7 +117,33 @@ bool AdblockControllerImpl::IsAcceptableAdsEnabled() const {
|
||||
@@ -116,7 +126,33 @@ bool AdblockControllerImpl::IsAcceptableAdsEnabled() const {
|
||||
[&](const auto& url) { return url == AcceptableAdsUrl(); });
|
||||
}
|
||||
|
||||
@@ -2628,7 +2608,28 @@ diff --git a/components/adblock/core/adblock_controller_impl.cc b/components/adb
|
||||
adblock_filtering_configuration_->AddFilterList(url);
|
||||
}
|
||||
|
||||
@@ -165,10 +192,8 @@ void AdblockControllerImpl::RunFirstRunLogic(PrefService* pref_service) {
|
||||
@@ -129,6 +165,20 @@ AdblockControllerImpl::GetInstalledSubscriptions() const {
|
||||
return GetSubscriptionsThatMatchConfiguration();
|
||||
}
|
||||
|
||||
+std::vector<scoped_refptr<Subscription>>
|
||||
+AdblockControllerImpl::GetCustomSubscriptions() const {
|
||||
+ auto selected = GetInstalledSubscriptions();
|
||||
+ std::vector<KnownSubscriptionInfo> known = GetKnownSubscriptions();
|
||||
+ selected.erase(base::ranges::remove_if(selected,
|
||||
+ [&](const auto& subscription) {
|
||||
+ return IsKnownSubscription(
|
||||
+ known,
|
||||
+ subscription->GetSourceUrl());
|
||||
+ }),
|
||||
+ selected.end());
|
||||
+ return selected;
|
||||
+}
|
||||
+
|
||||
void AdblockControllerImpl::AddAllowedDomain(const std::string& domain) {
|
||||
adblock_filtering_configuration_->AddAllowedDomain(domain);
|
||||
}
|
||||
@@ -165,10 +215,8 @@ void AdblockControllerImpl::RunFirstRunLogic(PrefService* pref_service) {
|
||||
common::prefs::kInstallFirstStartSubscriptions)) {
|
||||
// On first run, install additional subscriptions.
|
||||
for (const auto& cur : known_subscriptions_) {
|
||||
@@ -2641,7 +2642,7 @@ diff --git a/components/adblock/core/adblock_controller_impl.cc b/components/adb
|
||||
// Do not install Acceptable Ads on first run because a command line
|
||||
// switch forbids it. Mostly used for testing.
|
||||
continue;
|
||||
@@ -236,7 +261,7 @@ void AdblockControllerImpl::InstallLanguageBasedRecommendedSubscriptions() {
|
||||
@@ -236,7 +284,7 @@ void AdblockControllerImpl::InstallLanguageBasedRecommendedSubscriptions() {
|
||||
SubscriptionFirstRunBehavior::SubscribeIfLocaleMatch &&
|
||||
std::find(subscription.languages.begin(), subscription.languages.end(),
|
||||
language_) != subscription.languages.end()) {
|
||||
@@ -2653,7 +2654,7 @@ diff --git a/components/adblock/core/adblock_controller_impl.cc b/components/adb
|
||||
diff --git a/components/adblock/core/adblock_controller_impl.h b/components/adblock/core/adblock_controller_impl.h
|
||||
--- a/components/adblock/core/adblock_controller_impl.h
|
||||
+++ b/components/adblock/core/adblock_controller_impl.h
|
||||
@@ -58,6 +58,11 @@ class AdblockControllerImpl : public AdblockController {
|
||||
@@ -58,10 +58,17 @@ class AdblockControllerImpl : public AdblockController {
|
||||
void SetAcceptableAdsEnabled(bool enabled) override;
|
||||
bool IsAcceptableAdsEnabled() const override;
|
||||
|
||||
@@ -2665,6 +2666,12 @@ diff --git a/components/adblock/core/adblock_controller_impl.h b/components/adbl
|
||||
void InstallSubscription(const GURL& url) override;
|
||||
void UninstallSubscription(const GURL& url) override;
|
||||
std::vector<scoped_refptr<Subscription>> GetInstalledSubscriptions()
|
||||
const override;
|
||||
+ std::vector<scoped_refptr<Subscription>> GetCustomSubscriptions()
|
||||
+ const override;
|
||||
|
||||
void AddAllowedDomain(const std::string& domain) override;
|
||||
void RemoveAllowedDomain(const std::string& domain) override;
|
||||
diff --git a/components/adblock/core/adblock_switches.cc b/components/adblock/core/adblock_switches.cc
|
||||
--- a/components/adblock/core/adblock_switches.cc
|
||||
+++ b/components/adblock/core/adblock_switches.cc
|
||||
@@ -3051,16 +3058,7 @@ deleted file mode 100644
|
||||
diff --git a/components/adblock/core/common/BUILD.gn b/components/adblock/core/common/BUILD.gn
|
||||
--- a/components/adblock/core/common/BUILD.gn
|
||||
+++ b/components/adblock/core/common/BUILD.gn
|
||||
@@ -14,8 +14,6 @@
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with eyeo Chromium SDK. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
-import("//components/adblock/features.gni")
|
||||
-
|
||||
config("eyeo_filtering_config") {
|
||||
defines = []
|
||||
|
||||
@@ -59,14 +57,6 @@ source_set("common") {
|
||||
@@ -59,14 +59,6 @@ source_set("common") {
|
||||
|
||||
config("eyeo_application_config") {
|
||||
defines = []
|
||||
@@ -3250,7 +3248,7 @@ diff --git a/components/adblock/core/configuration/persistent_filtering_configur
|
||||
}
|
||||
|
||||
void PersistentFilteringConfiguration::SetEnabled(bool enabled) {
|
||||
+ pref_service_->SetBoolean(prefs::kEnableAdblockLegacy, enabled);
|
||||
+ pref_service_->SetBoolean(common::prefs::kEnableAdblockLegacy, enabled);
|
||||
if (IsEnabled() == enabled) {
|
||||
return;
|
||||
}
|
||||
@@ -3259,11 +3257,11 @@ diff --git a/components/adblock/core/configuration/persistent_filtering_configur
|
||||
}
|
||||
|
||||
+bool PersistentFilteringConfiguration::IsPrivilegedFiltersEnabled() {
|
||||
+ return pref_service_->GetBoolean(prefs::kAllowPrivilegedFilters);
|
||||
+ return pref_service_->GetBoolean(common::prefs::kAllowPrivilegedFilters);
|
||||
+}
|
||||
+
|
||||
+void PersistentFilteringConfiguration::SetPrivilegedFiltersEnabled(bool enabled) {
|
||||
+ pref_service_->SetBoolean(prefs::kAllowPrivilegedFilters, enabled);
|
||||
+ pref_service_->SetBoolean(common::prefs::kAllowPrivilegedFilters, enabled);
|
||||
+}
|
||||
+
|
||||
bool PersistentFilteringConfiguration::IsEnabled() const {
|
||||
@@ -4086,7 +4084,7 @@ diff --git a/components/adblock/core/subscription/subscription_persistent_metada
|
||||
|
||||
+bool SubscriptionPersistentMetadataImpl::AllowPrivilegedFilters(
|
||||
+ const GURL& subscription_url) {
|
||||
+ return prefs_ && prefs_->GetBoolean(prefs::kAllowPrivilegedFilters)
|
||||
+ return prefs_ && prefs_->GetBoolean(common::prefs::kAllowPrivilegedFilters)
|
||||
+ && config::AllowPrivilegedFilters(subscription_url);
|
||||
+}
|
||||
+
|
||||
@@ -8138,6 +8136,32 @@ diff --git a/third_party/blink/renderer/core/exported/web_document.cc b/third_pa
|
||||
document->GetStyleEngine().InjectSheet(injection_key, parsed_sheet, origin);
|
||||
return injection_key;
|
||||
}
|
||||
diff --git a/tools/gritsettings/resource_ids.spec b/tools/gritsettings/resource_ids.spec
|
||||
--- a/tools/gritsettings/resource_ids.spec
|
||||
+++ b/tools/gritsettings/resource_ids.spec
|
||||
@@ -639,10 +639,6 @@
|
||||
"META": {"sizes": {"includes": [20]}},
|
||||
"includes": [4960],
|
||||
},
|
||||
- "<(SHARED_INTERMEDIATE_DIR)/chrome/browser/resources/adblock_internals/resources.grd": {
|
||||
- "META": {"sizes": {"includes": [10],}},
|
||||
- "includes": [4720],
|
||||
- },
|
||||
# END chrome/ WebUI resources section
|
||||
|
||||
# START chrome/ miscellaneous section.
|
||||
@@ -1205,6 +1201,11 @@
|
||||
"includes": [7440],
|
||||
},
|
||||
|
||||
+ "<(SHARED_INTERMEDIATE_DIR)/chrome/browser/resources/adblock_internals/resources.grd": {
|
||||
+ "META": {"sizes": {"includes": [10],}},
|
||||
+ "includes": [8000],
|
||||
+ },
|
||||
+
|
||||
# END "everything else" section.
|
||||
# Everything but chrome/, components/, content/, and ios/
|
||||
|
||||
diff --git a/tools/typescript/definitions/adblock_private.d.ts b/tools/typescript/definitions/adblock_private.d.ts
|
||||
--- a/tools/typescript/definitions/adblock_private.d.ts
|
||||
+++ b/tools/typescript/definitions/adblock_private.d.ts
|
||||
|
||||
@@ -0,0 +1,374 @@
|
||||
From: Your Name <you@example.com>
|
||||
Date: Wed, 6 Sep 2023 17:55:01 +0000
|
||||
Subject: Fix chromium build bugs
|
||||
|
||||
---
|
||||
android_webview/system_webview_bundle.gni | 4 ++++
|
||||
build/config/android/rules.gni | 1 +
|
||||
.../chromium/chrome/browser/tab/TabImpl.java | 2 +-
|
||||
chrome/browser/download/download_ui_model.cc | 2 ++
|
||||
.../api/autofill_private/autofill_util.cc | 2 ++
|
||||
chrome/browser/extensions/extension_util.cc | 2 ++
|
||||
chrome/browser/safe_browsing/BUILD.gn | 1 +
|
||||
.../safe_browsing/user_interaction_observer.cc | 17 -----------------
|
||||
...ction_consented_debugging_infobar_delegate.h | 2 +-
|
||||
chrome/browser/ui/views/tabs/tab.cc | 2 +-
|
||||
.../browser/ui/views/tabs/tab_group_header.cc | 2 +-
|
||||
.../app_management_page_handler.cc | 2 ++
|
||||
chrome/browser/usb/chrome_usb_delegate.cc | 2 ++
|
||||
.../autofill/core/browser/form_structure.cc | 2 ++
|
||||
.../core/browser/ui/suggestion_selection.cc | 12 +-----------
|
||||
.../core/browser/webdata/autofill_table.cc | 12 ++++++------
|
||||
.../omnibox/browser/omnibox_field_trial.cc | 4 ++--
|
||||
.../phishing_image_embedder.cc | 14 +++-----------
|
||||
crypto/BUILD.gn | 1 +
|
||||
net/BUILD.gn | 1 +
|
||||
third_party/libevent/BUILD.gn | 2 ++
|
||||
21 files changed, 38 insertions(+), 51 deletions(-)
|
||||
|
||||
diff --git a/android_webview/system_webview_bundle.gni b/android_webview/system_webview_bundle.gni
|
||||
--- a/android_webview/system_webview_bundle.gni
|
||||
+++ b/android_webview/system_webview_bundle.gni
|
||||
@@ -84,6 +84,10 @@ template("system_webview_bundle") {
|
||||
custom_assertion_handler = crash_reporting_assertion_handler
|
||||
}
|
||||
}
|
||||
+ } else {
|
||||
+ not_needed(["_base_target_name", "_base_target_gen_dir",
|
||||
+ "_base_module_build_config", "_rebased_base_module_build_config",
|
||||
+ "_base_module_version_code"])
|
||||
}
|
||||
|
||||
android_app_bundle(target_name) {
|
||||
diff --git a/build/config/android/rules.gni b/build/config/android/rules.gni
|
||||
--- a/build/config/android/rules.gni
|
||||
+++ b/build/config/android/rules.gni
|
||||
@@ -4993,6 +4993,7 @@ if (enable_java_templates && is_android) {
|
||||
_module_build_config = _module.build_config
|
||||
_module_build_config_target = _module.build_config_target
|
||||
_module_target_name = get_label_info(_module_target, "name")
|
||||
+ not_needed(["_module_target_name"])
|
||||
|
||||
if (!_proguard_enabled) {
|
||||
_dex_target = "${_module_target_name}__final_dex"
|
||||
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tab/TabImpl.java b/chrome/android/java/src/org/chromium/chrome/browser/tab/TabImpl.java
|
||||
--- a/chrome/android/java/src/org/chromium/chrome/browser/tab/TabImpl.java
|
||||
+++ b/chrome/android/java/src/org/chromium/chrome/browser/tab/TabImpl.java
|
||||
@@ -377,7 +377,7 @@ public class TabImpl implements Tab {
|
||||
}
|
||||
|
||||
@Override
|
||||
- @CalledByNative
|
||||
+ // @CalledByNative
|
||||
public int getId() {
|
||||
return mId;
|
||||
}
|
||||
diff --git a/chrome/browser/download/download_ui_model.cc b/chrome/browser/download/download_ui_model.cc
|
||||
--- a/chrome/browser/download/download_ui_model.cc
|
||||
+++ b/chrome/browser/download/download_ui_model.cc
|
||||
@@ -176,6 +176,7 @@ bool ShouldShowWarningForNoSafeBrowsing(Profile* profile) {
|
||||
#endif
|
||||
}
|
||||
|
||||
+#if !BUILDFLAG(IS_ANDROID)
|
||||
bool CanUserTurnOnSafeBrowsing(Profile* profile) {
|
||||
#if BUILDFLAG(FULL_SAFE_BROWSING)
|
||||
return !safe_browsing::IsSafeBrowsingPolicyManaged(*profile->GetPrefs());
|
||||
@@ -183,6 +184,7 @@ bool CanUserTurnOnSafeBrowsing(Profile* profile) {
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
+#endif
|
||||
|
||||
} // namespace
|
||||
|
||||
diff --git a/chrome/browser/extensions/api/autofill_private/autofill_util.cc b/chrome/browser/extensions/api/autofill_private/autofill_util.cc
|
||||
--- a/chrome/browser/extensions/api/autofill_private/autofill_util.cc
|
||||
+++ b/chrome/browser/extensions/api/autofill_private/autofill_util.cc
|
||||
@@ -42,6 +42,7 @@ namespace {
|
||||
// Get the multi-valued element for |type| and return it as a |vector|.
|
||||
// TODO(khorimoto): remove this function since multi-valued types are
|
||||
// deprecated.
|
||||
+#if BUILDFLAG(IS_ANDROID)
|
||||
std::vector<std::string> GetList(const autofill::AutofillProfile& profile,
|
||||
autofill::ServerFieldType type) {
|
||||
std::vector<std::string> list;
|
||||
@@ -65,6 +66,7 @@ std::vector<std::string> GetList(const autofill::AutofillProfile& profile,
|
||||
|
||||
return list;
|
||||
}
|
||||
+#endif
|
||||
|
||||
// Gets the string corresponding to |type| from |profile|.
|
||||
std::string GetStringFromProfile(const autofill::AutofillProfile& profile,
|
||||
diff --git a/chrome/browser/extensions/extension_util.cc b/chrome/browser/extensions/extension_util.cc
|
||||
--- a/chrome/browser/extensions/extension_util.cc
|
||||
+++ b/chrome/browser/extensions/extension_util.cc
|
||||
@@ -71,6 +71,7 @@ std::string ReloadExtensionIfEnabled(const std::string& extension_id,
|
||||
return ReloadExtension(extension_id, context);
|
||||
}
|
||||
|
||||
+#if BUILDFLAG(IS_CHROMEOS_ASH)
|
||||
// Returns true if the extension ID is found in the InstallForceList policy. Is
|
||||
// checked by HasIsolatedStorage() when the extension is not found in the
|
||||
// registry.
|
||||
@@ -91,6 +92,7 @@ bool IsForceInstalledExtension(const ExtensionId& extension_id,
|
||||
}
|
||||
return false;
|
||||
}
|
||||
+#endif
|
||||
|
||||
// Returns true if the profile is a sign-in profile and the extension is policy
|
||||
// installed. `is_policy_installed` can be passed to the method if its value is
|
||||
diff --git a/chrome/browser/safe_browsing/BUILD.gn b/chrome/browser/safe_browsing/BUILD.gn
|
||||
--- a/chrome/browser/safe_browsing/BUILD.gn
|
||||
+++ b/chrome/browser/safe_browsing/BUILD.gn
|
||||
@@ -210,6 +210,7 @@ static_library("safe_browsing") {
|
||||
"//components/version_info",
|
||||
"//content/public/browser",
|
||||
"//services/preferences/public/mojom:mojom",
|
||||
+ "//third_party/flatbuffers:flatbuffers",
|
||||
]
|
||||
if (safe_browsing_mode == 1) {
|
||||
# "Safe Browsing Full" files in addition to the "basic" ones to use for
|
||||
diff --git a/chrome/browser/safe_browsing/user_interaction_observer.cc b/chrome/browser/safe_browsing/user_interaction_observer.cc
|
||||
--- a/chrome/browser/safe_browsing/user_interaction_observer.cc
|
||||
+++ b/chrome/browser/safe_browsing/user_interaction_observer.cc
|
||||
@@ -36,23 +36,6 @@ WEB_CONTENTS_USER_DATA_KEY_IMPL(SafeBrowsingUserInteractionObserver);
|
||||
|
||||
namespace {
|
||||
|
||||
-bool IsUrlElisionDisabled(Profile* profile,
|
||||
- const char* suspicious_site_reporter_extension_id) {
|
||||
- if (profile &&
|
||||
- profile->GetPrefs()->GetBoolean(omnibox::kPreventUrlElisionsInOmnibox)) {
|
||||
- return true;
|
||||
- }
|
||||
-#if BUILDFLAG(ENABLE_EXTENSIONS)
|
||||
- DCHECK(suspicious_site_reporter_extension_id);
|
||||
- if (profile && extensions::ExtensionRegistry::Get(profile)
|
||||
- ->enabled_extensions()
|
||||
- .Contains(suspicious_site_reporter_extension_id)) {
|
||||
- return true;
|
||||
- }
|
||||
-#endif
|
||||
- return false;
|
||||
-}
|
||||
-
|
||||
} // namespace
|
||||
|
||||
// static
|
||||
diff --git a/chrome/browser/ui/startup/bidding_and_auction_consented_debugging_infobar_delegate.h b/chrome/browser/ui/startup/bidding_and_auction_consented_debugging_infobar_delegate.h
|
||||
--- a/chrome/browser/ui/startup/bidding_and_auction_consented_debugging_infobar_delegate.h
|
||||
+++ b/chrome/browser/ui/startup/bidding_and_auction_consented_debugging_infobar_delegate.h
|
||||
@@ -12,7 +12,7 @@
|
||||
|
||||
namespace content {
|
||||
class WebContents;
|
||||
-};
|
||||
+}
|
||||
|
||||
// An infobar for Chrome for Testing, which displays a message saying that this
|
||||
// flavor of chrome is unsupported and does not auto-update.
|
||||
diff --git a/chrome/browser/ui/views/tabs/tab.cc b/chrome/browser/ui/views/tabs/tab.cc
|
||||
--- a/chrome/browser/ui/views/tabs/tab.cc
|
||||
+++ b/chrome/browser/ui/views/tabs/tab.cc
|
||||
@@ -524,7 +524,7 @@ bool Tab::OnMousePressed(const ui::MouseEvent& event) {
|
||||
}
|
||||
|
||||
bool Tab::OnMouseDragged(const ui::MouseEvent& event) {
|
||||
- controller_->ContinueDrag(this, event);
|
||||
+ (void)controller_->ContinueDrag(this, event);
|
||||
return true;
|
||||
}
|
||||
|
||||
diff --git a/chrome/browser/ui/views/tabs/tab_group_header.cc b/chrome/browser/ui/views/tabs/tab_group_header.cc
|
||||
--- a/chrome/browser/ui/views/tabs/tab_group_header.cc
|
||||
+++ b/chrome/browser/ui/views/tabs/tab_group_header.cc
|
||||
@@ -207,7 +207,7 @@ bool TabGroupHeader::OnMousePressed(const ui::MouseEvent& event) {
|
||||
}
|
||||
|
||||
bool TabGroupHeader::OnMouseDragged(const ui::MouseEvent& event) {
|
||||
- tab_slot_controller_->ContinueDrag(this, event);
|
||||
+ (void)tab_slot_controller_->ContinueDrag(this, event);
|
||||
return true;
|
||||
}
|
||||
|
||||
diff --git a/chrome/browser/ui/webui/app_management/app_management_page_handler.cc b/chrome/browser/ui/webui/app_management/app_management_page_handler.cc
|
||||
--- a/chrome/browser/ui/webui/app_management/app_management_page_handler.cc
|
||||
+++ b/chrome/browser/ui/webui/app_management/app_management_page_handler.cc
|
||||
@@ -134,6 +134,7 @@ bool CanShowDefaultAppAssociationsUi() {
|
||||
#endif
|
||||
}
|
||||
|
||||
+#if BUILDFLAG(IS_CHROMEOS)
|
||||
// Returns a list of intent filters that support http/https given an app ID.
|
||||
apps::IntentFilters GetSupportedLinkIntentFilters(Profile* profile,
|
||||
const std::string& app_id) {
|
||||
@@ -167,6 +168,7 @@ std::vector<std::string> GetSupportedLinks(Profile* profile,
|
||||
return std::vector<std::string>(supported_links.begin(),
|
||||
supported_links.end());
|
||||
}
|
||||
+#endif
|
||||
|
||||
#if !BUILDFLAG(IS_CHROMEOS)
|
||||
std::vector<std::string> GetSupportedLinksForPWAs(
|
||||
diff --git a/chrome/browser/usb/chrome_usb_delegate.cc b/chrome/browser/usb/chrome_usb_delegate.cc
|
||||
--- a/chrome/browser/usb/chrome_usb_delegate.cc
|
||||
+++ b/chrome/browser/usb/chrome_usb_delegate.cc
|
||||
@@ -46,6 +46,7 @@ UsbChooserContext* GetChooserContext(content::BrowserContext* browser_context) {
|
||||
return profile ? UsbChooserContextFactory::GetForProfile(profile) : nullptr;
|
||||
}
|
||||
|
||||
+#if !BUILDFLAG(IS_ANDROID)
|
||||
UsbConnectionTracker* GetConnectionTracker(
|
||||
content::BrowserContext* browser_context,
|
||||
bool create) {
|
||||
@@ -55,6 +56,7 @@ UsbConnectionTracker* GetConnectionTracker(
|
||||
return profile ? UsbConnectionTrackerFactory::GetForProfile(profile, create)
|
||||
: nullptr;
|
||||
}
|
||||
+#endif
|
||||
|
||||
#if BUILDFLAG(ENABLE_EXTENSIONS)
|
||||
// These extensions can claim the smart card USB class and automatically gain
|
||||
diff --git a/components/autofill/core/browser/form_structure.cc b/components/autofill/core/browser/form_structure.cc
|
||||
--- a/components/autofill/core/browser/form_structure.cc
|
||||
+++ b/components/autofill/core/browser/form_structure.cc
|
||||
@@ -219,6 +219,7 @@ void EncodeRandomizedValue(const RandomizedEncoder& encoder,
|
||||
// In that case, use the server prediction instead. In the special case that
|
||||
// the last specified manual override is a pass through, copy all server
|
||||
// predictions.
|
||||
+#if !BUILDFLAG(IS_ANDROID)
|
||||
std::deque<FieldSuggestion> MergeManualAndServerOverrides(
|
||||
std::deque<FieldSuggestion> manual_overrides,
|
||||
std::deque<FieldSuggestion> server_overrides) {
|
||||
@@ -244,6 +245,7 @@ std::deque<FieldSuggestion> MergeManualAndServerOverrides(
|
||||
|
||||
return result;
|
||||
}
|
||||
+#endif
|
||||
|
||||
void PopulateRandomizedFormMetadata(const RandomizedEncoder& encoder,
|
||||
const FormStructure& form,
|
||||
diff --git a/components/autofill/core/browser/ui/suggestion_selection.cc b/components/autofill/core/browser/ui/suggestion_selection.cc
|
||||
--- a/components/autofill/core/browser/ui/suggestion_selection.cc
|
||||
+++ b/components/autofill/core/browser/ui/suggestion_selection.cc
|
||||
@@ -101,17 +101,7 @@ Suggestion GetFillFullNameSuggestion(Suggestion::BackendId backend_id) {
|
||||
// whole form.
|
||||
// TODO(crbug.com/1459990): Use this once the new popup with submenus
|
||||
// implementation is complete.
|
||||
-Suggestion GetFillEverythingFromAddressProfileSuggestion(
|
||||
- Suggestion::BackendId backend_id) {
|
||||
- Suggestion suggestion(l10n_util::GetStringUTF16(
|
||||
- IDS_AUTOFILL_FILL_EVERYTHING_FROM_ADDRESS_PROFILE_POPUP_OPTION_SELECTED));
|
||||
- suggestion.popup_item_id = PopupItemId::kFillEverythingFromAddressProfile;
|
||||
- suggestion.icon = "magicIcon";
|
||||
- suggestion.payload = backend_id;
|
||||
- suggestion.acceptance_a11y_announcement = l10n_util::GetStringUTF16(
|
||||
- IDS_AUTOFILL_A11Y_ANNOUNCE_FILL_EVERYTHING_FROM_ADDRESS_PROFILE_POPUP_OPTION_SELECTED);
|
||||
- return suggestion;
|
||||
-}
|
||||
+// (UAZO) removed due error: unused function
|
||||
// Append new suggestions to `suggestions` based on the `ServerFieldType` list
|
||||
// provided. Suggestions are not added if their info is not found in the
|
||||
// provided `profile`. Returns true if any suggestion was added.
|
||||
diff --git a/components/autofill/core/browser/webdata/autofill_table.cc b/components/autofill/core/browser/webdata/autofill_table.cc
|
||||
--- a/components/autofill/core/browser/webdata/autofill_table.cc
|
||||
+++ b/components/autofill/core/browser/webdata/autofill_table.cc
|
||||
@@ -412,12 +412,12 @@ void InsertBuilder(sql::Database* db,
|
||||
}
|
||||
|
||||
// Renames the table `from` into `to` and returns true if successful.
|
||||
-bool RenameTable(sql::Database* db,
|
||||
- std::string_view from,
|
||||
- std::string_view to) {
|
||||
- return db->Execute(
|
||||
- base::StrCat({"ALTER TABLE ", from, " RENAME TO ", to}).c_str());
|
||||
-}
|
||||
+// bool RenameTable(sql::Database* db,
|
||||
+// std::string_view from,
|
||||
+// std::string_view to) {
|
||||
+// return db->Execute(
|
||||
+// base::StrCat({"ALTER TABLE ", from, " RENAME TO ", to}).c_str());
|
||||
+// }
|
||||
|
||||
// Wrapper around `sql::Database::DoesColumnExist()`, because that function
|
||||
// only accepts const char* parameters.
|
||||
diff --git a/components/omnibox/browser/omnibox_field_trial.cc b/components/omnibox/browser/omnibox_field_trial.cc
|
||||
--- a/components/omnibox/browser/omnibox_field_trial.cc
|
||||
+++ b/components/omnibox/browser/omnibox_field_trial.cc
|
||||
@@ -1079,11 +1079,11 @@ MLConfig::MLConfig(const MLConfig&) = default;
|
||||
|
||||
ScopedMLConfigForTesting::ScopedMLConfigForTesting()
|
||||
: original_config_(std::make_unique<MLConfig>(GetMLConfig())) {
|
||||
- GetMLConfigInternal() = {};
|
||||
+ //GetMLConfigInternal() = {};
|
||||
}
|
||||
|
||||
ScopedMLConfigForTesting::~ScopedMLConfigForTesting() {
|
||||
- GetMLConfigInternal() = *original_config_;
|
||||
+ //GetMLConfigInternal() = *original_config_;
|
||||
}
|
||||
|
||||
MLConfig& ScopedMLConfigForTesting::GetMLConfig() {
|
||||
diff --git a/components/safe_browsing/content/renderer/phishing_classifier/phishing_image_embedder.cc b/components/safe_browsing/content/renderer/phishing_classifier/phishing_image_embedder.cc
|
||||
--- a/components/safe_browsing/content/renderer/phishing_classifier/phishing_image_embedder.cc
|
||||
+++ b/components/safe_browsing/content/renderer/phishing_classifier/phishing_image_embedder.cc
|
||||
@@ -52,17 +52,9 @@ void PhishingImageEmbedder::BeginImageEmbedding(DoneCallback done_callback) {
|
||||
}
|
||||
|
||||
void PhishingImageEmbedder::OnPlaybackDone(std::unique_ptr<SkBitmap> bitmap) {
|
||||
- if (bitmap) {
|
||||
- bitmap_ = std::move(bitmap);
|
||||
- ScorerStorage::GetInstance()
|
||||
- ->GetScorer()
|
||||
- ->ApplyVisualTfLiteModelImageEmbedding(
|
||||
- *bitmap_,
|
||||
- base::BindOnce(&PhishingImageEmbedder::OnImageEmbeddingDone,
|
||||
- weak_factory_.GetWeakPtr()));
|
||||
- } else {
|
||||
- RunFailureCallback();
|
||||
- }
|
||||
+ // (UAZO) removed due error:
|
||||
+ // no member named 'ApplyVisualTfLiteModelImageEmbedding' in 'safe_browsing::Scorer'
|
||||
+ RunFailureCallback();
|
||||
}
|
||||
|
||||
void PhishingImageEmbedder::CancelPendingImageEmbedding() {
|
||||
diff --git a/crypto/BUILD.gn b/crypto/BUILD.gn
|
||||
--- a/crypto/BUILD.gn
|
||||
+++ b/crypto/BUILD.gn
|
||||
@@ -14,6 +14,7 @@ buildflag_header("buildflags") {
|
||||
}
|
||||
|
||||
component("crypto") {
|
||||
+ configs -= [ "//build/config/clang:find_bad_constructs" ]
|
||||
output_name = "crcrypto" # Avoid colliding with OpenSSL's libcrypto.
|
||||
sources = [
|
||||
"aead.cc",
|
||||
diff --git a/net/BUILD.gn b/net/BUILD.gn
|
||||
--- a/net/BUILD.gn
|
||||
+++ b/net/BUILD.gn
|
||||
@@ -1657,6 +1657,7 @@ component("net") {
|
||||
configs -= [ "//build/config/compiler:default_optimization" ]
|
||||
configs += [ "//build/config/compiler:optimize_max" ]
|
||||
}
|
||||
+ configs -= [ "//build/config/clang:find_bad_constructs" ]
|
||||
}
|
||||
|
||||
# net_export.h has its own build target so that code (eg
|
||||
diff --git a/third_party/libevent/BUILD.gn b/third_party/libevent/BUILD.gn
|
||||
--- a/third_party/libevent/BUILD.gn
|
||||
+++ b/third_party/libevent/BUILD.gn
|
||||
@@ -69,6 +69,8 @@ static_library("libevent") {
|
||||
configs += [ "//build/config/compiler:optimize_max" ]
|
||||
}
|
||||
|
||||
+ configs -= [ "//build/config/clang:find_bad_constructs" ]
|
||||
+
|
||||
configs -= [ "//build/config/compiler:chromium_code" ]
|
||||
configs += [ "//build/config/compiler:no_chromium_code" ]
|
||||
}
|
||||
--
|
||||
2.25.1
|
||||
@@ -0,0 +1,23 @@
|
||||
From: uazo <uazo@users.noreply.github.com>
|
||||
Date: Thu, 7 Sep 2023 06:15:28 +0000
|
||||
Subject: Fix crash on customize profile ui
|
||||
|
||||
License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html
|
||||
---
|
||||
.../webui/customize_themes/chrome_customize_themes_handler.cc | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/chrome/browser/ui/webui/customize_themes/chrome_customize_themes_handler.cc b/chrome/browser/ui/webui/customize_themes/chrome_customize_themes_handler.cc
|
||||
--- a/chrome/browser/ui/webui/customize_themes/chrome_customize_themes_handler.cc
|
||||
+++ b/chrome/browser/ui/webui/customize_themes/chrome_customize_themes_handler.cc
|
||||
@@ -79,7 +79,7 @@ void ChromeCustomizeThemesHandler::GetChromeThemes(
|
||||
auto theme_colors = GetAutogeneratedThemeColors(color_info.color);
|
||||
auto theme = customize_themes::mojom::ChromeTheme::New();
|
||||
theme->id = color_info.id;
|
||||
- theme->label = l10n_util::GetStringUTF8(color_info.label_id);
|
||||
+ //theme->label = l10n_util::GetStringUTF8(color_info.label_id);
|
||||
auto colors = customize_themes::mojom::ThemeColors::New();
|
||||
colors->frame = theme_colors.frame_color;
|
||||
colors->active_tab = theme_colors.active_tab_color;
|
||||
--
|
||||
2.25.1
|
||||
@@ -0,0 +1,147 @@
|
||||
From: uazo <uazo@users.noreply.github.com>
|
||||
Date: Wed, 6 Sep 2023 15:25:18 +0000
|
||||
Subject: Fix eyeo Browser Ad filtering patches
|
||||
|
||||
---
|
||||
chrome/browser/BUILD.gn | 4 ----
|
||||
chrome/browser/client_hints/client_hints_browsertest.cc | 9 ++-------
|
||||
chrome/browser/extensions/BUILD.gn | 4 ----
|
||||
chrome/browser/preferences/BUILD.gn | 4 ----
|
||||
chrome/browser/ui/BUILD.gn | 6 ------
|
||||
chrome/browser/ui/tab_helpers.cc | 4 ----
|
||||
extensions/common/mojom/api_permission_id.mojom | 3 ---
|
||||
7 files changed, 2 insertions(+), 32 deletions(-)
|
||||
|
||||
diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
|
||||
--- a/chrome/browser/BUILD.gn
|
||||
+++ b/chrome/browser/BUILD.gn
|
||||
@@ -2085,12 +2085,8 @@ static_library("browser") {
|
||||
"//chrome/common/notifications",
|
||||
"//chrome/installer/util:with_no_strings",
|
||||
"//chrome/services/speech/buildflags",
|
||||
-<<<<<<< HEAD
|
||||
-=======
|
||||
- "//chromeos/components/kiosk",
|
||||
"//components/adblock/content:browser",
|
||||
"//components/adblock/core/converter",
|
||||
->>>>>>> 9402d5c48c0e8... Squashed commits
|
||||
"//components/assist_ranker",
|
||||
"//components/autofill/content/browser",
|
||||
"//components/autofill/core/browser",
|
||||
diff --git a/chrome/browser/client_hints/client_hints_browsertest.cc b/chrome/browser/client_hints/client_hints_browsertest.cc
|
||||
--- a/chrome/browser/client_hints/client_hints_browsertest.cc
|
||||
+++ b/chrome/browser/client_hints/client_hints_browsertest.cc
|
||||
@@ -652,17 +652,12 @@ class ClientHintsBrowserTest : public policy::PolicyTest {
|
||||
// Force-enable the ClientHintsFormFactor feature, so that the header is
|
||||
// represented in the various header counts.
|
||||
feature_list->InitializeFromCommandLine(
|
||||
-<<<<<<< HEAD
|
||||
- "UserAgentClientHint,CriticalClientHint,AcceptCHFrame,"
|
||||
- "ClientHintsFormFactor",
|
||||
- "");
|
||||
-=======
|
||||
"UserAgentClientHint,CriticalClientHint,AcceptCHFrame",
|
||||
- // Disabling AdblockPlus because the async implementation of
|
||||
+ "ClientHintsFormFactor",
|
||||
+ // Disabling AdblockPlus because the async implementation of
|
||||
// AdblockURLLoaderThrottle::WillStartRequest confuses
|
||||
// ThirdPartyURLLoaderInterceptor.
|
||||
"AdblockPlus");
|
||||
->>>>>>> 9402d5c48c0e8... Squashed commits
|
||||
return feature_list;
|
||||
}
|
||||
|
||||
diff --git a/chrome/browser/extensions/BUILD.gn b/chrome/browser/extensions/BUILD.gn
|
||||
--- a/chrome/browser/extensions/BUILD.gn
|
||||
+++ b/chrome/browser/extensions/BUILD.gn
|
||||
@@ -821,11 +821,7 @@ static_library("extensions") {
|
||||
"//chrome/browser/safe_browsing:metrics_collector",
|
||||
"//chrome/browser/ui/tabs:tab_enums",
|
||||
"//chrome/browser/web_applications",
|
||||
-<<<<<<< HEAD
|
||||
-=======
|
||||
- "//chromeos/components/kiosk",
|
||||
"//components/adblock/content:browser",
|
||||
->>>>>>> 9402d5c48c0e8... Squashed commits
|
||||
"//components/cbor:cbor",
|
||||
"//components/commerce/core:pref_names",
|
||||
"//components/device_reauth",
|
||||
diff --git a/chrome/browser/preferences/BUILD.gn b/chrome/browser/preferences/BUILD.gn
|
||||
--- a/chrome/browser/preferences/BUILD.gn
|
||||
+++ b/chrome/browser/preferences/BUILD.gn
|
||||
@@ -38,12 +38,8 @@ android_library("java") {
|
||||
# TODO(chouinard,estade): Consider breaking this target up into a different target for each pref file.
|
||||
java_cpp_strings("java_pref_names_srcjar") {
|
||||
sources = [
|
||||
-<<<<<<< HEAD
|
||||
"//chrome/common/pref_names.h",
|
||||
-=======
|
||||
- "//chrome/common/pref_names.cc",
|
||||
"//components/adblock/core/common/adblock_prefs.cc",
|
||||
->>>>>>> 9402d5c48c0e8... Squashed commits
|
||||
"//components/autofill/core/common/autofill_prefs.cc",
|
||||
"//components/commerce/core/pref_names.cc",
|
||||
"//components/dom_distiller/core/pref_names.cc",
|
||||
diff --git a/chrome/browser/ui/BUILD.gn b/chrome/browser/ui/BUILD.gn
|
||||
--- a/chrome/browser/ui/BUILD.gn
|
||||
+++ b/chrome/browser/ui/BUILD.gn
|
||||
@@ -447,11 +447,8 @@ static_library("ui") {
|
||||
"//chrome/browser/storage_access_api",
|
||||
"//chrome/browser/ui/side_panel:side_panel_enums",
|
||||
"//chrome/browser/ui/webui:configs",
|
||||
-<<<<<<< HEAD
|
||||
"//chrome/browser/ui/webui/location_internals:mojo_bindings",
|
||||
-=======
|
||||
"//chrome/browser/ui/webui/adblock_internals:mojo_bindings",
|
||||
->>>>>>> 9402d5c48c0e8... Squashed commits
|
||||
"//chrome/browser/ui/webui/omnibox:mojo_bindings",
|
||||
"//chrome/browser/ui/webui/segmentation_internals:mojo_bindings",
|
||||
"//chrome/browser/ui/webui/suggest_internals:mojo_bindings",
|
||||
@@ -467,11 +464,8 @@ static_library("ui") {
|
||||
"//components/about_ui",
|
||||
"//components/access_code_cast/common:metrics",
|
||||
"//components/account_id",
|
||||
-<<<<<<< HEAD
|
||||
"//components/autofill/content/browser",
|
||||
-=======
|
||||
"//components/adblock/content:browser",
|
||||
->>>>>>> 9402d5c48c0e8... Squashed commits
|
||||
"//components/autofill/content/browser:risk_proto",
|
||||
"//components/autofill/core/browser",
|
||||
"//components/blocked_content",
|
||||
diff --git a/chrome/browser/ui/tab_helpers.cc b/chrome/browser/ui/tab_helpers.cc
|
||||
--- a/chrome/browser/ui/tab_helpers.cc
|
||||
+++ b/chrome/browser/ui/tab_helpers.cc
|
||||
@@ -17,14 +17,10 @@
|
||||
#include "base/trace_event/trace_event.h"
|
||||
#include "build/build_config.h"
|
||||
#include "build/chromeos_buildflags.h"
|
||||
-<<<<<<< HEAD
|
||||
#include "chrome/browser/3pcd/heuristics/opener_heuristic_tab_helper.h"
|
||||
-=======
|
||||
-#include "chrome/browser/3pcd_heuristics/opener_heuristic_tab_helper.h"
|
||||
#include "chrome/browser/adblock/element_hider_factory.h"
|
||||
#include "chrome/browser/adblock/sitekey_storage_factory.h"
|
||||
#include "chrome/browser/adblock/subscription_service_factory.h"
|
||||
->>>>>>> 9402d5c48c0e8... Squashed commits
|
||||
#include "chrome/browser/bookmarks/bookmark_model_factory.h"
|
||||
#include "chrome/browser/breadcrumbs/breadcrumb_manager_tab_helper.h"
|
||||
#include "chrome/browser/browser_process.h"
|
||||
diff --git a/extensions/common/mojom/api_permission_id.mojom b/extensions/common/mojom/api_permission_id.mojom
|
||||
--- a/extensions/common/mojom/api_permission_id.mojom
|
||||
+++ b/extensions/common/mojom/api_permission_id.mojom
|
||||
@@ -278,12 +278,9 @@ enum APIPermissionID {
|
||||
kSmartCardProviderPrivate = 247,
|
||||
kChromeOSEvents = 248,
|
||||
kChromeOSAttachedDeviceInfo = 249,
|
||||
-<<<<<<< HEAD
|
||||
kReadingList = 250,
|
||||
-=======
|
||||
kAdblockPrivate = 999,
|
||||
kEyeoFilteringPrivate = 1000,
|
||||
->>>>>>> 9402d5c48c0e8... Squashed commits
|
||||
|
||||
// Add new entries at the end of the enum and be sure to update the
|
||||
// "ExtensionPermission3" enum in tools/metrics/histograms/enums.xml
|
||||
--
|
||||
2.25.1
|
||||
@@ -55,7 +55,7 @@ License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html
|
||||
diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
|
||||
--- a/chrome/browser/BUILD.gn
|
||||
+++ b/chrome/browser/BUILD.gn
|
||||
@@ -2472,6 +2472,7 @@ static_library("browser") {
|
||||
@@ -2468,6 +2468,7 @@ static_library("browser") {
|
||||
"//third_party/ungoogled:switches",
|
||||
"//services/device/public/mojom",
|
||||
"//services/device/public/mojom:usb",
|
||||
|
||||
@@ -8,8 +8,8 @@ granted by user
|
||||
License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html
|
||||
---
|
||||
.../blink/renderer/core/frame/screen.cc | 25 +++++++++++++++++--
|
||||
.../blink/renderer/core/frame/screen.h | 8 ++++++
|
||||
2 files changed, 31 insertions(+), 2 deletions(-)
|
||||
.../blink/renderer/core/frame/screen.h | 10 ++++++++
|
||||
2 files changed, 33 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/third_party/blink/renderer/core/frame/screen.cc b/third_party/blink/renderer/core/frame/screen.cc
|
||||
--- a/third_party/blink/renderer/core/frame/screen.cc
|
||||
@@ -70,7 +70,7 @@ diff --git a/third_party/blink/renderer/core/frame/screen.cc b/third_party/blink
|
||||
diff --git a/third_party/blink/renderer/core/frame/screen.h b/third_party/blink/renderer/core/frame/screen.h
|
||||
--- a/third_party/blink/renderer/core/frame/screen.h
|
||||
+++ b/third_party/blink/renderer/core/frame/screen.h
|
||||
@@ -33,12 +33,20 @@
|
||||
@@ -33,10 +33,14 @@
|
||||
#include "third_party/blink/renderer/core/dom/events/event_target.h"
|
||||
#include "third_party/blink/renderer/core/execution_context/execution_context_lifecycle_observer.h"
|
||||
#include "third_party/blink/renderer/platform/heap/garbage_collected.h"
|
||||
@@ -80,16 +80,23 @@ diff --git a/third_party/blink/renderer/core/frame/screen.h b/third_party/blink/
|
||||
#include "third_party/blink/renderer/platform/wtf/text/atomic_string.h"
|
||||
#include "ui/gfx/geometry/rect.h"
|
||||
|
||||
+#include "third_party/blink/public/mojom/permissions/permission.mojom-blink.h"
|
||||
+
|
||||
namespace display {
|
||||
struct ScreenInfo;
|
||||
}
|
||||
@@ -91,6 +95,12 @@ class CORE_EXPORT Screen : public EventTarget,
|
||||
|
||||
// The internal id of the underlying display, to support multi-screen devices.
|
||||
int64_t display_id_;
|
||||
+
|
||||
+ private:
|
||||
+ void DidGetPermissionState(mojom::blink::PermissionStatus status);
|
||||
+
|
||||
+ bool has_permission_ = false;
|
||||
+ HeapMojoRemote<mojom::blink::PermissionService> permission_service_;
|
||||
}
|
||||
};
|
||||
|
||||
namespace blink {
|
||||
} // namespace blink
|
||||
--
|
||||
2.25.1
|
||||
|
||||
@@ -2,47 +2,89 @@ From: uazo <uazo@users.noreply.github.com>
|
||||
Date: Tue, 5 Sep 2023 12:55:40 +0000
|
||||
Subject: Remove GoogleAccountsPrivateApiHost
|
||||
|
||||
License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html
|
||||
---
|
||||
.../browser/chrome_content_browser_client_receiver_bindings.cc | 2 +-
|
||||
chrome/browser/signin/google_accounts_private_api_host.cc | 2 +-
|
||||
chrome/renderer/chrome_content_renderer_client.cc | 2 +-
|
||||
3 files changed, 3 insertions(+), 3 deletions(-)
|
||||
.../google_accounts_private_api_util.cc | 20 +------------------
|
||||
...rusted_vault_encryption_keys_tab_helper.cc | 6 ++----
|
||||
.../google_accounts_private_api_util.cc | 11 ----------
|
||||
3 files changed, 3 insertions(+), 34 deletions(-)
|
||||
|
||||
diff --git a/chrome/browser/chrome_content_browser_client_receiver_bindings.cc b/chrome/browser/chrome_content_browser_client_receiver_bindings.cc
|
||||
--- a/chrome/browser/chrome_content_browser_client_receiver_bindings.cc
|
||||
+++ b/chrome/browser/chrome_content_browser_client_receiver_bindings.cc
|
||||
@@ -543,7 +543,7 @@ void ChromeContentBrowserClient::
|
||||
chrome::mojom::GoogleAccountsPrivateApiExtension>(base::BindRepeating(
|
||||
[](content::RenderFrameHost* render_frame_host,
|
||||
mojo::PendingAssociatedReceiver<
|
||||
- chrome::mojom::GoogleAccountsPrivateApiExtension> receiver) {
|
||||
+ chrome::mojom::GoogleAccountsPrivateApiExtension_UAZO_REMOVE_IT> receiver) {
|
||||
GoogleAccountsPrivateApiHost::BindHost(std::move(receiver),
|
||||
render_frame_host);
|
||||
},
|
||||
diff --git a/chrome/browser/signin/google_accounts_private_api_host.cc b/chrome/browser/signin/google_accounts_private_api_host.cc
|
||||
--- a/chrome/browser/signin/google_accounts_private_api_host.cc
|
||||
+++ b/chrome/browser/signin/google_accounts_private_api_host.cc
|
||||
@@ -9,7 +9,7 @@
|
||||
#include "content/public/browser/navigation_handle.h"
|
||||
#include "content/public/browser/render_frame_host.h"
|
||||
diff --git a/chrome/browser/signin/google_accounts_private_api_util.cc b/chrome/browser/signin/google_accounts_private_api_util.cc
|
||||
--- a/chrome/browser/signin/google_accounts_private_api_util.cc
|
||||
+++ b/chrome/browser/signin/google_accounts_private_api_util.cc
|
||||
@@ -9,25 +9,7 @@
|
||||
#include "content/public/browser/site_instance.h"
|
||||
#include "google_apis/gaia/gaia_urls.h"
|
||||
|
||||
-GoogleAccountsPrivateApiHost::GoogleAccountsPrivateApiHost(
|
||||
+GoogleAccountsPrivateApiHost::GoogleAccountsPrivateApiHost_UAZO_REMOVE_IT(
|
||||
content::RenderFrameHost* rfh,
|
||||
base::RepeatingCallback<void(const std::string&)>
|
||||
on_consent_result_callback)
|
||||
diff --git a/chrome/renderer/chrome_content_renderer_client.cc b/chrome/renderer/chrome_content_renderer_client.cc
|
||||
--- a/chrome/renderer/chrome_content_renderer_client.cc
|
||||
+++ b/chrome/renderer/chrome_content_renderer_client.cc
|
||||
@@ -644,7 +644,7 @@ void ChromeContentRendererClient::RenderFrameCreated(
|
||||
#endif
|
||||
-const url::Origin& GetAllowedGoogleAccountsOrigin() {
|
||||
- const url::Origin& origin = GaiaUrls::GetInstance()->gaia_origin();
|
||||
- CHECK(!origin.opaque());
|
||||
- return origin;
|
||||
-}
|
||||
-
|
||||
bool ShouldExposeGoogleAccountsPrivateApi(
|
||||
content::NavigationHandle* navigation_handle) {
|
||||
- if (!navigation_handle->HasCommitted() || navigation_handle->IsErrorPage()) {
|
||||
- return false;
|
||||
- }
|
||||
-
|
||||
- content::RenderFrameHost* rfh = navigation_handle->GetRenderFrameHost();
|
||||
- const url::Origin rfh_origin = rfh->GetLastCommittedOrigin();
|
||||
- // Restrict to allowed origin and only if site isolation requires a dedicated
|
||||
- // process. The host is compared explicitly to confirm that the allowed origin
|
||||
- // uses a dedicated process, rather than sharing process with eTLD+1.
|
||||
- return rfh_origin == GetAllowedGoogleAccountsOrigin() &&
|
||||
- rfh->GetSiteInstance()->RequiresDedicatedProcess() &&
|
||||
- rfh->GetSiteInstance()->GetSiteURL().host() ==
|
||||
- GetAllowedGoogleAccountsOrigin().host();
|
||||
+ return false;
|
||||
}
|
||||
diff --git a/chrome/browser/trusted_vault/trusted_vault_encryption_keys_tab_helper.cc b/chrome/browser/trusted_vault/trusted_vault_encryption_keys_tab_helper.cc
|
||||
--- a/chrome/browser/trusted_vault/trusted_vault_encryption_keys_tab_helper.cc
|
||||
+++ b/chrome/browser/trusted_vault/trusted_vault_encryption_keys_tab_helper.cc
|
||||
@@ -56,8 +56,7 @@ class EncryptionKeyApi
|
||||
trusted_vault_keys,
|
||||
SetEncryptionKeysCallback callback) override {
|
||||
// Extra safeguard.
|
||||
- if (receivers_.GetCurrentTargetFrame()->GetLastCommittedOrigin() !=
|
||||
- GetAllowedGoogleAccountsOrigin()) {
|
||||
+ if ((true)) {
|
||||
return;
|
||||
}
|
||||
|
||||
TrustedVaultEncryptionKeysExtension::Create(render_frame);
|
||||
- GoogleAccountsPrivateApiExtension::Create(render_frame);
|
||||
+ GoogleAccountsPrivateApiExtension::Create(render_frame); (UAZO) REMOVE IT
|
||||
@@ -90,8 +89,7 @@ class EncryptionKeyApi
|
||||
int method_type_hint,
|
||||
AddTrustedRecoveryMethodCallback callback) override {
|
||||
// Extra safeguard.
|
||||
- if (receivers_.GetCurrentTargetFrame()->GetLastCommittedOrigin() !=
|
||||
- GetAllowedGoogleAccountsOrigin()) {
|
||||
+ if ((true)) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (render_frame->IsMainFrame())
|
||||
new webapps::WebPageMetadataAgent(render_frame);
|
||||
diff --git a/chrome/renderer/google_accounts_private_api_util.cc b/chrome/renderer/google_accounts_private_api_util.cc
|
||||
--- a/chrome/renderer/google_accounts_private_api_util.cc
|
||||
+++ b/chrome/renderer/google_accounts_private_api_util.cc
|
||||
@@ -12,20 +12,9 @@
|
||||
|
||||
namespace {
|
||||
|
||||
-const url::Origin& GetAllowedGoogleAccountsOrigin() {
|
||||
- const url::Origin& origin = GaiaUrls::GetInstance()->gaia_origin();
|
||||
- CHECK(!origin.opaque());
|
||||
- return origin;
|
||||
-}
|
||||
-
|
||||
} // namespace
|
||||
|
||||
bool ShouldExposeGoogleAccountsJavascriptApi(
|
||||
content::RenderFrame* render_frame) {
|
||||
if ((true)) return false;
|
||||
- DCHECK(render_frame);
|
||||
-
|
||||
- const url::Origin origin = render_frame->GetWebFrame()->GetSecurityOrigin();
|
||||
- return origin == GetAllowedGoogleAccountsOrigin() &&
|
||||
- blink::Platform::Current()->IsLockedToSite();
|
||||
}
|
||||
--
|
||||
2.25.1
|
||||
|
||||
@@ -397,7 +397,7 @@ diff --git a/chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc
|
||||
diff --git a/chrome/browser/ui/tab_helpers.cc b/chrome/browser/ui/tab_helpers.cc
|
||||
--- a/chrome/browser/ui/tab_helpers.cc
|
||||
+++ b/chrome/browser/ui/tab_helpers.cc
|
||||
@@ -66,6 +66,7 @@
|
||||
@@ -63,6 +63,7 @@
|
||||
#include "chrome/browser/page_load_metrics/page_load_metrics_initialize.h"
|
||||
#include "chrome/browser/password_manager/chrome_password_manager_client.h"
|
||||
#include "chrome/browser/performance_manager/public/user_tuning/user_performance_tuning_manager.h"
|
||||
@@ -405,7 +405,7 @@ diff --git a/chrome/browser/ui/tab_helpers.cc b/chrome/browser/ui/tab_helpers.cc
|
||||
#include "chrome/browser/permissions/one_time_permissions_tracker_helper.h"
|
||||
#include "chrome/browser/predictors/loading_predictor_factory.h"
|
||||
#include "chrome/browser/predictors/loading_predictor_tab_helper.h"
|
||||
@@ -399,6 +400,7 @@ void TabHelpers::AttachTabHelpers(WebContents* web_contents) {
|
||||
@@ -396,6 +397,7 @@ void TabHelpers::AttachTabHelpers(WebContents* web_contents) {
|
||||
HistoryClustersTabHelper::CreateForWebContents(web_contents);
|
||||
HttpsOnlyModeTabHelper::CreateForWebContents(web_contents);
|
||||
webapps::InstallableManager::CreateForWebContents(web_contents);
|
||||
|
||||
@@ -1,37 +0,0 @@
|
||||
From: uazo <uazo@users.noreply.github.com>
|
||||
Date: Mon, 1 May 2023 12:08:46 +0000
|
||||
Subject: v113 temp fix build
|
||||
|
||||
License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html
|
||||
---
|
||||
android_webview/system_webview_bundle.gni | 4 ++++
|
||||
chrome/browser/safe_browsing/BUILD.gn | 1 +
|
||||
2 files changed, 5 insertions(+)
|
||||
|
||||
diff --git a/android_webview/system_webview_bundle.gni b/android_webview/system_webview_bundle.gni
|
||||
--- a/android_webview/system_webview_bundle.gni
|
||||
+++ b/android_webview/system_webview_bundle.gni
|
||||
@@ -84,6 +84,10 @@ template("system_webview_bundle") {
|
||||
custom_assertion_handler = crash_reporting_assertion_handler
|
||||
}
|
||||
}
|
||||
+ } else {
|
||||
+ not_needed(["_base_target_name", "_base_target_gen_dir",
|
||||
+ "_base_module_build_config", "_rebased_base_module_build_config",
|
||||
+ "_base_module_version_code"])
|
||||
}
|
||||
|
||||
android_app_bundle(target_name) {
|
||||
diff --git a/chrome/browser/safe_browsing/BUILD.gn b/chrome/browser/safe_browsing/BUILD.gn
|
||||
--- a/chrome/browser/safe_browsing/BUILD.gn
|
||||
+++ b/chrome/browser/safe_browsing/BUILD.gn
|
||||
@@ -210,6 +210,7 @@ static_library("safe_browsing") {
|
||||
"//components/version_info",
|
||||
"//content/public/browser",
|
||||
"//services/preferences/public/mojom:mojom",
|
||||
+ "//third_party/flatbuffers:flatbuffers",
|
||||
]
|
||||
if (safe_browsing_mode == 1) {
|
||||
# "Safe Browsing Full" files in addition to the "basic" ones to use for
|
||||
--
|
||||
2.25.1
|
||||
@@ -825,7 +825,7 @@ diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
|
||||
configs += [
|
||||
"//build/config/compiler:wexit_time_destructors",
|
||||
"//build/config:precompiled_headers",
|
||||
@@ -3587,8 +3596,6 @@ static_library("browser") {
|
||||
@@ -3583,8 +3592,6 @@ static_library("browser") {
|
||||
"badging/badge_manager_factory.h",
|
||||
"banners/app_banner_manager_desktop.cc",
|
||||
"banners/app_banner_manager_desktop.h",
|
||||
|
||||
@@ -52,8 +52,8 @@ See also: https://github.com/bromite/bromite/issues/1549
|
||||
Original License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html
|
||||
License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
|
||||
---
|
||||
.../permissions/last_tab_standing_tracker.cc | 33 ++++++++
|
||||
.../one_time_permissions_tracker.cc | 34 +++++++-
|
||||
.../permissions/last_tab_standing_tracker.cc | 32 ++++++++
|
||||
.../one_time_permissions_tracker.cc | 33 +++++++-
|
||||
.../one_time_permissions_tracker.h | 5 +-
|
||||
.../one_time_permissions_tracker_factory.cc | 2 +-
|
||||
.../permission_prompt_bubble_base_view.cc | 2 +-
|
||||
@@ -87,12 +87,12 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
|
||||
components/permissions/permission_request.h | 18 ++++-
|
||||
.../permissions/permission_request_manager.cc | 45 +++++++----
|
||||
.../permissions/permission_request_manager.h | 11 ++-
|
||||
35 files changed, 523 insertions(+), 60 deletions(-)
|
||||
35 files changed, 521 insertions(+), 60 deletions(-)
|
||||
|
||||
diff --git a/chrome/browser/permissions/last_tab_standing_tracker.cc b/chrome/browser/permissions/last_tab_standing_tracker.cc
|
||||
--- a/chrome/browser/permissions/last_tab_standing_tracker.cc
|
||||
+++ b/chrome/browser/permissions/last_tab_standing_tracker.cc
|
||||
@@ -7,6 +7,33 @@
|
||||
@@ -7,6 +7,32 @@
|
||||
#include "base/observer_list.h"
|
||||
#include "url/gurl.h"
|
||||
|
||||
@@ -105,10 +105,9 @@ diff --git a/chrome/browser/permissions/last_tab_standing_tracker.cc b/chrome/br
|
||||
+ void RemoveSessionSettings(HostContentSettingsMap* content_settings,
|
||||
+ const url::Origin& origin,
|
||||
+ ContentSettingsType type) {
|
||||
+ ContentSettingsForOneType session_settings;
|
||||
+ content_settings->GetSettingsForOneType(
|
||||
+ type, &session_settings,
|
||||
+ content_settings::SessionModel::UserSession);
|
||||
+ ContentSettingsForOneType session_settings =
|
||||
+ content_settings->GetSettingsForOneType(
|
||||
+ type, content_settings::SessionModel::UserSession);
|
||||
+
|
||||
+ GURL url = origin.GetURL();
|
||||
+ for (ContentSettingPatternSource& entry : session_settings) {
|
||||
@@ -126,7 +125,7 @@ diff --git a/chrome/browser/permissions/last_tab_standing_tracker.cc b/chrome/br
|
||||
LastTabStandingTracker::LastTabStandingTracker(content::BrowserContext* context)
|
||||
: context_(context) {}
|
||||
|
||||
@@ -56,4 +83,10 @@ void LastTabStandingTracker::WebContentsUnloadedOrigin(
|
||||
@@ -56,4 +82,10 @@ void LastTabStandingTracker::WebContentsUnloadedOrigin(
|
||||
for (auto& observer : observer_list_) {
|
||||
observer.OnLastPageFromOriginClosed(origin);
|
||||
}
|
||||
@@ -140,7 +139,7 @@ diff --git a/chrome/browser/permissions/last_tab_standing_tracker.cc b/chrome/br
|
||||
diff --git a/chrome/browser/permissions/one_time_permissions_tracker.cc b/chrome/browser/permissions/one_time_permissions_tracker.cc
|
||||
--- a/chrome/browser/permissions/one_time_permissions_tracker.cc
|
||||
+++ b/chrome/browser/permissions/one_time_permissions_tracker.cc
|
||||
@@ -18,8 +18,35 @@
|
||||
@@ -18,8 +18,34 @@
|
||||
#include "components/permissions/features.h"
|
||||
#include "content/public/browser/visibility.h"
|
||||
#include "url/gurl.h"
|
||||
@@ -153,10 +152,9 @@ diff --git a/chrome/browser/permissions/one_time_permissions_tracker.cc b/chrome
|
||||
+ void RemoveSessionSettings(HostContentSettingsMap* content_settings,
|
||||
+ const url::Origin& origin,
|
||||
+ ContentSettingsType type) {
|
||||
+ ContentSettingsForOneType session_settings;
|
||||
+ content_settings->GetSettingsForOneType(
|
||||
+ type, &session_settings,
|
||||
+ content_settings::SessionModel::UserSession);
|
||||
+ ContentSettingsForOneType session_settings =
|
||||
+ content_settings->GetSettingsForOneType(
|
||||
+ type, content_settings::SessionModel::UserSession);
|
||||
+
|
||||
+ GURL url = origin.GetURL();
|
||||
+ for (ContentSettingPatternSource& entry : session_settings) {
|
||||
@@ -177,7 +175,7 @@ diff --git a/chrome/browser/permissions/one_time_permissions_tracker.cc b/chrome
|
||||
OneTimePermissionsTracker::~OneTimePermissionsTracker() = default;
|
||||
|
||||
OneTimePermissionsTracker::OriginTrackEntry::OriginTrackEntry() = default;
|
||||
@@ -93,6 +120,11 @@ void OneTimePermissionsTracker::WebContentsUnloadedOrigin(
|
||||
@@ -93,6 +119,11 @@ void OneTimePermissionsTracker::WebContentsUnloadedOrigin(
|
||||
observer.OnLastPageFromOriginClosed(origin);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,6 +6,8 @@ And allow use about:blank as default homepage
|
||||
|
||||
License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
|
||||
---
|
||||
.../tab_management/TabGridDialogMediator.java | 7 ++++++-
|
||||
.../tasks/tab_management/TabGroupUiMediator.java | 7 ++++++-
|
||||
.../java/res/xml/homepage_preferences.xml | 5 +++++
|
||||
.../chrome/browser/homepage/HomepageManager.java | 16 ++++++++++++++++
|
||||
.../homepage/settings/HomepageSettings.java | 12 ++++++++++++
|
||||
@@ -16,8 +18,59 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
|
||||
.../android/strings/android_chrome_strings.grd | 3 +++
|
||||
chrome/browser/ui/browser_ui_prefs.cc | 2 ++
|
||||
chrome/common/pref_names.h | 4 ++++
|
||||
10 files changed, 51 insertions(+), 1 deletion(-)
|
||||
12 files changed, 63 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabGridDialogMediator.java b/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabGridDialogMediator.java
|
||||
--- a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabGridDialogMediator.java
|
||||
+++ b/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabGridDialogMediator.java
|
||||
@@ -18,6 +18,7 @@ import org.chromium.base.Callback;
|
||||
import org.chromium.base.ResettersForTesting;
|
||||
import org.chromium.base.metrics.RecordUserAction;
|
||||
import org.chromium.base.supplier.Supplier;
|
||||
+import org.chromium.chrome.browser.homepage.HomepageManager;
|
||||
import org.chromium.chrome.browser.tab.Tab;
|
||||
import org.chromium.chrome.browser.tab.TabCreationState;
|
||||
import org.chromium.chrome.browser.tab.TabLaunchType;
|
||||
@@ -578,9 +579,13 @@ public class TabGridDialogMediator
|
||||
|
||||
assert relatedTabs.size() > 0;
|
||||
|
||||
+ String url = UrlConstants.NTP_URL;
|
||||
+ if (HomepageManager.getInstance().getPrefNTPIsHomepageEnabled()) {
|
||||
+ url = HomepageManager.getInstance().getHomepageUri();
|
||||
+ }
|
||||
Tab parentTabToAttach = relatedTabs.get(relatedTabs.size() - 1);
|
||||
mTabCreatorManager.getTabCreator(currentTab.isIncognito())
|
||||
- .createNewTab(new LoadUrlParams(UrlConstants.NTP_URL),
|
||||
+ .createNewTab(new LoadUrlParams(url),
|
||||
TabLaunchType.FROM_TAB_GROUP_UI, parentTabToAttach);
|
||||
RecordUserAction.record("MobileNewTabOpened." + mComponentName);
|
||||
};
|
||||
diff --git a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabGroupUiMediator.java b/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabGroupUiMediator.java
|
||||
--- a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabGroupUiMediator.java
|
||||
+++ b/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabGroupUiMediator.java
|
||||
@@ -17,6 +17,7 @@ import org.chromium.base.metrics.RecordUserAction;
|
||||
import org.chromium.base.supplier.ObservableSupplier;
|
||||
import org.chromium.base.supplier.ObservableSupplierImpl;
|
||||
import org.chromium.base.supplier.OneshotSupplier;
|
||||
+import org.chromium.chrome.browser.homepage.HomepageManager;
|
||||
import org.chromium.chrome.browser.layouts.LayoutStateProvider;
|
||||
import org.chromium.chrome.browser.layouts.LayoutStateProvider.LayoutStateObserver;
|
||||
import org.chromium.chrome.browser.layouts.LayoutType;
|
||||
@@ -350,8 +351,12 @@ public class TabGroupUiMediator implements BackPressHandler {
|
||||
|
||||
parentTabToAttach = relatedTabs.get(relatedTabs.size() - 1);
|
||||
}
|
||||
+ String url = UrlConstants.NTP_URL;
|
||||
+ if (HomepageManager.getInstance().getPrefNTPIsHomepageEnabled()) {
|
||||
+ url = HomepageManager.getInstance().getHomepageUri();
|
||||
+ }
|
||||
mTabCreatorManager.getTabCreator(currentTab.isIncognito())
|
||||
- .createNewTab(new LoadUrlParams(UrlConstants.NTP_URL),
|
||||
+ .createNewTab(new LoadUrlParams(url),
|
||||
TabLaunchType.FROM_TAB_GROUP_UI, parentTabToAttach);
|
||||
RecordUserAction.record("MobileNewTabOpened." + TabGroupUiCoordinator.COMPONENT_NAME);
|
||||
};
|
||||
diff --git a/chrome/android/java/res/xml/homepage_preferences.xml b/chrome/android/java/res/xml/homepage_preferences.xml
|
||||
--- a/chrome/android/java/res/xml/homepage_preferences.xml
|
||||
+++ b/chrome/android/java/res/xml/homepage_preferences.xml
|
||||
|
||||
@@ -4,11 +4,19 @@ Subject: Allow building without supervised users
|
||||
|
||||
License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
|
||||
---
|
||||
chrome/android/BUILD.gn | 1 -
|
||||
chrome/android/chrome_java_sources.gni | 1 -
|
||||
chrome/browser/BUILD.gn | 6 ------
|
||||
components/supervised_user/buildflags.gni | 6 +-----
|
||||
4 files changed, 1 insertion(+), 13 deletions(-)
|
||||
chrome/android/BUILD.gn | 1 -
|
||||
chrome/android/chrome_java_sources.gni | 1 -
|
||||
chrome/browser/BUILD.gn | 6 ------
|
||||
.../browser/extensions/api/settings_private/prefs_util.cc | 2 ++
|
||||
chrome/browser/profiles/profile_impl.cc | 4 ++++
|
||||
chrome/browser/profiles/profile_manager.cc | 4 ++++
|
||||
chrome/browser/ui/webui/managed_ui_handler.cc | 2 ++
|
||||
.../browser/ui/webui/management/management_ui_handler.cc | 2 ++
|
||||
components/supervised_user/buildflags.gni | 6 +-----
|
||||
components/supervised_user/core/common/pref_names.h | 4 ++++
|
||||
.../core/common/supervised_user_constants.cc | 2 ++
|
||||
.../supervised_user/core/common/supervised_user_utils.cc | 8 ++++++++
|
||||
12 files changed, 29 insertions(+), 13 deletions(-)
|
||||
|
||||
diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn
|
||||
--- a/chrome/android/BUILD.gn
|
||||
@@ -35,7 +43,7 @@ diff --git a/chrome/android/chrome_java_sources.gni b/chrome/android/chrome_java
|
||||
diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
|
||||
--- a/chrome/browser/BUILD.gn
|
||||
+++ b/chrome/browser/BUILD.gn
|
||||
@@ -3074,8 +3074,6 @@ static_library("browser") {
|
||||
@@ -3070,8 +3070,6 @@ static_library("browser") {
|
||||
"feed/android/refresh_task_scheduler_impl.cc",
|
||||
"feed/android/refresh_task_scheduler_impl.h",
|
||||
"feed/android/web_feed_bridge.cc",
|
||||
@@ -44,7 +52,7 @@ diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
|
||||
"file_select_helper_contacts_android.cc",
|
||||
"file_select_helper_contacts_android.h",
|
||||
"first_run/android/first_run_prefs.cc",
|
||||
@@ -3290,10 +3288,6 @@ static_library("browser") {
|
||||
@@ -3286,10 +3284,6 @@ static_library("browser") {
|
||||
"ssl/chrome_security_state_model_delegate.h",
|
||||
"ssl/known_interception_disclosure_infobar.cc",
|
||||
"ssl/known_interception_disclosure_infobar.h",
|
||||
@@ -55,6 +63,112 @@ diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
|
||||
"sync/glue/synced_tab_delegate_android.cc",
|
||||
"sync/glue/synced_tab_delegate_android.h",
|
||||
"sync/glue/synced_window_delegate_android.cc",
|
||||
diff --git a/chrome/browser/extensions/api/settings_private/prefs_util.cc b/chrome/browser/extensions/api/settings_private/prefs_util.cc
|
||||
--- a/chrome/browser/extensions/api/settings_private/prefs_util.cc
|
||||
+++ b/chrome/browser/extensions/api/settings_private/prefs_util.cc
|
||||
@@ -1006,9 +1006,11 @@ const PrefsUtil::TypedPrefMap& PrefsUtil::GetAllowlistedKeys() {
|
||||
settings_api::PrefType::PREF_TYPE_BOOLEAN;
|
||||
#endif
|
||||
|
||||
+#if BUILDFLAG(ENABLE_SUPERVISED_USERS)
|
||||
// Supervised Users. This setting is queried in our Tast tests (b/241943380).
|
||||
(*s_allowlist)[::prefs::kSupervisedUserExtensionsMayRequestPermissions] =
|
||||
settings_api::PrefType::PREF_TYPE_BOOLEAN;
|
||||
+#endif
|
||||
|
||||
#if BUILDFLAG(IS_CHROMEOS_LACROS)
|
||||
(*s_allowlist)[::prefs::kUseAshProxy] =
|
||||
diff --git a/chrome/browser/profiles/profile_impl.cc b/chrome/browser/profiles/profile_impl.cc
|
||||
--- a/chrome/browser/profiles/profile_impl.cc
|
||||
+++ b/chrome/browser/profiles/profile_impl.cc
|
||||
@@ -691,10 +691,12 @@ void ProfileImpl::DoFinalInit(CreateMode create_mode) {
|
||||
prefs->SetTime(prefs::kProfileCreationTime, path_creation_time_);
|
||||
|
||||
pref_change_registrar_.Init(prefs);
|
||||
+#if BUILDFLAG(ENABLE_SUPERVISED_USERS)
|
||||
pref_change_registrar_.Add(
|
||||
prefs::kSupervisedUserId,
|
||||
base::BindRepeating(&ProfileImpl::UpdateSupervisedUserIdInStorage,
|
||||
base::Unretained(this)));
|
||||
+#endif
|
||||
|
||||
// Changes in the profile avatar.
|
||||
pref_change_registrar_.Add(
|
||||
@@ -1614,11 +1616,13 @@ GURL ProfileImpl::GetHomePage() {
|
||||
}
|
||||
|
||||
void ProfileImpl::UpdateSupervisedUserIdInStorage() {
|
||||
+#if BUILDFLAG(ENABLE_SUPERVISED_USERS)
|
||||
ProfileManager* profile_manager = g_browser_process->profile_manager();
|
||||
ProfileAttributesEntry* entry = profile_manager->GetProfileAttributesStorage()
|
||||
.GetProfileAttributesWithPath(GetPath());
|
||||
if (entry)
|
||||
entry->SetSupervisedUserId(GetPrefs()->GetString(prefs::kSupervisedUserId));
|
||||
+#endif
|
||||
}
|
||||
|
||||
void ProfileImpl::UpdateNameInStorage() {
|
||||
diff --git a/chrome/browser/profiles/profile_manager.cc b/chrome/browser/profiles/profile_manager.cc
|
||||
--- a/chrome/browser/profiles/profile_manager.cc
|
||||
+++ b/chrome/browser/profiles/profile_manager.cc
|
||||
@@ -1178,6 +1178,7 @@ void ProfileManager::InitProfileUserPrefs(Profile* profile) {
|
||||
profile->GetPrefs()->SetString(prefs::kProfileName, profile_name);
|
||||
}
|
||||
|
||||
+#if BUILDFLAG(ENABLE_SUPERVISED_USERS)
|
||||
base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
|
||||
bool force_supervised_user_id =
|
||||
#if BUILDFLAG(IS_CHROMEOS_ASH)
|
||||
@@ -1199,6 +1200,7 @@ void ProfileManager::InitProfileUserPrefs(Profile* profile) {
|
||||
profile->GetPrefs()->SetString(prefs::kSupervisedUserId,
|
||||
supervised_user_id);
|
||||
}
|
||||
+#endif
|
||||
#if !BUILDFLAG(IS_ANDROID)
|
||||
if (profile->IsNewProfile()) {
|
||||
profile->GetPrefs()->SetBoolean(prefs::kHasSeenWelcomePage, false);
|
||||
@@ -1966,8 +1968,10 @@ void ProfileManager::AddProfileToStorage(Profile* profile) {
|
||||
init_params.icon_index =
|
||||
profile->GetPrefs()->GetInteger(prefs::kProfileAvatarIndex);
|
||||
|
||||
+#if BUILDFLAG(ENABLE_SUPERVISED_USERS)
|
||||
init_params.supervised_user_id =
|
||||
profile->GetPrefs()->GetString(prefs::kSupervisedUserId);
|
||||
+#endif
|
||||
|
||||
#if BUILDFLAG(IS_CHROMEOS_ASH)
|
||||
user_manager::User* user =
|
||||
diff --git a/chrome/browser/ui/webui/managed_ui_handler.cc b/chrome/browser/ui/webui/managed_ui_handler.cc
|
||||
--- a/chrome/browser/ui/webui/managed_ui_handler.cc
|
||||
+++ b/chrome/browser/ui/webui/managed_ui_handler.cc
|
||||
@@ -90,9 +90,11 @@ void ManagedUIHandler::AddObservers() {
|
||||
policy_service->AddObserver(domain, this);
|
||||
}
|
||||
|
||||
+#if BUILDFLAG(ENABLE_SUPERVISED_USERS)
|
||||
pref_registrar_.Add(prefs::kSupervisedUserId,
|
||||
base::BindRepeating(&ManagedUIHandler::NotifyIfChanged,
|
||||
base::Unretained(this)));
|
||||
+#endif
|
||||
}
|
||||
|
||||
void ManagedUIHandler::RemoveObservers() {
|
||||
diff --git a/chrome/browser/ui/webui/management/management_ui_handler.cc b/chrome/browser/ui/webui/management/management_ui_handler.cc
|
||||
--- a/chrome/browser/ui/webui/management/management_ui_handler.cc
|
||||
+++ b/chrome/browser/ui/webui/management/management_ui_handler.cc
|
||||
@@ -1423,10 +1423,12 @@ void ManagementUIHandler::AddObservers() {
|
||||
|
||||
pref_registrar_.Init(profile->GetPrefs());
|
||||
|
||||
+#if BUILDFLAG(ENABLE_SUPERVISED_USERS)
|
||||
pref_registrar_.Add(
|
||||
prefs::kSupervisedUserId,
|
||||
base::BindRepeating(&ManagementUIHandler::UpdateManagedState,
|
||||
base::Unretained(this)));
|
||||
+#endif
|
||||
|
||||
#if BUILDFLAG(IS_CHROMEOS_ASH)
|
||||
pref_registrar_.Add(
|
||||
diff --git a/components/supervised_user/buildflags.gni b/components/supervised_user/buildflags.gni
|
||||
--- a/components/supervised_user/buildflags.gni
|
||||
+++ b/components/supervised_user/buildflags.gni
|
||||
@@ -69,5 +183,79 @@ diff --git a/components/supervised_user/buildflags.gni b/components/supervised_u
|
||||
- is_ios || is_linux || is_mac || is_win
|
||||
+ enable_supervised_users = false
|
||||
}
|
||||
diff --git a/components/supervised_user/core/common/pref_names.h b/components/supervised_user/core/common/pref_names.h
|
||||
--- a/components/supervised_user/core/common/pref_names.h
|
||||
+++ b/components/supervised_user/core/common/pref_names.h
|
||||
@@ -5,8 +5,10 @@
|
||||
#ifndef COMPONENTS_SUPERVISED_USER_CORE_COMMON_PREF_NAMES_H_
|
||||
#define COMPONENTS_SUPERVISED_USER_CORE_COMMON_PREF_NAMES_H_
|
||||
|
||||
+#include "components/supervised_user/core/common/buildflags.h"
|
||||
#include "extensions/buildflags/buildflags.h"
|
||||
|
||||
+#if BUILDFLAG(ENABLE_SUPERVISED_USERS)
|
||||
namespace prefs {
|
||||
|
||||
// A bool pref that keeps whether the child status for this profile was already
|
||||
@@ -124,4 +126,6 @@ inline constexpr char kFirstTimeInterstitialBannerState[] =
|
||||
|
||||
} // namespace prefs
|
||||
|
||||
+#endif // BUILDFLAG(ENABLE_SUPERVISED_USERS)
|
||||
+
|
||||
#endif // COMPONENTS_SUPERVISED_USER_CORE_COMMON_PREF_NAMES_H_
|
||||
diff --git a/components/supervised_user/core/common/supervised_user_constants.cc b/components/supervised_user/core/common/supervised_user_constants.cc
|
||||
--- a/components/supervised_user/core/common/supervised_user_constants.cc
|
||||
+++ b/components/supervised_user/core/common/supervised_user_constants.cc
|
||||
@@ -68,6 +68,7 @@ const char kChromeOSAvatarIndex[] = "chromeos-avatar-index";
|
||||
|
||||
const char kChromeOSPasswordData[] = "chromeos-password-data";
|
||||
|
||||
+#if BUILDFLAG(ENABLE_SUPERVISED_USERS)
|
||||
const char* const kCustodianInfoPrefs[] = {
|
||||
prefs::kSupervisedUserCustodianName,
|
||||
prefs::kSupervisedUserCustodianEmail,
|
||||
@@ -80,6 +81,7 @@ const char* const kCustodianInfoPrefs[] = {
|
||||
prefs::kSupervisedUserSecondCustodianProfileURL,
|
||||
prefs::kSupervisedUserSecondCustodianProfileImageURL,
|
||||
};
|
||||
+#endif
|
||||
|
||||
const base::FilePath::CharType kSupervisedUserSettingsFilename[] =
|
||||
FILE_PATH_LITERAL("Managed Mode Settings");
|
||||
diff --git a/components/supervised_user/core/common/supervised_user_utils.cc b/components/supervised_user/core/common/supervised_user_utils.cc
|
||||
--- a/components/supervised_user/core/common/supervised_user_utils.cc
|
||||
+++ b/components/supervised_user/core/common/supervised_user_utils.cc
|
||||
@@ -76,11 +76,15 @@ GURL NormalizeUrl(const GURL& url) {
|
||||
}
|
||||
|
||||
bool AreWebFilterPrefsDefault(const PrefService& pref_service) {
|
||||
+#if BUILDFLAG(ENABLE_SUPERVISED_USERS)
|
||||
return pref_service
|
||||
.FindPreference(prefs::kDefaultSupervisedUserFilteringBehavior)
|
||||
->IsDefaultValue() ||
|
||||
pref_service.FindPreference(prefs::kSupervisedUserSafeSites)
|
||||
->IsDefaultValue();
|
||||
+#else
|
||||
+ return true;
|
||||
+#endif // BUILDFLAG(ENABLE_SUPERVISED_USERS)
|
||||
}
|
||||
|
||||
bool EmitLogSegmentHistogram(const std::vector<AccountInfo>& primary_accounts) {
|
||||
@@ -107,10 +111,14 @@ bool EmitLogSegmentHistogram(const std::vector<AccountInfo>& primary_accounts) {
|
||||
}
|
||||
|
||||
bool IsSubjectToParentalControls(const PrefService* pref_service) {
|
||||
+#if BUILDFLAG(ENABLE_SUPERVISED_USERS)
|
||||
return pref_service &&
|
||||
pref_service->GetString(prefs::kSupervisedUserId) ==
|
||||
kChildAccountSUID &&
|
||||
IsChildAccountSupervisionEnabled();
|
||||
+#else
|
||||
+ return false;
|
||||
+#endif
|
||||
}
|
||||
|
||||
} // namespace supervised_user
|
||||
--
|
||||
2.25.1
|
||||
|
||||
@@ -14,11 +14,12 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
|
||||
.../core/loader/frame_fetch_context.h | 1 +
|
||||
.../core/loader/worker_fetch_context.cc | 21 +++++++++++++
|
||||
.../core/loader/worker_fetch_context.h | 1 +
|
||||
.../core/workers/installed_scripts_manager.cc | 4 +--
|
||||
.../background_fetch_manager.cc | 31 +++++++++++++++++++
|
||||
.../websockets/websocket_channel_impl.cc | 5 +++
|
||||
.../modules/websockets/websocket_common.cc | 29 +++++++++++++++++
|
||||
.../modules/websockets/websocket_common.cc | 30 ++++++++++++++++++
|
||||
.../modules/websockets/websocket_common.h | 4 +++
|
||||
11 files changed, 130 insertions(+)
|
||||
12 files changed, 133 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/third_party/blink/renderer/core/execution_context/execution_context.cc b/third_party/blink/renderer/core/execution_context/execution_context.cc
|
||||
--- a/third_party/blink/renderer/core/execution_context/execution_context.cc
|
||||
@@ -33,8 +34,8 @@ diff --git a/third_party/blink/renderer/core/execution_context/execution_context
|
||||
+ case network::mojom::IPAddressSpace::kUnknown:
|
||||
+ return "public";
|
||||
+
|
||||
+ case network::mojom::IPAddressSpace::kLoopback:
|
||||
+ return "loopback";
|
||||
+ case network::mojom::IPAddressSpace::kPrivate:
|
||||
+ return "private";
|
||||
+
|
||||
+ case network::mojom::IPAddressSpace::kLocal:
|
||||
+ return "local";
|
||||
@@ -82,9 +83,9 @@ diff --git a/third_party/blink/renderer/core/loader/frame_fetch_context.cc b/thi
|
||||
+ network::mojom::IPAddressSpace target_space =
|
||||
+ network::mojom::IPAddressSpace::kPublic;
|
||||
+ if (network_utils::IsReservedIPAddress(request_url.Host()))
|
||||
+ target_space = network::mojom::IPAddressSpace::kLocal;
|
||||
+ target_space = network::mojom::IPAddressSpace::kPrivate;
|
||||
+ if (SecurityOrigin::Create(request_url)->IsLocalhost())
|
||||
+ target_space = network::mojom::IPAddressSpace::kLoopback;
|
||||
+ target_space = network::mojom::IPAddressSpace::kLocal;
|
||||
+
|
||||
+ bool is_external_request = requestor_space > target_space;
|
||||
+ if (is_external_request)
|
||||
@@ -131,9 +132,9 @@ diff --git a/third_party/blink/renderer/core/loader/worker_fetch_context.cc b/th
|
||||
+ network::mojom::IPAddressSpace target_space =
|
||||
+ network::mojom::IPAddressSpace::kPublic;
|
||||
+ if (network_utils::IsReservedIPAddress(request_url.Host()))
|
||||
+ target_space = network::mojom::IPAddressSpace::kLocal;
|
||||
+ target_space = network::mojom::IPAddressSpace::kPrivate;
|
||||
+ if (SecurityOrigin::Create(request_url)->IsLocalhost())
|
||||
+ target_space = network::mojom::IPAddressSpace::kLoopback;
|
||||
+ target_space = network::mojom::IPAddressSpace::kLocal;
|
||||
+
|
||||
+ bool is_external_request = requestor_space > target_space;
|
||||
+ if (is_external_request)
|
||||
@@ -156,6 +157,21 @@ diff --git a/third_party/blink/renderer/core/loader/worker_fetch_context.h b/thi
|
||||
bool ShouldBlockFetchByMixedContentCheck(
|
||||
mojom::blink::RequestContextType request_context,
|
||||
network::mojom::blink::IPAddressSpace target_address_space,
|
||||
diff --git a/third_party/blink/renderer/core/workers/installed_scripts_manager.cc b/third_party/blink/renderer/core/workers/installed_scripts_manager.cc
|
||||
--- a/third_party/blink/renderer/core/workers/installed_scripts_manager.cc
|
||||
+++ b/third_party/blink/renderer/core/workers/installed_scripts_manager.cc
|
||||
@@ -33,9 +33,9 @@ InstalledScriptsManager::ScriptData::ScriptData(
|
||||
// place so that this is shareable out of worker code.
|
||||
response_address_space_ = network::mojom::IPAddressSpace::kPublic;
|
||||
if (network_utils::IsReservedIPAddress(script_url_.Host()))
|
||||
- response_address_space_ = network::mojom::IPAddressSpace::kLocal;
|
||||
+ response_address_space_ = network::mojom::IPAddressSpace::kPrivate;
|
||||
if (SecurityOrigin::Create(script_url_)->IsLocalhost())
|
||||
- response_address_space_ = network::mojom::IPAddressSpace::kLoopback;
|
||||
+ response_address_space_ = network::mojom::IPAddressSpace::kLocal;
|
||||
}
|
||||
|
||||
ContentSecurityPolicyResponseHeaders
|
||||
diff --git a/third_party/blink/renderer/modules/background_fetch/background_fetch_manager.cc b/third_party/blink/renderer/modules/background_fetch/background_fetch_manager.cc
|
||||
--- a/third_party/blink/renderer/modules/background_fetch/background_fetch_manager.cc
|
||||
+++ b/third_party/blink/renderer/modules/background_fetch/background_fetch_manager.cc
|
||||
@@ -176,9 +192,9 @@ diff --git a/third_party/blink/renderer/modules/background_fetch/background_fetc
|
||||
+ network::mojom::IPAddressSpace target_space =
|
||||
+ network::mojom::IPAddressSpace::kPublic;
|
||||
+ if (network_utils::IsReservedIPAddress(request_url.Host()))
|
||||
+ target_space = network::mojom::IPAddressSpace::kLocal;
|
||||
+ target_space = network::mojom::IPAddressSpace::kPrivate;
|
||||
+ if (SecurityOrigin::Create(request_url)->IsLocalhost())
|
||||
+ target_space = network::mojom::IPAddressSpace::kLoopback;
|
||||
+ target_space = network::mojom::IPAddressSpace::kLocal;
|
||||
+
|
||||
+ bool is_external_request = requestor_space > target_space;
|
||||
+ if (is_external_request)
|
||||
@@ -222,7 +238,7 @@ diff --git a/third_party/blink/renderer/modules/websockets/websocket_channel_imp
|
||||
diff --git a/third_party/blink/renderer/modules/websockets/websocket_common.cc b/third_party/blink/renderer/modules/websockets/websocket_common.cc
|
||||
--- a/third_party/blink/renderer/modules/websockets/websocket_common.cc
|
||||
+++ b/third_party/blink/renderer/modules/websockets/websocket_common.cc
|
||||
@@ -125,9 +125,38 @@ WebSocketCommon::ConnectResult WebSocketCommon::Connect(
|
||||
@@ -125,9 +125,39 @@ WebSocketCommon::ConnectResult WebSocketCommon::Connect(
|
||||
return ConnectResult::kException;
|
||||
}
|
||||
|
||||
@@ -231,7 +247,8 @@ diff --git a/third_party/blink/renderer/modules/websockets/websocket_common.cc b
|
||||
+ if (ShouldBlockGateWayAttacks(requestor_space, url_)) {
|
||||
+ state_ = kClosed;
|
||||
+ exception_state.ThrowSecurityError(
|
||||
+ "Access to address of '" + url_.Host() + "' is not allowed from '" + execution_context->addressSpaceForBindings() + "' address space.");
|
||||
+ "Access to address of '" + url_.Host() +
|
||||
+ "' is not allowed from current address space.");
|
||||
+ return ConnectResult::kException;
|
||||
+ }
|
||||
+
|
||||
@@ -247,9 +264,9 @@ diff --git a/third_party/blink/renderer/modules/websockets/websocket_common.cc b
|
||||
+ network::mojom::IPAddressSpace target_space =
|
||||
+ network::mojom::IPAddressSpace::kPublic;
|
||||
+ if (network_utils::IsReservedIPAddress(request_url.Host()))
|
||||
+ target_space = network::mojom::IPAddressSpace::kLocal;
|
||||
+ target_space = network::mojom::IPAddressSpace::kPrivate;
|
||||
+ if (SecurityOrigin::Create(request_url)->IsLocalhost())
|
||||
+ target_space = network::mojom::IPAddressSpace::kLoopback;
|
||||
+ target_space = network::mojom::IPAddressSpace::kLocal;
|
||||
+
|
||||
+ bool is_external_request = requestor_space > target_space;
|
||||
+ if (is_external_request)
|
||||
|
||||
@@ -248,10 +248,10 @@ new file mode 100644
|
||||
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
|
||||
@@ -66,6 +66,11 @@
|
||||
android:key="safety_check"
|
||||
android:order="12"
|
||||
android:title="@string/prefs_safety_check"/>
|
||||
@@ -71,6 +71,11 @@
|
||||
android:key="eyeo_adblock"
|
||||
android:order="13"
|
||||
android:title="@string/adblock_settings_title" />
|
||||
+ <Preference
|
||||
+ android:fragment="org.chromium.chrome.browser.settings.AdBlockPreferences"
|
||||
+ android:key="adblock"
|
||||
@@ -656,7 +656,7 @@ diff --git a/chrome/browser/ui/android/strings/android_chrome_strings.grd b/chro
|
||||
|
||||
+ <!-- AdBlock settings -->
|
||||
+ <message name="IDS_PREFS_ADBLOCK" desc="Title of the AdBlock Settings screen. [CHAR-LIMIT=32]">
|
||||
+ AdBlock settings
|
||||
+ Legacy 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
|
||||
|
||||
@@ -24,13 +24,13 @@ Require: bromite-build-utils.patch
|
||||
chrome/browser/ui/BUILD.gn | 1 +
|
||||
.../views/page_info/page_info_view_factory.cc | 13 +
|
||||
.../settings_localized_strings_provider.cc | 39 +++
|
||||
.../ui/webui/settings/site_settings_helper.cc | 33 +-
|
||||
.../browser_ui/site_settings/android/BUILD.gn | 15 +
|
||||
.../ui/webui/settings/site_settings_helper.cc | 34 +-
|
||||
.../browser_ui/site_settings/android/BUILD.gn | 16 +
|
||||
.../BromiteCustomContentSetting.java | 139 ++++++++
|
||||
.../BromiteCustomContentSettingImpl.java | 307 ++++++++++++++++++
|
||||
.../BromiteCustomContentSetting_README.md | 151 +++++++++
|
||||
...tomTriStateSiteSettingsPreferenceImpl.java | 24 ++
|
||||
.../ContentSettingsResources.java | 14 +-
|
||||
.../site_settings/SingleCategorySettings.java | 42 ++-
|
||||
.../site_settings/SingleCategorySettings.java | 47 ++-
|
||||
.../site_settings/SingleWebsiteSettings.java | 26 +-
|
||||
.../site_settings/SiteSettings.java | 14 +-
|
||||
.../site_settings/SiteSettingsCategory.java | 18 +-
|
||||
@@ -72,10 +72,10 @@ Require: bromite-build-utils.patch
|
||||
.../execution_context/execution_context.cc | 16 +
|
||||
.../execution_context/execution_context.h | 5 +
|
||||
.../WebLayerSiteSettingsDelegate.java | 3 +
|
||||
61 files changed, 1310 insertions(+), 41 deletions(-)
|
||||
61 files changed, 1189 insertions(+), 42 deletions(-)
|
||||
create mode 100644 components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/BromiteCustomContentSetting.java
|
||||
create mode 100644 components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/BromiteCustomContentSettingImpl.java
|
||||
create mode 100644 components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/BromiteCustomContentSetting_README.md
|
||||
create mode 100644 components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/BromiteCustomTriStateSiteSettingsPreferenceImpl.java
|
||||
create mode 100644 components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/impl/include_all_directory.java
|
||||
create mode 100644 components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/impl/java_template/BromiteCustomContentSettingImplBase.java.tmpl
|
||||
create mode 100644 components/browser_ui/strings/bromite_content_settings/placeholder.txt
|
||||
@@ -391,7 +391,7 @@ diff --git a/chrome/browser/resources/settings/site_settings_page/site_settings_
|
||||
diff --git a/chrome/browser/ui/BUILD.gn b/chrome/browser/ui/BUILD.gn
|
||||
--- a/chrome/browser/ui/BUILD.gn
|
||||
+++ b/chrome/browser/ui/BUILD.gn
|
||||
@@ -1927,6 +1927,7 @@ static_library("ui") {
|
||||
@@ -1921,6 +1921,7 @@ static_library("ui") {
|
||||
"//components/commerce/core:shopping_service",
|
||||
"//components/commerce/core/mojom:mojo_bindings",
|
||||
"//components/commerce/core/webui",
|
||||
@@ -527,7 +527,7 @@ diff --git a/chrome/browser/ui/webui/settings/site_settings_helper.cc b/chrome/b
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -500,7 +509,13 @@ ContentSettingsType ContentSettingsTypeFromGroupName(base::StringPiece name) {
|
||||
@@ -500,11 +509,24 @@ ContentSettingsType ContentSettingsTypeFromGroupName(base::StringPiece name) {
|
||||
return entry.type;
|
||||
}
|
||||
}
|
||||
@@ -542,10 +542,7 @@ diff --git a/chrome/browser/ui/webui/settings/site_settings_helper.cc b/chrome/b
|
||||
return ContentSettingsType::DEFAULT;
|
||||
}
|
||||
|
||||
@@ -520,6 +535,13 @@ base::StringPiece ContentSettingsTypeToGroupName(ContentSettingsType type) {
|
||||
}
|
||||
}
|
||||
|
||||
base::StringPiece ContentSettingsTypeToGroupName(ContentSettingsType type) {
|
||||
+ content_settings::WebsiteSettingsRegistry* website_settings =
|
||||
+ content_settings::WebsiteSettingsRegistry::GetInstance();
|
||||
+ for (const content_settings::WebsiteSettingsInfo* cs : *website_settings) {
|
||||
@@ -553,10 +550,18 @@ diff --git a/chrome/browser/ui/webui/settings/site_settings_helper.cc b/chrome/b
|
||||
+ return cs->name();
|
||||
+ }
|
||||
+ }
|
||||
for (const auto& entry : kContentSettingsTypeGroupNames) {
|
||||
if (type == entry.type) {
|
||||
// Content setting types that aren't represented in the settings UI
|
||||
@@ -519,7 +541,6 @@ base::StringPiece ContentSettingsTypeToGroupName(ContentSettingsType type) {
|
||||
return entry.name ? entry.name : base::StringPiece();
|
||||
}
|
||||
}
|
||||
-
|
||||
NOTREACHED() << static_cast<int32_t>(type)
|
||||
<< " is not a recognized content settings type.";
|
||||
return base::StringPiece();
|
||||
@@ -588,6 +610,13 @@ const std::vector<ContentSettingsType>& GetVisiblePermissionCategories() {
|
||||
@@ -588,6 +609,13 @@ const std::vector<ContentSettingsType>& GetVisiblePermissionCategories() {
|
||||
base_types->push_back(ContentSettingsType::PRIVATE_NETWORK_GUARD);
|
||||
}
|
||||
|
||||
@@ -573,13 +578,14 @@ diff --git a/chrome/browser/ui/webui/settings/site_settings_helper.cc b/chrome/b
|
||||
diff --git a/components/browser_ui/site_settings/android/BUILD.gn b/components/browser_ui/site_settings/android/BUILD.gn
|
||||
--- a/components/browser_ui/site_settings/android/BUILD.gn
|
||||
+++ b/components/browser_ui/site_settings/android/BUILD.gn
|
||||
@@ -145,6 +145,20 @@ android_library("java") {
|
||||
@@ -145,6 +145,21 @@ android_library("java") {
|
||||
":site_settings_jni_headers",
|
||||
"//components/content_settings/android:java_pref_names_srcjar",
|
||||
]
|
||||
+ sources += [
|
||||
+ "java/src/org/chromium/components/browser_ui/site_settings/BromiteCustomContentSettingImpl.java",
|
||||
+ "java/src/org/chromium/components/browser_ui/site_settings/BromiteCustomContentSetting.java",
|
||||
+ "java/src/org/chromium/components/browser_ui/site_settings/BromiteCustomTriStateSiteSettingsPreferenceImpl.java",
|
||||
+ "java/src/org/chromium/components/browser_ui/site_settings/impl/include_all_directory.java",
|
||||
+ ]
|
||||
+ deps += [
|
||||
@@ -594,7 +600,7 @@ diff --git a/components/browser_ui/site_settings/android/BUILD.gn b/components/b
|
||||
}
|
||||
|
||||
android_library("javatests") {
|
||||
@@ -190,6 +204,7 @@ robolectric_library("junit") {
|
||||
@@ -190,6 +205,7 @@ robolectric_library("junit") {
|
||||
}
|
||||
|
||||
android_resources("java_resources") {
|
||||
@@ -1058,162 +1064,35 @@ new file mode 100644
|
||||
+ return null;
|
||||
+ }
|
||||
+}
|
||||
diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/BromiteCustomContentSetting_README.md b/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/BromiteCustomContentSetting_README.md
|
||||
diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/BromiteCustomTriStateSiteSettingsPreferenceImpl.java b/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/BromiteCustomTriStateSiteSettingsPreferenceImpl.java
|
||||
new file mode 100644
|
||||
--- /dev/null
|
||||
+++ b/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/BromiteCustomContentSetting_README.md
|
||||
@@ -0,0 +1,151 @@
|
||||
+# Content Settings and Site Settings in Bromite
|
||||
+++ b/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/BromiteCustomTriStateSiteSettingsPreferenceImpl.java
|
||||
@@ -0,0 +1,24 @@
|
||||
+/*
|
||||
+ This file is part of Bromite.
|
||||
+
|
||||
+[TOC]
|
||||
+ Bromite is free software: you can redistribute it and/or modify
|
||||
+ it under the terms of the GNU General Public License as published by
|
||||
+ the Free Software Foundation, either version 3 of the License, or
|
||||
+ (at your option) any later version.
|
||||
+
|
||||
+## Overview
|
||||
+ Bromite is distributed in the hope that it will be useful,
|
||||
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+ GNU General Public License for more details.
|
||||
+
|
||||
+To simplify the addition and management of content settings ui in Bromite, you can use this method: automatically the new menus in the site settings and the item in page info management will be added.
|
||||
+ You should have received a copy of the GNU General Public License
|
||||
+ along with Bromite. If not, see <https://www.gnu.org/licenses/>.
|
||||
+*/
|
||||
+
|
||||
+## How to use
|
||||
+package org.chromium.components.browser_ui.site_settings;
|
||||
+
|
||||
+* Add a class derived from [BromiteCustomContentSettingImpl](BromiteCustomContentSettingImpl.java)
|
||||
+import org.chromium.components.content_settings.ContentSettingValues;
|
||||
+
|
||||
+```
|
||||
+public class NewContentSetting extends BromiteCustomContentSetting {
|
||||
+ public BromiteWebGLContentSetting() {
|
||||
+ super(/*contentSettingsType*/ ContentSettingsType.NEW_CONTENT_SETTING,
|
||||
+ /*siteSettingsCategory*/ SiteSettingsCategory.Type.NEW_CONTENT_SETTING,
|
||||
+ /*defaultEnabledValue*/ ContentSettingValues.ALLOW,
|
||||
+ /*defaultDisabledValue*/ ContentSettingValues.BLOCK,
|
||||
+ /*allowException*/ true,
|
||||
+ /*preferenceKey*/ "new_content_setting",
|
||||
+ /*profilePrefKey*/ "new_content_setting");
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public ContentSettingsResources.ResourceItem getResourceItem() {
|
||||
+ return new ContentSettingsResources.ResourceItem(
|
||||
+ /*icon*/ R.drawable.web_asset,
|
||||
+ /*title*/ R.string.new_content_setting_permission_title,
|
||||
+ /*defaultEnabledValue*/ getDefaultEnabledValue(),
|
||||
+ /*defaultDisabledValue*/ getDefaultDisabledValue(),
|
||||
+ /*enabledSummary*/ R.string.new_content_setting_enabled,
|
||||
+ /*disabledSummary*/ R.string.new_content_setting_disabled);
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public int getCategorySummary(@Nullable @ContentSettingValues int value) {
|
||||
+ switch (value) {
|
||||
+ case ContentSettingValues.ALLOW:
|
||||
+ return R.string.new_content_setting_allow;
|
||||
+ case ContentSettingValues.ASK:
|
||||
+ return R.string.new_content_setting_ask;
|
||||
+ case ContentSettingValues.BLOCK:
|
||||
+ return R.string.new_content_setting_disabled;
|
||||
+ default:
|
||||
+ return 0;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public boolean requiresTriStateContentSetting() {
|
||||
+ return true; // or false if is a on/off content setting
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public int[] getTriStateSettingDescriptionIDs() {
|
||||
+ // only needed if is a tristate setting
|
||||
+ int[] descriptionIDs = {
|
||||
+ R.string.website_settings_category_webgl_enabled_antifingerprint, // ALLOWED
|
||||
+ R.string.website_settings_category_webgl_enabled, // ASK
|
||||
+ R.string.website_settings_category_webgl_disabled }; // BLOCKED
|
||||
+ return descriptionIDs;
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public boolean showOnlyDescriptions() {
|
||||
+ // true will remove ALLOWED/ASK/BLOCKED from UI
|
||||
+ // leaving only the descriptions
|
||||
+ return true;
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public int getAddExceptionDialogMessage() {
|
||||
+ return R.string.new_content_setting_exception_dialog_message;
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public @Nullable Boolean considerException(SiteSettingsCategory category, @ContentSettingValues int value) {
|
||||
+ // indicate when the value should be considered an exception
|
||||
+ return value != ContentSettingValues.BLOCK;
|
||||
+ }
|
||||
+public interface BromiteCustomTriStateSiteSettingsPreferenceImpl {
|
||||
+ public @ContentSettingValues int getCheckedSetting();
|
||||
+}
|
||||
+```
|
||||
+
|
||||
+* Add the new class to `BromiteCustomContentSettingImpl` `cctor`
|
||||
+
|
||||
+```
|
||||
+ static {
|
||||
+ mItemList = new ArrayList<BromiteCustomContentSetting>();
|
||||
+ mItemList.add(new NewContentSetting());
|
||||
+ }
|
||||
+```
|
||||
+
|
||||
+* Register the new content setting as usual in `ContentSettingsRegistry::Init()`
|
||||
+
|
||||
+```
|
||||
+ Register(ContentSettingsType::NEW_CONTENT_SETTING, "new_content_setting", CONTENT_SETTING_BLOCK,
|
||||
+ WebsiteSettingsInfo::SYNCABLE,
|
||||
+ AllowlistedSchemes(),
|
||||
+ ValidSettings(CONTENT_SETTING_ALLOW, // allow
|
||||
+ CONTENT_SETTING_ASK, // ask
|
||||
+ CONTENT_SETTING_BLOCK), // block
|
||||
+ WebsiteSettingsInfo::SINGLE_ORIGIN_WITH_EMBEDDED_EXCEPTIONS_SCOPE,
|
||||
+ WebsiteSettingsRegistry::PLATFORM_ANDROID,
|
||||
+ ContentSettingsInfo::INHERIT_IN_INCOGNITO,
|
||||
+ ContentSettingsInfo::PERSISTENT,
|
||||
+ ContentSettingsInfo::EXCEPTIONS_ON_SECURE_AND_INSECURE_ORIGINS,
|
||||
+ /*show_into_info_page*/ true,
|
||||
+ /*permission_type_ui*/ IDS_NEW_CONTENT_SETTING,
|
||||
+ /*permission_type_ui_mid_sentence*/ IDS_NEW_CONTENT_SETTING_MID_SENTENCE);
|
||||
+```
|
||||
+
|
||||
+* Add your content setting in `@IntDef()` and `Type` in `SiteSettingsCategory` as usual
|
||||
+
|
||||
+* Add your strings in a new file in `components/browser_ui/strings/android/`
|
||||
+
|
||||
+```
|
||||
+<?xml version="1.0" encoding="utf-8"?>
|
||||
+<grit-part>
|
||||
+ <message name="IDS_NEW_CONTENT_SETTING" desc="The label used for your content type site settings controls.">
|
||||
+ your content type
|
||||
+ </message>
|
||||
+ <message name="IDS_NEW_CONTENT_SETTING_MID_SENTENCE" desc="The label used for your content type site settings controls when used mid-sentence.">
|
||||
+ your content type
|
||||
+ </message>
|
||||
+ <message name="IDS_NEW_CONTENT_SETTING_PERMISSION_TITLE" desc="Title of the permission to use your content type [CHAR-LIMIT=32]">
|
||||
+ your content type
|
||||
+ </message>
|
||||
+ <message name="IDS_NEW_CONTENT_SETTING_ENABLED" desc="Summary text explaining that your content type is enabled with fingerprinting protection.">
|
||||
+ your content type is enabled
|
||||
+ </message>
|
||||
+ <message name="IDS_NEW_CONTENT_SETTING_ASK" desc="Summary text explaining that your content type is full enabled.">
|
||||
+ ask before activate your content type
|
||||
+ </message>
|
||||
+ <message name="IDS_NEW_CONTENT_SETTING_DISABLED" desc="Summary text explaining that your content type is full disabled.">
|
||||
+ your content type is disabled
|
||||
+ </message>
|
||||
+</grit-part>
|
||||
+```
|
||||
+
|
||||
+* Reference it in `components/components_strings.grd` to have strings in native
|
||||
+
|
||||
+```
|
||||
+<part file="browser_ui/strings/android/new_content_setting_file.grdp" />
|
||||
+```
|
||||
+
|
||||
+* Reference it in `components/browser_ui/strings/android/browser_ui_strings.grd` to have the strings in java
|
||||
+
|
||||
+```
|
||||
+<part file="new_content_setting_file.grdp" />
|
||||
+```
|
||||
diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/ContentSettingsResources.java b/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/ContentSettingsResources.java
|
||||
--- a/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/ContentSettingsResources.java
|
||||
+++ b/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/ContentSettingsResources.java
|
||||
@@ -1340,17 +1219,24 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/c
|
||||
if (allowSpecifyingExceptions) {
|
||||
getPreferenceScreen().addPreference(new AddExceptionPreference(getStyledContext(),
|
||||
ADD_EXCEPTION_KEY, getAddExceptionDialogMessage(), mCategory, this));
|
||||
@@ -1087,6 +1107,9 @@ public class SingleCategorySettings extends SiteSettingsPreferenceFragment
|
||||
@@ -1085,8 +1105,16 @@ public class SingleCategorySettings extends SiteSettingsPreferenceFragment
|
||||
private boolean isBlocked() {
|
||||
switch (mGlobalToggleLayout) {
|
||||
case GlobalToggleLayout.TRI_STATE_TOGGLE:
|
||||
+ Preference triStateToggleImpl =
|
||||
+ getPreferenceScreen().findPreference(TRI_STATE_TOGGLE_KEY);
|
||||
+ if (triStateToggleImpl instanceof BromiteCustomTriStateSiteSettingsPreferenceImpl) {
|
||||
+ Boolean blocked = BromiteCustomContentSettingImpl.considerException(mCategory,
|
||||
+ ((BromiteCustomTriStateSiteSettingsPreferenceImpl)triStateToggleImpl).getCheckedSetting());
|
||||
+ if (blocked != null) return (boolean)blocked;
|
||||
+ }
|
||||
TriStateSiteSettingsPreference triStateToggle =
|
||||
getPreferenceScreen().findPreference(TRI_STATE_TOGGLE_KEY);
|
||||
+ if (triStateToggle == null) return true;
|
||||
+ Boolean blocked = BromiteCustomContentSettingImpl.considerException(mCategory, triStateToggle.getCheckedSetting());
|
||||
+ if (blocked != null) return (boolean)blocked;
|
||||
return (triStateToggle.getCheckedSetting() == ContentSettingValues.BLOCK);
|
||||
case GlobalToggleLayout.FOUR_STATE_COOKIE_TOGGLE:
|
||||
FourStateCookieSettingsPreference fourStateCookieToggle =
|
||||
@@ -1165,7 +1188,11 @@ public class SingleCategorySettings extends SiteSettingsPreferenceFragment
|
||||
@@ -1165,7 +1193,11 @@ public class SingleCategorySettings extends SiteSettingsPreferenceFragment
|
||||
} else if (mCategory.getType() == SiteSettingsCategory.Type.THIRD_PARTY_COOKIES) {
|
||||
infoText.setSummary(R.string.website_settings_third_party_cookies_page_description);
|
||||
} else {
|
||||
@@ -1363,7 +1249,7 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/c
|
||||
}
|
||||
|
||||
// Hide the anti-abuse text preferences, as needed.
|
||||
@@ -1189,6 +1216,7 @@ public class SingleCategorySettings extends SiteSettingsPreferenceFragment
|
||||
@@ -1189,6 +1221,7 @@ public class SingleCategorySettings extends SiteSettingsPreferenceFragment
|
||||
screen.removePreference(antiAbuseThingsToConsiderHeader);
|
||||
screen.removePreference(antiAbuseThingsToConsiderSectionOne);
|
||||
}
|
||||
@@ -1371,7 +1257,7 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/c
|
||||
|
||||
if (permissionBlockedByOs) {
|
||||
maybeShowOsWarning(screen);
|
||||
@@ -1352,7 +1380,7 @@ public class SingleCategorySettings extends SiteSettingsPreferenceFragment
|
||||
@@ -1352,7 +1385,7 @@ public class SingleCategorySettings extends SiteSettingsPreferenceFragment
|
||||
getSiteSettingsDelegate().getBrowserContextHandle(), contentType);
|
||||
int[] descriptionIds =
|
||||
ContentSettingsResources.getTriStateSettingDescriptionIDs(contentType);
|
||||
@@ -1380,7 +1266,7 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/c
|
||||
}
|
||||
|
||||
private void configureBinaryToggle(ChromeSwitchPreference binaryToggle, int contentType) {
|
||||
@@ -1478,6 +1506,14 @@ public class SingleCategorySettings extends SiteSettingsPreferenceFragment
|
||||
@@ -1478,6 +1511,14 @@ public class SingleCategorySettings extends SiteSettingsPreferenceFragment
|
||||
@ContentSettingValues
|
||||
Integer value = site.getContentSetting(browserContextHandle, contentSettingsType);
|
||||
|
||||
@@ -1864,7 +1750,7 @@ diff --git a/components/content_settings/core/browser/content_settings_utils.cc
|
||||
+ if (info->is_renderer_content_setting()) {
|
||||
+ ContentSettingRuleSource rule;
|
||||
+ rule.type = (int32_t)info->type();
|
||||
+ map->GetSettingsForOneType(info->type(), &rule.rules);
|
||||
+ rule.rules = map->GetSettingsForOneType(info->type());
|
||||
+ rules->settings_rules.push_back(rule);
|
||||
+ }
|
||||
+ }
|
||||
|
||||
@@ -2,11 +2,15 @@ From: uazo <uazo@users.noreply.github.com>
|
||||
Date: Tue, 12 Jun 2018 15:09:26 +0200
|
||||
Subject: Disable all promo dialogs
|
||||
|
||||
License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html
|
||||
---
|
||||
.../chrome/browser/tabbed_mode/TabbedRootUiCoordinator.java | 1 +
|
||||
.../ui/views/user_education/browser_feature_promo_controller.cc | 1 +
|
||||
components/user_education/common/feature_promo_registry.cc | 1 +
|
||||
3 files changed, 3 insertions(+)
|
||||
.../chrome/browser/tabbed_mode/TabbedRootUiCoordinator.java | 1 +
|
||||
chrome/browser/ui/browser_ui_prefs.cc | 2 +-
|
||||
chrome/browser/ui/ui_features.cc | 2 +-
|
||||
.../ui/views/user_education/browser_feature_promo_controller.cc | 1 +
|
||||
.../chrome/browser/user_education/UserEducationHelper.java | 1 +
|
||||
components/user_education/common/feature_promo_registry.cc | 1 +
|
||||
6 files changed, 6 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tabbed_mode/TabbedRootUiCoordinator.java b/chrome/android/java/src/org/chromium/chrome/browser/tabbed_mode/TabbedRootUiCoordinator.java
|
||||
--- a/chrome/android/java/src/org/chromium/chrome/browser/tabbed_mode/TabbedRootUiCoordinator.java
|
||||
@@ -19,6 +23,30 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tabbed_mode/Tab
|
||||
// Only one promo can be shown in one run to avoid nagging users too much.
|
||||
if (FullScreenSyncPromoUtil.launchPromoIfNeeded(mActivity,
|
||||
SyncConsentActivityLauncherImpl.get(), VersionInfo.getProductMajorVersion())) {
|
||||
diff --git a/chrome/browser/ui/browser_ui_prefs.cc b/chrome/browser/ui/browser_ui_prefs.cc
|
||||
--- a/chrome/browser/ui/browser_ui_prefs.cc
|
||||
+++ b/chrome/browser/ui/browser_ui_prefs.cc
|
||||
@@ -143,7 +143,7 @@ void RegisterBrowserUserPrefs(user_prefs::PrefRegistrySyncable* registry) {
|
||||
|
||||
registry->RegisterBooleanPref(prefs::kEnterpriseHardwarePlatformAPIEnabled,
|
||||
false);
|
||||
- registry->RegisterBooleanPref(prefs::kUserFeedbackAllowed, true);
|
||||
+ registry->RegisterBooleanPref(prefs::kUserFeedbackAllowed, false);
|
||||
registry->RegisterBooleanPref(
|
||||
prefs::kExternalProtocolDialogShowAlwaysOpenCheckbox, true);
|
||||
registry->RegisterBooleanPref(prefs::kScreenCaptureAllowed, true);
|
||||
diff --git a/chrome/browser/ui/ui_features.cc b/chrome/browser/ui/ui_features.cc
|
||||
--- a/chrome/browser/ui/ui_features.cc
|
||||
+++ b/chrome/browser/ui/ui_features.cc
|
||||
@@ -25,7 +25,7 @@ BASE_FEATURE(kDesktopPWAsAppHomePage,
|
||||
#endif // !BUILDFLAG(IS_CHROMEOS) && !BUILDFLAG(IS_ANDROID)
|
||||
|
||||
// Enables Chrome Labs menu in the toolbar. See https://crbug.com/1145666
|
||||
-BASE_FEATURE(kChromeLabs, "ChromeLabs", base::FEATURE_ENABLED_BY_DEFAULT);
|
||||
+BASE_FEATURE(kChromeLabs, "ChromeLabs", base::FEATURE_DISABLED_BY_DEFAULT);
|
||||
const char kChromeLabsActivationParameterName[] =
|
||||
"chrome_labs_activation_percentage";
|
||||
const base::FeatureParam<int> kChromeLabsActivationPercentage{
|
||||
diff --git a/chrome/browser/ui/views/user_education/browser_feature_promo_controller.cc b/chrome/browser/ui/views/user_education/browser_feature_promo_controller.cc
|
||||
--- a/chrome/browser/ui/views/user_education/browser_feature_promo_controller.cc
|
||||
+++ b/chrome/browser/ui/views/user_education/browser_feature_promo_controller.cc
|
||||
@@ -30,6 +58,17 @@ diff --git a/chrome/browser/ui/views/user_education/browser_feature_promo_contro
|
||||
// Temporarily turn off IPH in incognito as a concern was raised that
|
||||
// the IPH backend ignores incognito and writes to the parent profile.
|
||||
// See https://bugs.chromium.org/p/chromium/issues/detail?id=1128728#c30
|
||||
diff --git a/chrome/browser/user_education/java/src/org/chromium/chrome/browser/user_education/UserEducationHelper.java b/chrome/browser/user_education/java/src/org/chromium/chrome/browser/user_education/UserEducationHelper.java
|
||||
--- a/chrome/browser/user_education/java/src/org/chromium/chrome/browser/user_education/UserEducationHelper.java
|
||||
+++ b/chrome/browser/user_education/java/src/org/chromium/chrome/browser/user_education/UserEducationHelper.java
|
||||
@@ -71,6 +71,7 @@ public class UserEducationHelper {
|
||||
}
|
||||
|
||||
private void showIPH(Tracker tracker, IPHCommand iphCommand) {
|
||||
+ if ((true)) return;
|
||||
// Activity was destroyed; don't show IPH.
|
||||
View anchorView = iphCommand.anchorView;
|
||||
if (mActivity.isFinishing() || mActivity.isDestroyed() || anchorView == null) {
|
||||
diff --git a/components/user_education/common/feature_promo_registry.cc b/components/user_education/common/feature_promo_registry.cc
|
||||
--- a/components/user_education/common/feature_promo_registry.cc
|
||||
+++ b/components/user_education/common/feature_promo_registry.cc
|
||||
|
||||
@@ -23,18 +23,18 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
|
||||
.../attribution_storage_sql.cc | 8 +-
|
||||
content/browser/storage_partition_impl.cc | 8 +-
|
||||
content/public/android/BUILD.gn | 2 -
|
||||
.../browser/AttributionOsLevelManager.java | 219 ++----------------
|
||||
.../browser/AttributionOsLevelManager.java | 225 ++----------------
|
||||
.../public/browser/navigation_controller.cc | 1 -
|
||||
content/public/common/content_features.cc | 4 +-
|
||||
content/renderer/render_thread_impl.cc | 5 +-
|
||||
.../attribution/request_headers_internal.cc | 1 +
|
||||
.../network/public/cpp/attribution_utils.cc | 2 +
|
||||
services/network/public/cpp/features.cc | 6 +-
|
||||
third_party/blink/common/features.cc | 26 +--
|
||||
third_party/blink/common/features.cc | 26 +-
|
||||
.../platform/runtime_enabled_features.json5 | 7 +
|
||||
ui/base/ui_base_features.cc | 2 +-
|
||||
ui/events/android/motion_event_android.cc | 6 +-
|
||||
23 files changed, 89 insertions(+), 255 deletions(-)
|
||||
23 files changed, 89 insertions(+), 261 deletions(-)
|
||||
|
||||
diff --git a/chrome/android/java/AndroidManifest.xml b/chrome/android/java/AndroidManifest.xml
|
||||
--- a/chrome/android/java/AndroidManifest.xml
|
||||
@@ -498,10 +498,16 @@ diff --git a/content/public/android/java/src/org/chromium/content/browser/Attrib
|
||||
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.TIRAMISU) {
|
||||
AttributionOsLevelManagerJni.get().onMeasurementStateReturned(0);
|
||||
return;
|
||||
@@ -356,32 +195,6 @@ public class AttributionOsLevelManager {
|
||||
@@ -350,38 +189,6 @@ public class AttributionOsLevelManager {
|
||||
AttributionOsLevelManagerJni.get().onMeasurementStateReturned(0);
|
||||
return;
|
||||
}
|
||||
- MeasurementManagerFutures mm =
|
||||
- MeasurementManagerFutures.from(ContextUtils.getApplicationContext());
|
||||
- if (mm == null) {
|
||||
- AttributionOsLevelManagerJni.get().onMeasurementStateReturned(0);
|
||||
- return;
|
||||
- }
|
||||
-
|
||||
- ListenableFuture<Integer> future = null;
|
||||
- try {
|
||||
|
||||
@@ -66,8 +66,8 @@ diff --git a/chrome/android/java/res/xml/main_preferences.xml b/chrome/android/j
|
||||
- android:order="12"
|
||||
- android:title="@string/prefs_safety_check"/>
|
||||
<Preference
|
||||
android:fragment="org.chromium.chrome.browser.settings.AdBlockPreferences"
|
||||
android:key="adblock"
|
||||
android:fragment="org.chromium.components.adblock.settings.AdblockSettingsFragment"
|
||||
android:key="eyeo_adblock"
|
||||
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/settings/SettingsActivity.java b/chrome/android/java/src/org/chromium/chrome/browser/settings/SettingsActivity.java
|
||||
--- a/chrome/android/java/src/org/chromium/chrome/browser/settings/SettingsActivity.java
|
||||
+++ b/chrome/android/java/src/org/chromium/chrome/browser/settings/SettingsActivity.java
|
||||
@@ -119,7 +119,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/settings/Settin
|
||||
diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
|
||||
--- a/chrome/browser/BUILD.gn
|
||||
+++ b/chrome/browser/BUILD.gn
|
||||
@@ -3404,7 +3404,6 @@ static_library("browser") {
|
||||
@@ -3400,7 +3400,6 @@ static_library("browser") {
|
||||
"//chrome/browser/reading_list/android",
|
||||
"//chrome/browser/recent_tabs:jni_headers",
|
||||
"//chrome/browser/safe_browsing/android:safe_browsing_enums",
|
||||
|
||||
@@ -11,7 +11,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
|
||||
diff --git a/chrome/browser/ui/BUILD.gn b/chrome/browser/ui/BUILD.gn
|
||||
--- a/chrome/browser/ui/BUILD.gn
|
||||
+++ b/chrome/browser/ui/BUILD.gn
|
||||
@@ -1367,8 +1367,6 @@ static_library("ui") {
|
||||
@@ -1361,8 +1361,6 @@ static_library("ui") {
|
||||
"singleton_tabs.h",
|
||||
"startup/automation_infobar_delegate.cc",
|
||||
"startup/automation_infobar_delegate.h",
|
||||
|
||||
@@ -10,6 +10,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
|
||||
---
|
||||
chrome/browser/about_flags.cc | 5 +++++
|
||||
chrome/browser/browser_features.cc | 13 +++++++------
|
||||
chrome/browser/browser_features.h | 1 +
|
||||
chrome/browser/flag_descriptions.cc | 4 ++++
|
||||
chrome/browser/flag_descriptions.h | 3 +++
|
||||
.../browser/net/system_network_context_manager.cc | 6 +-----
|
||||
@@ -19,7 +20,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
|
||||
net/url_request/report_sender.cc | 3 ++-
|
||||
services/network/network_context.cc | 2 +-
|
||||
.../network/sct_auditing/sct_auditing_handler.cc | 2 ++
|
||||
11 files changed, 35 insertions(+), 23 deletions(-)
|
||||
12 files changed, 36 insertions(+), 23 deletions(-)
|
||||
|
||||
diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
|
||||
--- a/chrome/browser/about_flags.cc
|
||||
@@ -66,6 +67,17 @@ diff --git a/chrome/browser/browser_features.cc b/chrome/browser/browser_feature
|
||||
|
||||
BASE_FEATURE(kLargeFaviconFromGoogle,
|
||||
"LargeFaviconFromGoogle",
|
||||
diff --git a/chrome/browser/browser_features.h b/chrome/browser/browser_features.h
|
||||
--- a/chrome/browser/browser_features.h
|
||||
+++ b/chrome/browser/browser_features.h
|
||||
@@ -57,6 +57,7 @@ BASE_DECLARE_FEATURE(kTabCaptureBlueBorderCrOS);
|
||||
|
||||
BASE_DECLARE_FEATURE(kWebUsbDeviceDetection);
|
||||
|
||||
+BASE_DECLARE_FEATURE(kCertificateTransparency);
|
||||
BASE_DECLARE_FEATURE(kCertificateTransparencyAskBeforeEnabling);
|
||||
|
||||
BASE_DECLARE_FEATURE(kLargeFaviconFromGoogle);
|
||||
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
|
||||
|
||||
@@ -318,7 +318,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tab/TabViewAndr
|
||||
diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
|
||||
--- a/chrome/browser/BUILD.gn
|
||||
+++ b/chrome/browser/BUILD.gn
|
||||
@@ -2580,6 +2580,13 @@ static_library("browser") {
|
||||
@@ -2576,6 +2576,13 @@ static_library("browser") {
|
||||
deps += [ "//chrome/browser/error_reporting" ]
|
||||
}
|
||||
|
||||
|
||||
@@ -84,7 +84,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
|
||||
.../user_scripts/browser/user_script_prefs.h | 62 ++
|
||||
.../browser/userscripts_browser_client.cc | 78 ++
|
||||
.../browser/userscripts_browser_client.h | 62 ++
|
||||
components/user_scripts/common/BUILD.gn | 49 ++
|
||||
components/user_scripts/common/BUILD.gn | 48 ++
|
||||
components/user_scripts/common/constants.h | 15 +
|
||||
components/user_scripts/common/error_utils.cc | 54 ++
|
||||
components/user_scripts/common/error_utils.h | 24 +
|
||||
@@ -135,7 +135,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
|
||||
.../renderer/web_ui_injection_host.h | 27 +
|
||||
.../strings/userscripts_strings.grdp | 54 ++
|
||||
tools/gritsettings/resource_ids.spec | 6 +
|
||||
108 files changed, 9489 insertions(+), 1 deletion(-)
|
||||
108 files changed, 9488 insertions(+), 1 deletion(-)
|
||||
create mode 100644 components/user_scripts/README.md
|
||||
create mode 100755 components/user_scripts/android/BUILD.gn
|
||||
create mode 100644 components/user_scripts/android/java/res/layout/accept_script_item.xml
|
||||
@@ -321,7 +321,7 @@ diff --git a/chrome/android/java_sources.gni b/chrome/android/java_sources.gni
|
||||
diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
|
||||
--- a/chrome/browser/BUILD.gn
|
||||
+++ b/chrome/browser/BUILD.gn
|
||||
@@ -3567,6 +3567,13 @@ static_library("browser") {
|
||||
@@ -3563,6 +3563,13 @@ static_library("browser") {
|
||||
]
|
||||
deps += [ "//chrome/android/modules/dev_ui/provider:native" ]
|
||||
}
|
||||
@@ -963,8 +963,8 @@ new file mode 100755
|
||||
+ "//third_party/androidx:androidx_core_core_java",
|
||||
+ "//ui/android:ui_java",
|
||||
+ ]
|
||||
+ srcjar_deps = [ ":user_scripts_jni_headers" ]
|
||||
+ resources_package = "org.chromium.components.user_scripts"
|
||||
+ annotation_processor_deps = [ "//base/android/jni_generator:jni_processor" ]
|
||||
+}
|
||||
+
|
||||
+source_set("android") {
|
||||
@@ -4375,7 +4375,7 @@ diff --git a/components/user_scripts/common/BUILD.gn b/components/user_scripts/c
|
||||
new file mode 100755
|
||||
--- /dev/null
|
||||
+++ b/components/user_scripts/common/BUILD.gn
|
||||
@@ -0,0 +1,49 @@
|
||||
@@ -0,0 +1,48 @@
|
||||
+# Copyright 2014 The Chromium Authors. All rights reserved.
|
||||
+# Use of this source code is governed by a BSD-style license that can be
|
||||
+# found in the LICENSE file.
|
||||
@@ -4411,7 +4411,6 @@ new file mode 100755
|
||||
+ ]
|
||||
+
|
||||
+ public_deps = [
|
||||
+ "//components/services/app_service/public/cpp:app_file_handling",
|
||||
+ "//content/public/common",
|
||||
+ "//ipc",
|
||||
+ "//skia",
|
||||
@@ -10490,7 +10489,7 @@ new file mode 100755
|
||||
diff --git a/tools/gritsettings/resource_ids.spec b/tools/gritsettings/resource_ids.spec
|
||||
--- a/tools/gritsettings/resource_ids.spec
|
||||
+++ b/tools/gritsettings/resource_ids.spec
|
||||
@@ -915,6 +915,12 @@
|
||||
@@ -911,6 +911,12 @@
|
||||
"components/autofill/core/browser/autofill_address_rewriter_resources.grd":{
|
||||
"includes": [6220]
|
||||
},
|
||||
|
||||
@@ -160,7 +160,7 @@ diff --git a/chrome/browser/net/chrome_network_delegate.cc b/chrome/browser/net/
|
||||
diff --git a/chrome/browser/ui/BUILD.gn b/chrome/browser/ui/BUILD.gn
|
||||
--- a/chrome/browser/ui/BUILD.gn
|
||||
+++ b/chrome/browser/ui/BUILD.gn
|
||||
@@ -674,6 +674,7 @@ static_library("ui") {
|
||||
@@ -668,6 +668,7 @@ static_library("ui") {
|
||||
"//third_party/re2",
|
||||
"//third_party/webrtc_overrides:webrtc_component",
|
||||
"//third_party/zlib",
|
||||
|
||||
@@ -207,7 +207,7 @@ diff --git a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser
|
||||
diff --git a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabGroupUiMediator.java b/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabGroupUiMediator.java
|
||||
--- a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabGroupUiMediator.java
|
||||
+++ b/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabGroupUiMediator.java
|
||||
@@ -46,6 +46,12 @@ import org.chromium.url.GURL;
|
||||
@@ -47,6 +47,12 @@ import org.chromium.url.GURL;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -220,7 +220,7 @@ diff --git a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser
|
||||
/**
|
||||
* A mediator for the TabGroupUi. Responsible for managing the internal state of the component.
|
||||
*/
|
||||
@@ -115,6 +121,11 @@ public class TabGroupUiMediator implements BackPressHandler {
|
||||
@@ -116,6 +122,11 @@ public class TabGroupUiMediator implements BackPressHandler {
|
||||
private boolean mIsTabGroupUiVisible;
|
||||
private boolean mIsShowingOverViewMode;
|
||||
|
||||
@@ -232,7 +232,7 @@ diff --git a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser
|
||||
TabGroupUiMediator(Context context, BottomControlsVisibilityController visibilityController,
|
||||
ResetHandler resetHandler, PropertyModel model, TabModelSelector tabModelSelector,
|
||||
TabCreatorManager tabCreatorManager,
|
||||
@@ -122,7 +133,9 @@ public class TabGroupUiMediator implements BackPressHandler {
|
||||
@@ -123,7 +134,9 @@ public class TabGroupUiMediator implements BackPressHandler {
|
||||
IncognitoStateProvider incognitoStateProvider,
|
||||
@Nullable OneshotSupplier<TabGridDialogMediator.DialogController>
|
||||
dialogControllerSupplier,
|
||||
@@ -243,7 +243,7 @@ diff --git a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser
|
||||
mContext = context;
|
||||
mResetHandler = resetHandler;
|
||||
mModel = model;
|
||||
@@ -143,10 +156,29 @@ public class TabGroupUiMediator implements BackPressHandler {
|
||||
@@ -144,10 +157,29 @@ public class TabGroupUiMediator implements BackPressHandler {
|
||||
mIsShowingOverViewMode = true;
|
||||
}
|
||||
|
||||
@@ -273,7 +273,7 @@ diff --git a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser
|
||||
if (TabUiFeatureUtilities.isTabGroupsAndroidEnabled(mContext)
|
||||
&& getTabsToShowForId(lastId).contains(tab)) {
|
||||
return;
|
||||
@@ -199,6 +231,7 @@ public class TabGroupUiMediator implements BackPressHandler {
|
||||
@@ -200,6 +232,7 @@ public class TabGroupUiMediator implements BackPressHandler {
|
||||
return;
|
||||
}
|
||||
resetTabStripWithRelatedTabsForId(currentTab.getId());
|
||||
@@ -281,7 +281,7 @@ diff --git a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -314,6 +347,8 @@ public class TabGroupUiMediator implements BackPressHandler {
|
||||
@@ -315,6 +348,8 @@ public class TabGroupUiMediator implements BackPressHandler {
|
||||
resetTabStripWithRelatedTabsForId(tab.getId());
|
||||
}
|
||||
|
||||
@@ -290,7 +290,7 @@ diff --git a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser
|
||||
mBackPressStateSupplier = new ObservableSupplierImpl<>();
|
||||
if (mTabGridDialogControllerSupplier != null) {
|
||||
mTabGridDialogControllerSupplier.onAvailable(controller -> {
|
||||
@@ -327,6 +362,18 @@ public class TabGroupUiMediator implements BackPressHandler {
|
||||
@@ -328,6 +363,18 @@ public class TabGroupUiMediator implements BackPressHandler {
|
||||
mModel.set(TabGroupUiProperties.LEFT_BUTTON_DRAWABLE_ID, drawableId);
|
||||
}
|
||||
|
||||
@@ -309,7 +309,7 @@ diff --git a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser
|
||||
void setupLeftButtonOnClickListener(View.OnClickListener listener) {
|
||||
mModel.set(TabGroupUiProperties.LEFT_BUTTON_ON_CLICK_LISTENER, listener);
|
||||
}
|
||||
@@ -437,6 +484,7 @@ public class TabGroupUiMediator implements BackPressHandler {
|
||||
@@ -442,6 +489,7 @@ public class TabGroupUiMediator implements BackPressHandler {
|
||||
}
|
||||
|
||||
public void destroy() {
|
||||
|
||||
@@ -62,7 +62,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
|
||||
diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
|
||||
--- a/chrome/browser/BUILD.gn
|
||||
+++ b/chrome/browser/BUILD.gn
|
||||
@@ -2450,6 +2450,7 @@ static_library("browser") {
|
||||
@@ -2446,6 +2446,7 @@ static_library("browser") {
|
||||
"//services/device/public/cpp:device_features",
|
||||
"//services/device/public/cpp/geolocation",
|
||||
"//services/device/public/cpp/usb",
|
||||
|
||||
@@ -89,7 +89,8 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
|
||||
components/signin/public/android/BUILD.gn | 3 -
|
||||
.../signin/AccountRenameChecker.java | 16 -
|
||||
components/webauthn/android/BUILD.gn | 11 -
|
||||
.../webauthn/AuthenticatorImpl.java | 89 +--
|
||||
.../webauthn/AuthenticatorImpl.java | 93 +--
|
||||
.../webauthn/CredManMetricsHelper.java | 17 -
|
||||
.../webauthn/Fido2ApiCallHelper.java | 58 +-
|
||||
.../push_messaging/push_messaging_manager.cc | 2 +-
|
||||
content/public/android/BUILD.gn | 4 -
|
||||
@@ -105,7 +106,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
|
||||
third_party/cardboard/BUILD.gn | 4 -
|
||||
weblayer/browser/java/BUILD.gn | 1 -
|
||||
weblayer/public/java/BUILD.gn | 1 -
|
||||
81 files changed, 96 insertions(+), 1991 deletions(-)
|
||||
82 files changed, 96 insertions(+), 2012 deletions(-)
|
||||
|
||||
diff --git a/android_webview/expectations/system_webview_bundle.AndroidManifest.expected b/android_webview/expectations/system_webview_bundle.AndroidManifest.expected
|
||||
--- a/android_webview/expectations/system_webview_bundle.AndroidManifest.expected
|
||||
@@ -1085,7 +1086,7 @@ diff --git a/chrome/browser/ui/BUILD.gn b/chrome/browser/ui/BUILD.gn
|
||||
"webui/internals/internals_ui.cc",
|
||||
"webui/internals/internals_ui.h",
|
||||
"webui/interstitials/interstitial_ui.cc",
|
||||
@@ -520,7 +518,6 @@ static_library("ui") {
|
||||
@@ -514,7 +512,6 @@ static_library("ui") {
|
||||
"//components/feedback/redaction_tool",
|
||||
"//components/find_in_page",
|
||||
"//components/flags_ui",
|
||||
@@ -3124,23 +3125,22 @@ diff --git a/components/webauthn/android/java/src/org/chromium/components/webaut
|
||||
private MakeCredential_Response mMakeCredentialCallback;
|
||||
private GetAssertion_Response mGetAssertionCallback;
|
||||
// A queue is used to store pending IsUserVerifyingPlatformAuthenticatorAvailable request
|
||||
@@ -70,15 +66,8 @@ public final class AuthenticatorImpl implements Authenticator {
|
||||
@@ -70,14 +66,6 @@ public final class AuthenticatorImpl implements Authenticator {
|
||||
// situation does not matter because all pending requests will return the same value.
|
||||
private Queue<org.chromium.mojo.bindings.Callbacks.Callback1<Boolean>>
|
||||
mIsUserVerifyingPlatformAuthenticatorAvailableCallbackQueue = new LinkedList<>();
|
||||
- private Fido2CredentialRequest mPendingFido2CredentialRequest;
|
||||
private Set<Fido2CredentialRequest> mUnclosedFido2CredentialRequests = new HashSet<>();
|
||||
|
||||
- private Set<Fido2CredentialRequest> mUnclosedFido2CredentialRequests = new HashSet<>();
|
||||
-
|
||||
- // StaticFieldLeak complains that this is a memory leak because
|
||||
- // `Fido2CredentialRequest` contains a `Context`. But this field is only
|
||||
- // used in tests so a memory leak is irrelevent.
|
||||
- @SuppressLint("StaticFieldLeak")
|
||||
- private static Fido2CredentialRequest sFido2CredentialRequestOverrideForTesting;
|
||||
-
|
||||
|
||||
/**
|
||||
* Builds the Authenticator service implementation.
|
||||
*
|
||||
@@ -97,21 +86,6 @@ public final class AuthenticatorImpl implements Authenticator {
|
||||
@@ -97,21 +85,6 @@ public final class AuthenticatorImpl implements Authenticator {
|
||||
mRenderFrameHost = renderFrameHost;
|
||||
mOrigin = mRenderFrameHost.getLastCommittedOrigin();
|
||||
mTopOrigin = topOrigin;
|
||||
@@ -3162,7 +3162,7 @@ diff --git a/components/webauthn/android/java/src/org/chromium/components/webaut
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -141,17 +115,9 @@ public final class AuthenticatorImpl implements Authenticator {
|
||||
@@ -141,17 +114,9 @@ public final class AuthenticatorImpl implements Authenticator {
|
||||
|
||||
mMakeCredentialCallback = callback;
|
||||
mIsOperationPending = true;
|
||||
@@ -3182,7 +3182,7 @@ diff --git a/components/webauthn/android/java/src/org/chromium/components/webaut
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -165,16 +131,8 @@ public final class AuthenticatorImpl implements Authenticator {
|
||||
@@ -165,16 +130,8 @@ public final class AuthenticatorImpl implements Authenticator {
|
||||
mGetAssertionCallback = callback;
|
||||
mIsOperationPending = true;
|
||||
|
||||
@@ -3201,7 +3201,7 @@ diff --git a/components/webauthn/android/java/src/org/chromium/components/webaut
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -186,15 +144,8 @@ public final class AuthenticatorImpl implements Authenticator {
|
||||
@@ -186,15 +143,8 @@ public final class AuthenticatorImpl implements Authenticator {
|
||||
callback.call(isUvpaa);
|
||||
};
|
||||
|
||||
@@ -3219,7 +3219,7 @@ diff --git a/components/webauthn/android/java/src/org/chromium/components/webaut
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -203,7 +154,7 @@ public final class AuthenticatorImpl implements Authenticator {
|
||||
@@ -203,7 +153,7 @@ public final class AuthenticatorImpl implements Authenticator {
|
||||
* version.
|
||||
*/
|
||||
public boolean isGetMatchingCredentialIdsSupported() {
|
||||
@@ -3228,7 +3228,7 @@ diff --git a/components/webauthn/android/java/src/org/chromium/components/webaut
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -217,32 +168,13 @@ public final class AuthenticatorImpl implements Authenticator {
|
||||
@@ -217,32 +167,13 @@ public final class AuthenticatorImpl implements Authenticator {
|
||||
*/
|
||||
public void getMatchingCredentialIds(String relyingPartyId, byte[][] credentialIds,
|
||||
boolean requireThirdPartyPayment, GetMatchingCredentialIdsResponseCallback callback) {
|
||||
@@ -3263,7 +3263,7 @@ diff --git a/components/webauthn/android/java/src/org/chromium/components/webaut
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -254,8 +186,6 @@ public final class AuthenticatorImpl implements Authenticator {
|
||||
@@ -254,8 +185,6 @@ public final class AuthenticatorImpl implements Authenticator {
|
||||
if (!mIsOperationPending || mGetAssertionCallback == null) {
|
||||
return;
|
||||
}
|
||||
@@ -3272,7 +3272,15 @@ diff --git a/components/webauthn/android/java/src/org/chromium/components/webaut
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -305,7 +235,6 @@ public final class AuthenticatorImpl implements Authenticator {
|
||||
@@ -297,7 +226,6 @@ public final class AuthenticatorImpl implements Authenticator {
|
||||
} else if (mGetAssertionCallback != null) {
|
||||
mGetAssertionCallback.call(status, null, null);
|
||||
}
|
||||
- if (mPendingFido2CredentialRequest != null) mPendingFido2CredentialRequest.destroyBridge();
|
||||
cleanupRequest();
|
||||
}
|
||||
|
||||
@@ -305,13 +233,10 @@ public final class AuthenticatorImpl implements Authenticator {
|
||||
mIsOperationPending = false;
|
||||
mMakeCredentialCallback = null;
|
||||
mGetAssertionCallback = null;
|
||||
@@ -3280,6 +3288,44 @@ diff --git a/components/webauthn/android/java/src/org/chromium/components/webaut
|
||||
}
|
||||
|
||||
@Override
|
||||
public void close() {
|
||||
- mUnclosedFido2CredentialRequests.forEach(Fido2CredentialRequest::destroyBridge);
|
||||
- mUnclosedFido2CredentialRequests.clear();
|
||||
cleanupRequest();
|
||||
}
|
||||
|
||||
diff --git a/components/webauthn/android/java/src/org/chromium/components/webauthn/CredManMetricsHelper.java b/components/webauthn/android/java/src/org/chromium/components/webauthn/CredManMetricsHelper.java
|
||||
--- a/components/webauthn/android/java/src/org/chromium/components/webauthn/CredManMetricsHelper.java
|
||||
+++ b/components/webauthn/android/java/src/org/chromium/components/webauthn/CredManMetricsHelper.java
|
||||
@@ -7,7 +7,6 @@ package org.chromium.components.webauthn;
|
||||
import androidx.annotation.IntDef;
|
||||
|
||||
import org.chromium.base.metrics.RecordHistogram;
|
||||
-import org.chromium.components.webauthn.Fido2CredentialRequest.ConditionalUiState;
|
||||
|
||||
/**
|
||||
* This class is responsible for emitting histograms regarding CredMan usage in
|
||||
@@ -77,20 +76,4 @@ public class CredManMetricsHelper {
|
||||
RecordHistogram.recordTimesHistogram(
|
||||
"WebAuthentication.Android.CredManPrepareRequestDuration", durationMs);
|
||||
}
|
||||
-
|
||||
- public void reportGetCredentialMetrics(
|
||||
- @CredManGetRequestEnum int value, ConditionalUiState conditionalUiState) {
|
||||
- assert !(conditionalUiState == ConditionalUiState.NONE)
|
||||
- || !(value == CredManGetRequestEnum.SUCCESS_PASSWORD)
|
||||
- : "Passwords cannot be received from modal requests!";
|
||||
- if (conditionalUiState == ConditionalUiState.NONE) {
|
||||
- RecordHistogram.recordEnumeratedHistogram(
|
||||
- "WebAuthentication.Android.CredManModalRequests", value,
|
||||
- CredManGetRequestEnum.NUM_ENTRIES);
|
||||
- return;
|
||||
- }
|
||||
- RecordHistogram.recordEnumeratedHistogram(
|
||||
- "WebAuthentication.Android.CredManConditionalRequest", value,
|
||||
- CredManGetRequestEnum.NUM_ENTRIES);
|
||||
- }
|
||||
}
|
||||
diff --git a/components/webauthn/android/java/src/org/chromium/components/webauthn/Fido2ApiCallHelper.java b/components/webauthn/android/java/src/org/chromium/components/webauthn/Fido2ApiCallHelper.java
|
||||
--- a/components/webauthn/android/java/src/org/chromium/components/webauthn/Fido2ApiCallHelper.java
|
||||
+++ b/components/webauthn/android/java/src/org/chromium/components/webauthn/Fido2ApiCallHelper.java
|
||||
|
||||
@@ -15,8 +15,8 @@ Require: Content-settings-infrastructure.patch
|
||||
.../bromite_content_settings/images.grdp | 23 +++++
|
||||
.../bromite_content_settings/images.inc | 6 ++
|
||||
.../core/browser/content_settings_registry.cc | 2 +-
|
||||
.../core/browser/content_settings_utils.cc | 8 +-
|
||||
10 files changed, 124 insertions(+), 7 deletions(-)
|
||||
.../core/browser/content_settings_utils.cc | 7 +-
|
||||
10 files changed, 123 insertions(+), 7 deletions(-)
|
||||
create mode 100644 components/browser_ui/site_settings/android/java/res/drawable-hdpi/permission_images.png
|
||||
create mode 100644 components/browser_ui/site_settings/android/java/res/drawable-mdpi/permission_images.png
|
||||
create mode 100644 components/browser_ui/site_settings/android/java/res/drawable-xhdpi/permission_images.png
|
||||
@@ -259,7 +259,7 @@ diff --git a/components/content_settings/core/browser/content_settings_registry.
|
||||
diff --git a/components/content_settings/core/browser/content_settings_utils.cc b/components/content_settings/core/browser/content_settings_utils.cc
|
||||
--- a/components/content_settings/core/browser/content_settings_utils.cc
|
||||
+++ b/components/content_settings/core/browser/content_settings_utils.cc
|
||||
@@ -145,12 +145,8 @@ void GetRendererContentSettingRules(const HostContentSettingsMap* map,
|
||||
@@ -145,12 +145,7 @@ void GetRendererContentSettingRules(const HostContentSettingsMap* map,
|
||||
ContentSettingToValue(CONTENT_SETTING_ALLOW), std::string(),
|
||||
map->IsOffTheRecord()));
|
||||
#else
|
||||
@@ -269,8 +269,7 @@ diff --git a/components/content_settings/core/browser/content_settings_utils.cc
|
||||
- ContentSettingsPattern::Wildcard(), ContentSettingsPattern::Wildcard(),
|
||||
- ContentSettingToValue(CONTENT_SETTING_ALLOW), std::string(),
|
||||
- map->IsOffTheRecord()));
|
||||
+ map->GetSettingsForOneType(ContentSettingsType::IMAGES,
|
||||
+ &(rules->image_rules));
|
||||
+ rules->image_rules = map->GetSettingsForOneType(ContentSettingsType::IMAGES);
|
||||
// In Android active mixed content is hard blocked, with no option to allow
|
||||
// it.
|
||||
rules->mixed_content_rules.push_back(ContentSettingPatternSource(
|
||||
|
||||
@@ -13,12 +13,12 @@ Require: Content-settings-infrastructure.patch
|
||||
.../browser_ui/site_settings/android/BUILD.gn | 3 +
|
||||
.../res/layout/time_zone_select_dialog.xml | 36 ++++
|
||||
...ezoneoverride_site_settings_preference.xml | 68 ++++++
|
||||
...imezoneOverrideSiteSettingsPreference.java | 194 ++++++++++++++++++
|
||||
...imezoneOverrideSiteSettingsPreference.java | 196 ++++++++++++++++++
|
||||
.../WebsitePreferenceBridge.java | 10 +
|
||||
...BromiteTimezoneOverrideContentSetting.java | 147 +++++++++++++
|
||||
.../android/website_preference_bridge.cc | 16 ++
|
||||
.../bromite_content_settings/timezone.grdp | 39 ++++
|
||||
.../timezone_override.inc | 23 +++
|
||||
.../timezone_override.inc | 23 ++
|
||||
.../browser/content_settings_pref_provider.cc | 16 ++
|
||||
.../browser/content_settings_pref_provider.h | 4 +
|
||||
.../core/browser/content_settings_utils.cc | 5 +
|
||||
@@ -31,9 +31,9 @@ Require: Content-settings-infrastructure.patch
|
||||
.../common/content_settings_mojom_traits.h | 5 +
|
||||
.../core/common/pref_names.cc | 3 +
|
||||
.../content_settings/core/common/pref_names.h | 2 +
|
||||
.../renderer/content_settings_agent_impl.cc | 80 ++++++++
|
||||
.../renderer/content_settings_agent_impl.cc | 80 +++++++
|
||||
.../renderer/content_settings_agent_impl.h | 11 +
|
||||
23 files changed, 679 insertions(+), 1 deletion(-)
|
||||
23 files changed, 681 insertions(+), 1 deletion(-)
|
||||
create mode 100755 components/browser_ui/site_settings/android/java/res/layout/time_zone_select_dialog.xml
|
||||
create mode 100755 components/browser_ui/site_settings/android/java/res/layout/timezoneoverride_site_settings_preference.xml
|
||||
create mode 100755 components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/TimezoneOverrideSiteSettingsPreference.java
|
||||
@@ -53,7 +53,7 @@ diff --git a/components/browser_ui/site_settings/android/BUILD.gn b/components/b
|
||||
]
|
||||
|
||||
resources_package = "org.chromium.components.browser_ui.site_settings"
|
||||
@@ -272,6 +273,8 @@ android_resources("java_resources") {
|
||||
@@ -273,6 +274,8 @@ android_resources("java_resources") {
|
||||
"java/res/xml/site_settings_preferences.xml",
|
||||
"java/res/xml/site_settings_preferences_with_categories.xml",
|
||||
"java/res/xml/website_preferences.xml",
|
||||
@@ -181,7 +181,7 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/c
|
||||
new file mode 100755
|
||||
--- /dev/null
|
||||
+++ b/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/TimezoneOverrideSiteSettingsPreference.java
|
||||
@@ -0,0 +1,194 @@
|
||||
@@ -0,0 +1,196 @@
|
||||
+/*
|
||||
+ This file is part of Bromite.
|
||||
+
|
||||
@@ -235,7 +235,8 @@ new file mode 100755
|
||||
+ * TimezoneOverride Preference for SiteSettings.
|
||||
+ */
|
||||
+public class TimezoneOverrideSiteSettingsPreference
|
||||
+ extends Preference implements RadioGroup.OnCheckedChangeListener,
|
||||
+ extends Preference implements BromiteCustomTriStateSiteSettingsPreferenceImpl,
|
||||
+ RadioGroup.OnCheckedChangeListener,
|
||||
+ RadioButtonWithEditText.OnTextChangeListener {
|
||||
+ private @ContentSettingValues int mSetting = ContentSettingValues.DEFAULT;
|
||||
+ private RadioButtonWithDescription mAllowed;
|
||||
@@ -260,6 +261,7 @@ new file mode 100755
|
||||
+ mBrowserContextHandle = browserContextHandle;
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public @ContentSettingValues int getCheckedSetting() {
|
||||
+ return mSetting;
|
||||
+ }
|
||||
@@ -711,7 +713,7 @@ diff --git a/components/content_settings/core/browser/content_settings_pref_prov
|
||||
diff --git a/components/content_settings/core/browser/content_settings_utils.cc b/components/content_settings/core/browser/content_settings_utils.cc
|
||||
--- a/components/content_settings/core/browser/content_settings_utils.cc
|
||||
+++ b/components/content_settings/core/browser/content_settings_utils.cc
|
||||
@@ -160,6 +160,11 @@ void GetRendererContentSettingRules(const HostContentSettingsMap* map,
|
||||
@@ -159,6 +159,11 @@ void GetRendererContentSettingRules(const HostContentSettingsMap* map,
|
||||
map->GetSettingsForOneType(ContentSettingsType::JAVASCRIPT);
|
||||
rules->popup_redirect_rules =
|
||||
map->GetSettingsForOneType(ContentSettingsType::POPUPS);
|
||||
|
||||
@@ -89,7 +89,7 @@ diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
|
||||
"//chrome/browser/headless",
|
||||
"//chrome/common",
|
||||
"//chrome/common:buildflags",
|
||||
@@ -7670,8 +7664,6 @@ static_library("browser") {
|
||||
@@ -7666,8 +7660,6 @@ static_library("browser") {
|
||||
"supervised_user/kids_chrome_management/kids_profile_manager.h",
|
||||
"supervised_user/supervised_user_browser_utils.cc",
|
||||
"supervised_user/supervised_user_browser_utils.h",
|
||||
|
||||
Reference in New Issue
Block a user