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

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

Issue 113133013: Refactor job coordination into a separate class. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years 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_register_job.cc
diff --git a/content/browser/service_worker/service_worker_register_job.cc b/content/browser/service_worker/service_worker_register_job.cc
index 90333595891f938c882275e8cfe55dca89dd9262..d90a2cf21d638affa745bcb54c5a2b63cc6d2067 100644
--- a/content/browser/service_worker/service_worker_register_job.cc
+++ b/content/browser/service_worker/service_worker_register_job.cc
@@ -21,10 +21,11 @@ void ServiceWorkerRegisterJob::StartRegister(const GURL& pattern,
const GURL& script_url) {
// Set up a chain of callbacks, in reverse order. Each of these
// callbacks may be called asynchronously by the previous callback.
- ServiceWorkerStorage::RegistrationCallback finish_registration(base::Bind(
- &ServiceWorkerRegisterJob::RegisterComplete, weak_factory_.GetWeakPtr()));
+ ServiceWorkerJobCoordinator::RegistrationCallback finish_registration(
+ base::Bind(&ServiceWorkerRegisterJob::RegisterComplete,
+ weak_factory_.GetWeakPtr()));
- ServiceWorkerStorage::UnregistrationCallback register_new(
+ ServiceWorkerJobCoordinator::UnregistrationCallback register_new(
base::Bind(&ServiceWorkerRegisterJob::RegisterPatternAndContinue,
weak_factory_.GetWeakPtr(),
pattern,
@@ -44,7 +45,7 @@ void ServiceWorkerRegisterJob::StartRegister(const GURL& pattern,
void ServiceWorkerRegisterJob::StartUnregister(const GURL& pattern) {
// Set up a chain of callbacks, in reverse order. Each of these
// callbacks may be called asynchronously by the previous callback.
- ServiceWorkerStorage::UnregistrationCallback finish_unregistration(
+ ServiceWorkerJobCoordinator::UnregistrationCallback finish_unregistration(
base::Bind(&ServiceWorkerRegisterJob::UnregisterComplete,
weak_factory_.GetWeakPtr()));
@@ -61,7 +62,7 @@ void ServiceWorkerRegisterJob::StartUnregister(const GURL& pattern) {
void ServiceWorkerRegisterJob::RegisterPatternAndContinue(
const GURL& pattern,
const GURL& script_url,
- const ServiceWorkerStorage::RegistrationCallback& callback,
+ const ServiceWorkerJobCoordinator::RegistrationCallback& callback,
ServiceWorkerRegistrationStatus previous_status) {
if (previous_status != REGISTRATION_OK) {
BrowserThread::PostTask(
@@ -85,7 +86,7 @@ void ServiceWorkerRegisterJob::RegisterPatternAndContinue(
void ServiceWorkerRegisterJob::UnregisterPatternAndContinue(
const GURL& pattern,
const GURL& new_script_url,
- const ServiceWorkerStorage::UnregistrationCallback& callback,
+ const ServiceWorkerJobCoordinator::UnregistrationCallback& callback,
bool found,
ServiceWorkerRegistrationStatus previous_status,
const scoped_refptr<ServiceWorkerRegistration>& previous_registration) {

Powered by Google App Engine
This is Rietveld 408576698