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

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

Issue 501453002: Decouple script_url from ServiceWorkerRegistration (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review comments and add unittests Created 6 years, 4 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_context_wrapper.cc
diff --git a/content/browser/service_worker/service_worker_context_wrapper.cc b/content/browser/service_worker/service_worker_context_wrapper.cc
index 7c6865c66ba2aa3b59841ca9cdbd457c7d75cb84..1be34d7757e604ea0a845e17b0b4807d7a2844cf 100644
--- a/content/browser/service_worker/service_worker_context_wrapper.cc
+++ b/content/browser/service_worker/service_worker_context_wrapper.cc
@@ -166,7 +166,7 @@ void ServiceWorkerContextWrapper::DidGetAllRegistrationsForGetAllOrigins(
it != registrations.end();
++it) {
const ServiceWorkerRegistrationInfo& registration_info = *it;
- GURL origin = registration_info.script_url.GetOrigin();
+ GURL origin = registration_info.pattern.GetOrigin();
ServiceWorkerUsageInfo& usage_info = origins[origin];
if (usage_info.origin.is_empty())
@@ -209,7 +209,7 @@ void ServiceWorkerContextWrapper::DidGetAllRegistrationsForDeleteForOrigin(
it != registrations.end();
++it) {
const ServiceWorkerRegistrationInfo& registration_info = *it;
- if (origin == registration_info.script_url.GetOrigin()) {
+ if (origin == registration_info.pattern.GetOrigin()) {
UnregisterServiceWorker(registration_info.pattern,
base::Bind(&EmptySuccessCallback));
}

Powered by Google App Engine
This is Rietveld 408576698