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

Unified Diff: content/browser/service_worker/service_worker_registration.h

Issue 1106723002: ServiceWorker: Decompose SWRegistration::SetVersionInternal for readability (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: make the argument const-ref Created 5 years, 8 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_registration.h
diff --git a/content/browser/service_worker/service_worker_registration.h b/content/browser/service_worker/service_worker_registration.h
index 69e0720e0e8fced4fc88cfafe84c4770948d67d6..3a7740b2283ab9cfecdd0ba8890f1b9bba8801fe 100644
--- a/content/browser/service_worker/service_worker_registration.h
+++ b/content/browser/service_worker/service_worker_registration.h
@@ -94,9 +94,9 @@ class CONTENT_EXPORT ServiceWorkerRegistration
// Sets the corresposding version attribute and resets the position
// (if any) left vacant (ie. by a waiting version being promoted).
// Also notifies listeners via OnVersionAttributesChanged.
- void SetActiveVersion(ServiceWorkerVersion* version);
- void SetWaitingVersion(ServiceWorkerVersion* version);
- void SetInstallingVersion(ServiceWorkerVersion* version);
+ void SetActiveVersion(const scoped_refptr<ServiceWorkerVersion>& version);
+ void SetWaitingVersion(const scoped_refptr<ServiceWorkerVersion>& version);
+ void SetInstallingVersion(const scoped_refptr<ServiceWorkerVersion>& version);
// If version is the installing, waiting, active version of this
// registation, the method will reset that field to NULL, and notify
@@ -142,10 +142,6 @@ class CONTENT_EXPORT ServiceWorkerRegistration
~ServiceWorkerRegistration() override;
- void SetVersionInternal(
- ServiceWorkerVersion* version,
- scoped_refptr<ServiceWorkerVersion>* data_member,
- int change_flag);
void UnsetVersionInternal(
ServiceWorkerVersion* version,
ChangedVersionAttributesMask* mask);

Powered by Google App Engine
This is Rietveld 408576698