OLD | NEW |
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_UNREGISTER_JOB_H_ | 5 #ifndef CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_UNREGISTER_JOB_H_ |
6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_UNREGISTER_JOB_H_ | 6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_UNREGISTER_JOB_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <vector> | 10 #include <vector> |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 | 44 |
45 // ServiceWorkerRegisterJobBase implementation: | 45 // ServiceWorkerRegisterJobBase implementation: |
46 void Start() override; | 46 void Start() override; |
47 void Abort() override; | 47 void Abort() override; |
48 bool Equals(ServiceWorkerRegisterJobBase* job) const override; | 48 bool Equals(ServiceWorkerRegisterJobBase* job) const override; |
49 RegistrationJobType GetType() const override; | 49 RegistrationJobType GetType() const override; |
50 | 50 |
51 private: | 51 private: |
52 void OnRegistrationFound( | 52 void OnRegistrationFound( |
53 ServiceWorkerStatusCode status, | 53 ServiceWorkerStatusCode status, |
54 const scoped_refptr<ServiceWorkerRegistration>& registration); | 54 scoped_refptr<ServiceWorkerRegistration> registration); |
55 void Complete(int64_t registration_id, ServiceWorkerStatusCode status); | 55 void Complete(int64_t registration_id, ServiceWorkerStatusCode status); |
56 void CompleteInternal(int64_t registration_id, | 56 void CompleteInternal(int64_t registration_id, |
57 ServiceWorkerStatusCode status); | 57 ServiceWorkerStatusCode status); |
58 void ResolvePromise(int64_t registration_id, ServiceWorkerStatusCode status); | 58 void ResolvePromise(int64_t registration_id, ServiceWorkerStatusCode status); |
59 | 59 |
60 base::WeakPtr<ServiceWorkerContextCore> context_; | 60 base::WeakPtr<ServiceWorkerContextCore> context_; |
61 const GURL pattern_; | 61 const GURL pattern_; |
62 std::vector<UnregistrationCallback> callbacks_; | 62 std::vector<UnregistrationCallback> callbacks_; |
63 bool is_promise_resolved_; | 63 bool is_promise_resolved_; |
64 base::WeakPtrFactory<ServiceWorkerUnregisterJob> weak_factory_; | 64 base::WeakPtrFactory<ServiceWorkerUnregisterJob> weak_factory_; |
65 | 65 |
66 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerUnregisterJob); | 66 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerUnregisterJob); |
67 }; | 67 }; |
68 } // namespace content | 68 } // namespace content |
69 | 69 |
70 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_UNREGISTER_JOB_H_ | 70 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_UNREGISTER_JOB_H_ |
OLD | NEW |