fix build
This commit is contained in:
parent
07d13a350b
commit
a66a11c820
2 changed files with 50 additions and 42 deletions
|
@ -27,7 +27,7 @@ See also: https://github.com/bromite/bromite/wiki/TimezoneOverride
|
|||
.../strings/android/site_settings.grdp | 35 ++++
|
||||
.../browser/content_settings_pref_provider.cc | 16 ++
|
||||
.../browser/content_settings_pref_provider.h | 5 +
|
||||
.../core/browser/content_settings_registry.cc | 23 +++
|
||||
.../core/browser/content_settings_registry.cc | 12 ++
|
||||
.../core/browser/content_settings_utils.cc | 7 +
|
||||
.../core/browser/host_content_settings_map.cc | 8 +
|
||||
.../core/browser/host_content_settings_map.h | 3 +
|
||||
|
@ -42,7 +42,7 @@ See also: https://github.com/bromite/bromite/wiki/TimezoneOverride
|
|||
.../renderer/content_settings_agent_impl.cc | 89 ++++++++
|
||||
.../renderer/content_settings_agent_impl.h | 4 +
|
||||
.../WebLayerSiteSettingsDelegate.java | 3 +
|
||||
36 files changed, 735 insertions(+), 18 deletions(-)
|
||||
36 files changed, 724 insertions(+), 18 deletions(-)
|
||||
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
|
||||
|
@ -1086,7 +1086,7 @@ diff --git a/components/content_settings/core/browser/content_settings_pref_prov
|
|||
diff --git a/components/content_settings/core/browser/content_settings_registry.cc b/components/content_settings/core/browser/content_settings_registry.cc
|
||||
--- a/components/content_settings/core/browser/content_settings_registry.cc
|
||||
+++ b/components/content_settings/core/browser/content_settings_registry.cc
|
||||
@@ -291,6 +291,29 @@ void ContentSettingsRegistry::Init() {
|
||||
@@ -291,6 +291,18 @@ void ContentSettingsRegistry::Init() {
|
||||
ContentSettingsInfo::PERSISTENT,
|
||||
ContentSettingsInfo::EXCEPTIONS_ON_SECURE_ORIGINS_ONLY);
|
||||
|
||||
|
@ -1101,17 +1101,6 @@ diff --git a/components/content_settings/core/browser/content_settings_registry.
|
|||
+ ContentSettingsInfo::INHERIT_IN_INCOGNITO,
|
||||
+ ContentSettingsInfo::PERSISTENT,
|
||||
+ ContentSettingsInfo::EXCEPTIONS_ON_SECURE_AND_INSECURE_ORIGINS);
|
||||
+ Register(ContentSettingsType::TIMEZONE_OVERRIDE, "timezone-override", CONTENT_SETTING_ALLOW,
|
||||
+ WebsiteSettingsInfo::SYNCABLE,
|
||||
+ AllowlistedSchemes(kChromeUIScheme, kChromeDevToolsScheme),
|
||||
+ ValidSettings(CONTENT_SETTING_ALLOW, // use system time
|
||||
+ CONTENT_SETTING_ASK, // custom timezone, default UTC
|
||||
+ CONTENT_SETTING_BLOCK), // random
|
||||
+ WebsiteSettingsInfo::SINGLE_ORIGIN_WITH_EMBEDDED_EXCEPTIONS_SCOPE,
|
||||
+ WebsiteSettingsRegistry::PLATFORM_ANDROID,
|
||||
+ ContentSettingsInfo::INHERIT_IN_INCOGNITO,
|
||||
+ ContentSettingsInfo::PERSISTENT,
|
||||
+ ContentSettingsInfo::EXCEPTIONS_ON_SECURE_AND_INSECURE_ORIGINS);
|
||||
+
|
||||
Register(ContentSettingsType::DURABLE_STORAGE, "durable-storage",
|
||||
CONTENT_SETTING_ASK, WebsiteSettingsInfo::UNSYNCABLE,
|
||||
|
|
|
@ -1,6 +1,19 @@
|
|||
From: nikolowry <nikolowry@users.noreply.github.com>
|
||||
Date: Fri, 1 Oct 2021 09:39:03 +0000
|
||||
Subject: Disable reporting
|
||||
|
||||
---
|
||||
content/browser/BUILD.gn | 8 ++++----
|
||||
third_party/blink/renderer/core/frame/local_frame.cc | 5 +++++
|
||||
third_party/blink/renderer/core/frame/local_frame.h | 7 +++++--
|
||||
.../blink/renderer/core/frame/reporting_context.cc | 9 +++++++++
|
||||
.../blink/renderer/core/frame/reporting_context.h | 7 +++++--
|
||||
5 files changed, 28 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/content/browser/BUILD.gn b/content/browser/BUILD.gn
|
||||
--- a/content/browser/BUILD.gn
|
||||
+++ b/content/browser/BUILD.gn
|
||||
@@ -1150,6 +1150,10 @@ source_set("browser") {
|
||||
@@ -1227,6 +1227,10 @@ source_set("browser") {
|
||||
"net/browser_online_state_observer.cc",
|
||||
"net/browser_online_state_observer.h",
|
||||
"net/cookie_store_factory.cc",
|
||||
|
@ -11,7 +24,7 @@
|
|||
"net/network_errors_listing_ui.cc",
|
||||
"net/network_errors_listing_ui.h",
|
||||
"net/network_quality_observer_impl.cc",
|
||||
@@ -2796,10 +2800,6 @@ source_set("browser") {
|
||||
@@ -2966,10 +2970,6 @@ source_set("browser") {
|
||||
|
||||
if (enable_reporting) {
|
||||
sources += [
|
||||
|
@ -22,17 +35,18 @@
|
|||
"net/reporting_service_proxy.cc",
|
||||
"net/reporting_service_proxy.h",
|
||||
]
|
||||
diff --git a/third_party/blink/renderer/core/frame/local_frame.cc b/third_party/blink/renderer/core/frame/local_frame.cc
|
||||
--- a/third_party/blink/renderer/core/frame/local_frame.cc
|
||||
+++ b/third_party/blink/renderer/core/frame/local_frame.cc
|
||||
@@ -38,6 +38,7 @@
|
||||
#include "base/unguessable_token.h"
|
||||
@@ -39,6 +39,7 @@
|
||||
#include "base/values.h"
|
||||
#include "mojo/public/cpp/bindings/self_owned_receiver.h"
|
||||
#include "mojo/public/cpp/system/message_pipe.h"
|
||||
+#include "net/net_buildflags.h"
|
||||
#include "services/data_decoder/public/mojom/resource_snapshot_for_web_bundle.mojom-blink.h"
|
||||
#include "services/network/public/cpp/features.h"
|
||||
#include "services/network/public/mojom/content_security_policy.mojom-blink.h"
|
||||
@@ -551,7 +552,9 @@ void LocalFrame::Trace(Visitor* visitor)
|
||||
@@ -423,7 +424,9 @@ void LocalFrame::Trace(Visitor* visitor) const {
|
||||
visitor->Trace(raw_system_clipboard_);
|
||||
visitor->Trace(virtual_keyboard_overlay_changed_observers_);
|
||||
visitor->Trace(pause_handle_receivers_);
|
||||
|
@ -42,7 +56,7 @@
|
|||
#if defined(OS_MAC)
|
||||
visitor->Trace(text_input_host_);
|
||||
#endif
|
||||
@@ -2273,6 +2276,7 @@ const base::UnguessableToken& LocalFrame
|
||||
@@ -2308,6 +2311,7 @@ const base::UnguessableToken& LocalFrame::GetAgentClusterId() const {
|
||||
return base::UnguessableToken::Null();
|
||||
}
|
||||
|
||||
|
@ -50,7 +64,7 @@
|
|||
mojom::blink::ReportingServiceProxy* LocalFrame::GetReportingService() {
|
||||
if (!reporting_service_.is_bound()) {
|
||||
GetBrowserInterfaceBroker().GetInterface(
|
||||
@@ -2281,6 +2285,7 @@ mojom::blink::ReportingServiceProxy* Loc
|
||||
@@ -2316,6 +2320,7 @@ mojom::blink::ReportingServiceProxy* LocalFrame::GetReportingService() {
|
||||
}
|
||||
return reporting_service_.get();
|
||||
}
|
||||
|
@ -58,17 +72,18 @@
|
|||
|
||||
// static
|
||||
void LocalFrame::NotifyUserActivation(
|
||||
diff --git a/third_party/blink/renderer/core/frame/local_frame.h b/third_party/blink/renderer/core/frame/local_frame.h
|
||||
--- a/third_party/blink/renderer/core/frame/local_frame.h
|
||||
+++ b/third_party/blink/renderer/core/frame/local_frame.h
|
||||
@@ -38,6 +38,7 @@
|
||||
#include "mojo/public/cpp/bindings/pending_associated_receiver.h"
|
||||
#include "mojo/public/cpp/bindings/pending_receiver.h"
|
||||
#include "mojo/public/cpp/bindings/unique_receiver_set.h"
|
||||
@@ -39,6 +39,7 @@
|
||||
#include "services/network/public/mojom/fetch_api.mojom-blink-forward.h"
|
||||
#include "third_party/blink/public/common/frame/frame_ad_evidence.h"
|
||||
#include "third_party/blink/public/common/frame/payment_request_token.h"
|
||||
+#include "net/net_buildflags.h"
|
||||
#include "third_party/blink/public/common/frame/transient_allow_fullscreen.h"
|
||||
#include "third_party/blink/public/mojom/blob/blob_url_store.mojom-blink.h"
|
||||
#include "third_party/blink/public/mojom/frame/back_forward_cache_controller.mojom-blink.h"
|
||||
@@ -521,9 +522,9 @@ class CORE_EXPORT LocalFrame final
|
||||
#include "third_party/blink/public/mojom/blob/blob_url_store.mojom-blink-forward.h"
|
||||
#include "third_party/blink/public/mojom/devtools/devtools_agent.mojom-blink-forward.h"
|
||||
@@ -545,9 +546,9 @@ class CORE_EXPORT LocalFrame final : public Frame,
|
||||
}
|
||||
|
||||
SmoothScrollSequencer& GetSmoothScrollSequencer();
|
||||
|
@ -80,18 +95,18 @@
|
|||
// Returns the frame host ptr. The interface returned is backed by an
|
||||
// associated interface with the legacy Chrome IPC channel.
|
||||
mojom::blink::LocalFrameHost& GetLocalFrameHostRemote() const;
|
||||
@@ -903,9 +904,11 @@ class CORE_EXPORT LocalFrame final
|
||||
@@ -875,8 +876,10 @@ class CORE_EXPORT LocalFrame final : public Frame,
|
||||
// const methods.
|
||||
//
|
||||
// LocalFrame can be reused by multiple ExecutionContext.
|
||||
+#if BUILDFLAG(ENABLE_REPORTING)
|
||||
mutable HeapMojoRemote<mojom::blink::ReportingServiceProxy,
|
||||
HeapMojoWrapperMode::kWithoutContextObserver>
|
||||
mutable HeapMojoRemote<mojom::blink::ReportingServiceProxy>
|
||||
reporting_service_{nullptr};
|
||||
+#endif
|
||||
|
||||
#if defined(OS_MAC)
|
||||
// LocalFrame can be reused by multiple ExecutionContext.
|
||||
diff --git a/third_party/blink/renderer/core/frame/reporting_context.cc b/third_party/blink/renderer/core/frame/reporting_context.cc
|
||||
--- a/third_party/blink/renderer/core/frame/reporting_context.cc
|
||||
+++ b/third_party/blink/renderer/core/frame/reporting_context.cc
|
||||
@@ -4,6 +4,7 @@
|
||||
|
@ -102,7 +117,7 @@
|
|||
#include "third_party/blink/public/common/browser_interface_broker_proxy.h"
|
||||
#include "third_party/blink/public/platform/platform.h"
|
||||
#include "third_party/blink/public/platform/task_type.h"
|
||||
@@ -54,7 +55,9 @@ const char ReportingContext::kSupplement
|
||||
@@ -54,7 +55,9 @@ const char ReportingContext::kSupplementName[] = "ReportingContext";
|
||||
ReportingContext::ReportingContext(ExecutionContext& context)
|
||||
: Supplement<ExecutionContext>(context),
|
||||
execution_context_(context),
|
||||
|
@ -112,7 +127,7 @@
|
|||
receiver_(this, &context) {}
|
||||
|
||||
// static
|
||||
@@ -118,7 +121,9 @@ void ReportingContext::Trace(Visitor* vi
|
||||
@@ -118,7 +121,9 @@ void ReportingContext::Trace(Visitor* visitor) const {
|
||||
visitor->Trace(observers_);
|
||||
visitor->Trace(report_buffer_);
|
||||
visitor->Trace(execution_context_);
|
||||
|
@ -122,7 +137,7 @@
|
|||
visitor->Trace(receiver_);
|
||||
Supplement<ExecutionContext>::Trace(visitor);
|
||||
}
|
||||
@@ -140,6 +145,7 @@ void ReportingContext::CountReport(Repor
|
||||
@@ -140,6 +145,7 @@ void ReportingContext::CountReport(Report* report) {
|
||||
UseCounter::Count(execution_context_, feature);
|
||||
}
|
||||
|
||||
|
@ -130,7 +145,7 @@
|
|||
const HeapMojoRemote<mojom::blink::ReportingServiceProxy>&
|
||||
ReportingContext::GetReportingService() const {
|
||||
if (!reporting_service_.is_bound()) {
|
||||
@@ -149,6 +155,7 @@ ReportingContext::GetReportingService()
|
||||
@@ -149,6 +155,7 @@ ReportingContext::GetReportingService() const {
|
||||
}
|
||||
return reporting_service_;
|
||||
}
|
||||
|
@ -138,22 +153,23 @@
|
|||
|
||||
void ReportingContext::NotifyInternal(Report* report) {
|
||||
// Buffer the report.
|
||||
@@ -171,6 +178,7 @@ void ReportingContext::NotifyInternal(Re
|
||||
@@ -171,6 +178,7 @@ void ReportingContext::NotifyInternal(Report* report) {
|
||||
|
||||
void ReportingContext::SendToReportingAPI(Report* report,
|
||||
const String& endpoint) const {
|
||||
+#if BUILDFLAG(ENABLE_REPORTING)
|
||||
const String& type = report->type();
|
||||
if (!(type == ReportType::kCSPViolation || type == ReportType::kDeprecation ||
|
||||
type == ReportType::kFeaturePolicyViolation ||
|
||||
@@ -227,6 +235,7 @@ void ReportingContext::SendToReportingAP
|
||||
"Document policy violation", body->sourceFile(), line_number,
|
||||
column_number);
|
||||
type == ReportType::kPermissionsPolicyViolation ||
|
||||
@@ -226,6 +234,7 @@ void ReportingContext::SendToReportingAPI(Report* report,
|
||||
url, endpoint, body->featureId(), body->disposition(), body->message(),
|
||||
body->sourceFile(), line_number, column_number);
|
||||
}
|
||||
+#endif
|
||||
}
|
||||
|
||||
} // namespace blink
|
||||
diff --git a/third_party/blink/renderer/core/frame/reporting_context.h b/third_party/blink/renderer/core/frame/reporting_context.h
|
||||
--- a/third_party/blink/renderer/core/frame/reporting_context.h
|
||||
+++ b/third_party/blink/renderer/core/frame/reporting_context.h
|
||||
@@ -5,6 +5,7 @@
|
||||
|
@ -164,7 +180,7 @@
|
|||
#include "third_party/blink/public/mojom/frame/reporting_observer.mojom-blink.h"
|
||||
#include "third_party/blink/public/mojom/reporting/reporting.mojom-blink.h"
|
||||
#include "third_party/blink/renderer/core/core_export.h"
|
||||
@@ -53,10 +54,10 @@ class CORE_EXPORT ReportingContext : pub
|
||||
@@ -53,10 +54,10 @@ class CORE_EXPORT ReportingContext : public GarbageCollected<ReportingContext>,
|
||||
private:
|
||||
// Counts the use of a report type via UseCounter.
|
||||
void CountReport(Report*);
|
||||
|
@ -177,7 +193,7 @@
|
|||
void NotifyInternal(Report* report);
|
||||
// Send |report| via the Reporting API to |endpoint|.
|
||||
void SendToReportingAPI(Report* report, const String& endpoint) const;
|
||||
@@ -67,8 +68,10 @@ class CORE_EXPORT ReportingContext : pub
|
||||
@@ -67,8 +68,10 @@ class CORE_EXPORT ReportingContext : public GarbageCollected<ReportingContext>,
|
||||
|
||||
// This is declared mutable so that the service endpoint can be cached by
|
||||
// const methods.
|
||||
|
@ -188,3 +204,6 @@
|
|||
|
||||
HeapMojoReceiver<mojom::blink::ReportingObserver, ReportingContext> receiver_;
|
||||
};
|
||||
--
|
||||
2.17.1
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue