From bbe89c5a2fa2ffdf2dfdc54bc65b4057981943ee Mon Sep 17 00:00:00 2001 From: "Nicholas A. Thompson" Date: Tue, 4 Aug 2026 11:02:11 -0700 Subject: [PATCH] Disable GCM: fail fast PushManager.subscribe() without a token (#3888) --- .../core/ungoogled-chromium/disable-gcm.patch | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/patches/core/ungoogled-chromium/disable-gcm.patch b/patches/core/ungoogled-chromium/disable-gcm.patch index 77a04b40..05b11e20 100644 --- a/patches/core/ungoogled-chromium/disable-gcm.patch +++ b/patches/core/ungoogled-chromium/disable-gcm.patch @@ -154,3 +154,32 @@ } std::string GCMClientImpl::GetStateString() const { +--- a/components/gcm_driver/gcm_driver_desktop.cc ++++ b/components/gcm_driver/gcm_driver_desktop.cc +@@ -1189,25 +1189,7 @@ GCMClient::Result GCMDriverDesktop::EnsureStarted( + GCMClient::StartMode start_mode) { + DCHECK(ui_thread_->RunsTasksInCurrentSequence()); + +- if (gcm_started_) +- return GCMClient::SUCCESS; +- +- // Have any app requested the service? +- if (app_handlers().empty()) +- return GCMClient::UNKNOWN_ERROR; +- +- if (!delayed_task_controller_) +- delayed_task_controller_ = std::make_unique(); +- +- // Note that we need to pass weak pointer again since the existing weak +- // pointer in IOWorker might have been invalidated when GCM is stopped. +- io_thread_->PostTask( +- FROM_HERE, base::BindOnce(&GCMDriverDesktop::IOWorker::Start, +- base::Unretained(io_worker_.get()), start_mode, +- weak_ptr_factory_.GetWeakPtr(), +- /*time_task_posted=*/base::TimeTicks::Now())); +- +- return GCMClient::SUCCESS; ++ return GCMClient::GCM_DISABLED; + } + + void GCMDriverDesktop::RemoveCachedData() {