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() {