Set enable_reporting to false
Added `ungoogled-chromium-Fix-building-without-enabling-reporting.patch` to fix build issues. See the following PR for more details: https://github.com/Eloston/ungoogled-chromium/pull/1416
This commit is contained in:
parent
858e85b59b
commit
07d13a350b
3 changed files with 192 additions and 1 deletions
|
@ -19,7 +19,7 @@ enable_nacl_nonsfi=false
|
|||
enable_platform_dolby_vision=true
|
||||
enable_platform_hevc=true
|
||||
enable_remoting=false
|
||||
enable_reporting=true
|
||||
enable_reporting=false
|
||||
enable_vr=false
|
||||
exclude_unwind_tables=false
|
||||
ffmpeg_branding="Chrome"
|
||||
|
|
|
@ -29,6 +29,7 @@ ungoogled-chromium-Disable-Google-host-detection.patch
|
|||
ungoogled-chromium-Disable-Gaia.patch
|
||||
ungoogled-chromium-Disable-domain-reliability.patch
|
||||
ungoogled-chromium-Disable-Network-Time-Tracker.patch
|
||||
ungoogled-chromium-Fix-building-without-enabling-reporting.patch
|
||||
Disable-safe-browsing.patch
|
||||
Skip-the-first-run-and-metrics.patch
|
||||
Disable-all-promo-dialogs.patch
|
||||
|
|
|
@ -0,0 +1,190 @@
|
|||
--- a/content/browser/BUILD.gn
|
||||
+++ b/content/browser/BUILD.gn
|
||||
@@ -1150,6 +1150,10 @@ source_set("browser") {
|
||||
"net/browser_online_state_observer.cc",
|
||||
"net/browser_online_state_observer.h",
|
||||
"net/cookie_store_factory.cc",
|
||||
+ "net/cross_origin_embedder_policy_reporter.cc",
|
||||
+ "net/cross_origin_embedder_policy_reporter.h",
|
||||
+ "net/cross_origin_opener_policy_reporter.cc",
|
||||
+ "net/cross_origin_opener_policy_reporter.h",
|
||||
"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") {
|
||||
|
||||
if (enable_reporting) {
|
||||
sources += [
|
||||
- "net/cross_origin_embedder_policy_reporter.cc",
|
||||
- "net/cross_origin_embedder_policy_reporter.h",
|
||||
- "net/cross_origin_opener_policy_reporter.cc",
|
||||
- "net/cross_origin_opener_policy_reporter.h",
|
||||
"net/reporting_service_proxy.cc",
|
||||
"net/reporting_service_proxy.h",
|
||||
]
|
||||
--- 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"
|
||||
#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)
|
||||
visitor->Trace(raw_system_clipboard_);
|
||||
visitor->Trace(virtual_keyboard_overlay_changed_observers_);
|
||||
visitor->Trace(pause_handle_receivers_);
|
||||
+#if BUILDFLAG(ENABLE_REPORTING)
|
||||
visitor->Trace(reporting_service_);
|
||||
+#endif
|
||||
#if defined(OS_MAC)
|
||||
visitor->Trace(text_input_host_);
|
||||
#endif
|
||||
@@ -2273,6 +2276,7 @@ const base::UnguessableToken& LocalFrame
|
||||
return base::UnguessableToken::Null();
|
||||
}
|
||||
|
||||
+#if BUILDFLAG(ENABLE_REPORTING)
|
||||
mojom::blink::ReportingServiceProxy* LocalFrame::GetReportingService() {
|
||||
if (!reporting_service_.is_bound()) {
|
||||
GetBrowserInterfaceBroker().GetInterface(
|
||||
@@ -2281,6 +2285,7 @@ mojom::blink::ReportingServiceProxy* Loc
|
||||
}
|
||||
return reporting_service_.get();
|
||||
}
|
||||
+#endif
|
||||
|
||||
// static
|
||||
void LocalFrame::NotifyUserActivation(
|
||||
--- 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"
|
||||
+#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
|
||||
}
|
||||
|
||||
SmoothScrollSequencer& GetSmoothScrollSequencer();
|
||||
-
|
||||
+#if BUILDFLAG(ENABLE_REPORTING)
|
||||
mojom::blink::ReportingServiceProxy* GetReportingService();
|
||||
-
|
||||
+#endif
|
||||
// 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
|
||||
// const methods.
|
||||
//
|
||||
// LocalFrame can be reused by multiple ExecutionContext.
|
||||
+#if BUILDFLAG(ENABLE_REPORTING)
|
||||
mutable HeapMojoRemote<mojom::blink::ReportingServiceProxy,
|
||||
HeapMojoWrapperMode::kWithoutContextObserver>
|
||||
reporting_service_{nullptr};
|
||||
+#endif
|
||||
|
||||
#if defined(OS_MAC)
|
||||
// LocalFrame can be reused by multiple ExecutionContext.
|
||||
--- a/third_party/blink/renderer/core/frame/reporting_context.cc
|
||||
+++ b/third_party/blink/renderer/core/frame/reporting_context.cc
|
||||
@@ -4,6 +4,7 @@
|
||||
|
||||
#include "third_party/blink/renderer/core/frame/reporting_context.h"
|
||||
|
||||
+#include "net/net_buildflags.h"
|
||||
#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
|
||||
ReportingContext::ReportingContext(ExecutionContext& context)
|
||||
: Supplement<ExecutionContext>(context),
|
||||
execution_context_(context),
|
||||
+#if BUILDFLAG(ENABLE_REPORTING)
|
||||
reporting_service_(&context),
|
||||
+#endif
|
||||
receiver_(this, &context) {}
|
||||
|
||||
// static
|
||||
@@ -118,7 +121,9 @@ void ReportingContext::Trace(Visitor* vi
|
||||
visitor->Trace(observers_);
|
||||
visitor->Trace(report_buffer_);
|
||||
visitor->Trace(execution_context_);
|
||||
+#if BUILDFLAG(ENABLE_REPORTING)
|
||||
visitor->Trace(reporting_service_);
|
||||
+#endif
|
||||
visitor->Trace(receiver_);
|
||||
Supplement<ExecutionContext>::Trace(visitor);
|
||||
}
|
||||
@@ -140,6 +145,7 @@ void ReportingContext::CountReport(Repor
|
||||
UseCounter::Count(execution_context_, feature);
|
||||
}
|
||||
|
||||
+#if BUILDFLAG(ENABLE_REPORTING)
|
||||
const HeapMojoRemote<mojom::blink::ReportingServiceProxy>&
|
||||
ReportingContext::GetReportingService() const {
|
||||
if (!reporting_service_.is_bound()) {
|
||||
@@ -149,6 +155,7 @@ ReportingContext::GetReportingService()
|
||||
}
|
||||
return reporting_service_;
|
||||
}
|
||||
+#endif
|
||||
|
||||
void ReportingContext::NotifyInternal(Report* report) {
|
||||
// Buffer the report.
|
||||
@@ -171,6 +178,7 @@ void ReportingContext::NotifyInternal(Re
|
||||
|
||||
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);
|
||||
}
|
||||
+#endif
|
||||
}
|
||||
|
||||
} // namespace blink
|
||||
--- a/third_party/blink/renderer/core/frame/reporting_context.h
|
||||
+++ b/third_party/blink/renderer/core/frame/reporting_context.h
|
||||
@@ -5,6 +5,7 @@
|
||||
#ifndef THIRD_PARTY_BLINK_RENDERER_CORE_FRAME_REPORTING_CONTEXT_H_
|
||||
#define THIRD_PARTY_BLINK_RENDERER_CORE_FRAME_REPORTING_CONTEXT_H_
|
||||
|
||||
+#include "net/net_buildflags.h"
|
||||
#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
|
||||
private:
|
||||
// Counts the use of a report type via UseCounter.
|
||||
void CountReport(Report*);
|
||||
-
|
||||
+#if BUILDFLAG(ENABLE_REPORTING)
|
||||
const HeapMojoRemote<mojom::blink::ReportingServiceProxy>&
|
||||
GetReportingService() const;
|
||||
-
|
||||
+#endif
|
||||
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
|
||||
|
||||
// This is declared mutable so that the service endpoint can be cached by
|
||||
// const methods.
|
||||
+#if BUILDFLAG(ENABLE_REPORTING)
|
||||
mutable HeapMojoRemote<mojom::blink::ReportingServiceProxy>
|
||||
reporting_service_;
|
||||
+#endif
|
||||
|
||||
HeapMojoReceiver<mojom::blink::ReportingObserver, ReportingContext> receiver_;
|
||||
};
|
Loading…
Add table
Reference in a new issue