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

Unified Diff: content/browser/service_worker/service_worker_version.cc

Issue 1100003005: ServiceWorker: Cleanup ServiceWorkerVersion (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
« no previous file with comments | « content/browser/service_worker/service_worker_version.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/service_worker/service_worker_version.cc
diff --git a/content/browser/service_worker/service_worker_version.cc b/content/browser/service_worker/service_worker_version.cc
index f0a9c17cb8e6582480cc6fae6247875e000be337..258d9205d56adc28f8562feb567590a107e9d7e5 100644
--- a/content/browser/service_worker/service_worker_version.cc
+++ b/content/browser/service_worker/service_worker_version.cc
@@ -370,8 +370,9 @@ ServiceWorkerVersion::ServiceWorkerVersion(
int64 version_id,
base::WeakPtr<ServiceWorkerContextCore> context)
: version_id_(version_id),
- registration_id_(kInvalidServiceWorkerVersionId),
+ registration_id_(registration->id()),
script_url_(script_url),
+ scope_(registration->pattern()),
status_(NEW),
context_(context),
script_cache_map_(this, context),
@@ -379,10 +380,6 @@ ServiceWorkerVersion::ServiceWorkerVersion(
weak_factory_(this) {
DCHECK(context_);
DCHECK(registration);
- if (registration) {
- registration_id_ = registration->id();
- scope_ = registration->pattern();
- }
context_->AddLiveVersion(this);
embedded_worker_ = context_->embedded_worker_registry()->CreateWorker();
embedded_worker_->AddListener(this);
« no previous file with comments | « content/browser/service_worker/service_worker_version.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698