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

Unified Diff: Source/modules/serviceworkers/ServiceWorkerRegistration.cpp

Issue 1185483003: ServiceWorker: Route unregister() through WebServiceWorkerRegistration for refactoring (1) (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 6 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 | « no previous file | public/platform/WebServiceWorkerProvider.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/serviceworkers/ServiceWorkerRegistration.cpp
diff --git a/Source/modules/serviceworkers/ServiceWorkerRegistration.cpp b/Source/modules/serviceworkers/ServiceWorkerRegistration.cpp
index fa2e56abbbcb5d4a88df622dca4f2ff30eac51fb..075df32fb49f2a1d049eab5c8305ad93a79ee9dc 100644
--- a/Source/modules/serviceworkers/ServiceWorkerRegistration.cpp
+++ b/Source/modules/serviceworkers/ServiceWorkerRegistration.cpp
@@ -105,6 +105,7 @@ ScriptPromise ServiceWorkerRegistration::unregister(ScriptState* scriptState)
return promise;
}
+#ifdef CRBUG_500404
kinuko 2015/06/16 00:37:54 Why do we have these ifdef's in the same patch whe
nhiroki 2015/06/16 01:03:49 Right, this should be moved to the third CL. Done.
RefPtr<SecurityOrigin> documentOrigin = scriptState->executionContext()->securityOrigin();
KURL scopeURL = scriptState->executionContext()->completeURL(scope());
scopeURL.removeFragmentIdentifier();
@@ -115,6 +116,9 @@ ScriptPromise ServiceWorkerRegistration::unregister(ScriptState* scriptState)
}
m_provider->unregisterServiceWorker(scopeURL, new CallbackPromiseAdapter<bool, ServiceWorkerError>(resolver));
+#else
+ m_outerRegistration->unregister(m_provider, new CallbackPromiseAdapter<bool, ServiceWorkerError>(resolver));
+#endif
return promise;
}
« no previous file with comments | « no previous file | public/platform/WebServiceWorkerProvider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698