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

Side by Side Diff: content/browser/service_worker/service_worker_job_coordinator.h

Issue 1270513002: Service Worker: Make ServiceWorkerRegistration.update() return a promise. (Chromium 2/3) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix strings. Created 5 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_JOB_COORDINATOR_H_ 5 #ifndef CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_JOB_COORDINATOR_H_
6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_JOB_COORDINATOR_H_ 6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_JOB_COORDINATOR_H_
7 7
8 #include <deque> 8 #include <deque>
9 #include <map> 9 #include <map>
10 10
(...skipping 20 matching lines...) Expand all
31 const GURL& script_url, 31 const GURL& script_url,
32 ServiceWorkerProviderHost* provider_host, 32 ServiceWorkerProviderHost* provider_host,
33 const ServiceWorkerRegisterJob::RegistrationCallback& callback); 33 const ServiceWorkerRegisterJob::RegistrationCallback& callback);
34 34
35 void Unregister( 35 void Unregister(
36 const GURL& pattern, 36 const GURL& pattern,
37 const ServiceWorkerUnregisterJob::UnregistrationCallback& callback); 37 const ServiceWorkerUnregisterJob::UnregistrationCallback& callback);
38 38
39 void Update(ServiceWorkerRegistration* registration, bool force_bypass_cache); 39 void Update(ServiceWorkerRegistration* registration, bool force_bypass_cache);
40 40
41 void Update(ServiceWorkerRegistration* registration,
42 bool force_bypass_cache,
43 ServiceWorkerProviderHost* provider_host,
44 const ServiceWorkerRegisterJob::RegistrationCallback& callback);
45
41 // Calls ServiceWorkerRegisterJobBase::Abort() on all jobs and removes them. 46 // Calls ServiceWorkerRegisterJobBase::Abort() on all jobs and removes them.
42 void AbortAll(); 47 void AbortAll();
43 48
44 // Removes the job. A job that was not aborted must call FinishJob when it is 49 // Removes the job. A job that was not aborted must call FinishJob when it is
45 // done. 50 // done.
46 void FinishJob(const GURL& pattern, ServiceWorkerRegisterJobBase* job); 51 void FinishJob(const GURL& pattern, ServiceWorkerRegisterJobBase* job);
47 52
48 private: 53 private:
49 class JobQueue { 54 class JobQueue {
50 public: 55 public:
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 // job coordinator, the core owns the coordinator. 93 // job coordinator, the core owns the coordinator.
89 base::WeakPtr<ServiceWorkerContextCore> context_; 94 base::WeakPtr<ServiceWorkerContextCore> context_;
90 RegistrationJobMap job_queues_; 95 RegistrationJobMap job_queues_;
91 96
92 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerJobCoordinator); 97 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerJobCoordinator);
93 }; 98 };
94 99
95 } // namespace content 100 } // namespace content
96 101
97 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_JOB_COORDINATOR_H_ 102 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_JOB_COORDINATOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698