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

Unified Diff: content/browser/service_worker/service_worker_storage_unittest.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/service_worker/service_worker_storage_unittest.cc
diff --git a/content/browser/service_worker/service_worker_storage_unittest.cc b/content/browser/service_worker/service_worker_storage_unittest.cc
index 478ace71d8340575aad4b28ee9ceb9ec3acd31c3..fe64a675479789585d4017485cbfa72a083b3fed 100644
--- a/content/browser/service_worker/service_worker_storage_unittest.cc
+++ b/content/browser/service_worker/service_worker_storage_unittest.cc
@@ -62,15 +62,14 @@ ServiceWorkerStorage::StatusCallback MakeStatusCallback(
return base::Bind(&StatusCallback, was_called, result);
}
-void FindCallback(
- bool* was_called,
- ServiceWorkerStatusCode* result,
- scoped_refptr<ServiceWorkerRegistration>* found,
- ServiceWorkerStatusCode status,
- const scoped_refptr<ServiceWorkerRegistration>& registration) {
+void FindCallback(bool* was_called,
+ ServiceWorkerStatusCode* result,
+ scoped_refptr<ServiceWorkerRegistration>* found,
+ ServiceWorkerStatusCode status,
+ scoped_refptr<ServiceWorkerRegistration> registration) {
*was_called = true;
*result = status;
- *found = registration;
+ *found = std::move(registration);
}
ServiceWorkerStorage::FindRegistrationCallback MakeFindCallback(
@@ -434,7 +433,7 @@ class ServiceWorkerStorageTest : public testing::Test {
}
ServiceWorkerStatusCode UpdateToActiveState(
- const scoped_refptr<ServiceWorkerRegistration>& registration) {
+ scoped_refptr<ServiceWorkerRegistration> registration) {
bool was_called = false;
ServiceWorkerStatusCode result = SERVICE_WORKER_ERROR_MAX_VALUE;
storage()->UpdateToActiveState(registration.get(),
@@ -446,7 +445,7 @@ class ServiceWorkerStorageTest : public testing::Test {
}
void UpdateLastUpdateCheckTime(
- const scoped_refptr<ServiceWorkerRegistration>& registration) {
+ scoped_refptr<ServiceWorkerRegistration> registration) {
storage()->UpdateLastUpdateCheckTime(registration.get());
base::RunLoop().RunUntilIdle();
}

Powered by Google App Engine
This is Rietveld 408576698