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

Side by Side Diff: content/browser/service_worker/service_worker_register_job.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_REGISTER_JOB_H_ 5 #ifndef CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_REGISTER_JOB_H_
6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_REGISTER_JOB_H_ 6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_REGISTER_JOB_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/memory/weak_ptr.h" 10 #include "base/memory/weak_ptr.h"
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 48
49 // For update jobs. 49 // For update jobs.
50 CONTENT_EXPORT ServiceWorkerRegisterJob( 50 CONTENT_EXPORT ServiceWorkerRegisterJob(
51 base::WeakPtr<ServiceWorkerContextCore> context, 51 base::WeakPtr<ServiceWorkerContextCore> context,
52 ServiceWorkerRegistration* registration, 52 ServiceWorkerRegistration* registration,
53 bool force_bypass_cache); 53 bool force_bypass_cache);
54 ~ServiceWorkerRegisterJob() override; 54 ~ServiceWorkerRegisterJob() override;
55 55
56 // Registers a callback to be called when the promise would resolve (whether 56 // Registers a callback to be called when the promise would resolve (whether
57 // successfully or not). Multiple callbacks may be registered. 57 // successfully or not). Multiple callbacks may be registered.
58 // If |provider_host| is not NULL, its process will be regarded as a candidate 58 // If |provider_host| is not NULL, its process will be regarded as a
59 // process to run the worker. 59 // candidate process to run the worker.
nhiroki 2015/07/31 06:49:11 nit: This change looks not necessary.
jungkees 2015/07/31 07:09:58 Yes, right. This was changed when I tried to make
60 void AddCallback(const RegistrationCallback& callback, 60 void AddCallback(const RegistrationCallback& callback,
61 ServiceWorkerProviderHost* provider_host); 61 ServiceWorkerProviderHost* provider_host);
62 62
63 // ServiceWorkerRegisterJobBase implementation: 63 // ServiceWorkerRegisterJobBase implementation:
64 void Start() override; 64 void Start() override;
65 void Abort() override; 65 void Abort() override;
66 bool Equals(ServiceWorkerRegisterJobBase* job) const override; 66 bool Equals(ServiceWorkerRegisterJobBase* job) const override;
67 RegistrationJobType GetType() const override; 67 RegistrationJobType GetType() const override;
68 68
69 void DoomInstallingWorker(); 69 void DoomInstallingWorker();
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 std::string promise_resolved_status_message_; 154 std::string promise_resolved_status_message_;
155 scoped_refptr<ServiceWorkerRegistration> promise_resolved_registration_; 155 scoped_refptr<ServiceWorkerRegistration> promise_resolved_registration_;
156 base::WeakPtrFactory<ServiceWorkerRegisterJob> weak_factory_; 156 base::WeakPtrFactory<ServiceWorkerRegisterJob> weak_factory_;
157 157
158 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerRegisterJob); 158 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerRegisterJob);
159 }; 159 };
160 160
161 } // namespace content 161 } // namespace content
162 162
163 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_REGISTER_JOB_H_ 163 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_REGISTER_JOB_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698