Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(479)

Unified Diff: content/browser/devtools/protocol/service_worker_handler.cc

Issue 2181553003: Stop passing const-reference of SWRegistration in all GetRegistrationsCallbacks. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix ServiceWorkerContextCore::DidFindRegistrationForCheckHasServiceWorker() Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/browser/devtools/protocol/service_worker_handler.cc
diff --git a/content/browser/devtools/protocol/service_worker_handler.cc b/content/browser/devtools/protocol/service_worker_handler.cc
index b9f528fdd5bf5d7cc2974b29f6fc683f280ab737..127b0c0a09387da4b8e718713669d4b7a551dbec 100644
--- a/content/browser/devtools/protocol/service_worker_handler.cc
+++ b/content/browser/devtools/protocol/service_worker_handler.cc
@@ -269,7 +269,7 @@ void DidFindRegistrationForDispatchSyncEventOnIO(
const std::string& tag,
bool last_chance,
ServiceWorkerStatusCode status,
- const scoped_refptr<content::ServiceWorkerRegistration>& registration) {
+ scoped_refptr<content::ServiceWorkerRegistration> registration) {
if (status != SERVICE_WORKER_OK || !registration->active_version())
return;
BackgroundSyncManager* background_sync_manager =
@@ -279,7 +279,7 @@ void DidFindRegistrationForDispatchSyncEventOnIO(
// Keep the registration while dispatching the sync event.
background_sync_manager->EmulateDispatchSyncEvent(
tag, std::move(version), last_chance,
- base::Bind(&StatusNoOpKeepingRegistration, registration));
+ base::Bind(&StatusNoOpKeepingRegistration, std::move(registration)));
}
void DispatchSyncEventOnIO(scoped_refptr<ServiceWorkerContextWrapper> context,

Powered by Google App Engine
This is Rietveld 408576698