OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_CONTEXT_WATCHER_H_ | 5 #ifndef CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_WATCHER_H_ |
6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_WATCHER_H_ | 6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_WATCHER_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <vector> | 10 #include <vector> |
(...skipping 29 matching lines...) Expand all Loading... |
40 const WorkerErrorReportedCallback& error_callback); | 40 const WorkerErrorReportedCallback& error_callback); |
41 void Start(); | 41 void Start(); |
42 void Stop(); | 42 void Stop(); |
43 | 43 |
44 private: | 44 private: |
45 friend class base::RefCountedThreadSafe<ServiceWorkerContextWatcher>; | 45 friend class base::RefCountedThreadSafe<ServiceWorkerContextWatcher>; |
46 ~ServiceWorkerContextWatcher() override; | 46 ~ServiceWorkerContextWatcher() override; |
47 | 47 |
48 void GetStoredRegistrationsOnIOThread(); | 48 void GetStoredRegistrationsOnIOThread(); |
49 void OnStoredRegistrationsOnIOThread( | 49 void OnStoredRegistrationsOnIOThread( |
| 50 ServiceWorkerStatusCode status, |
50 const std::vector<ServiceWorkerRegistrationInfo>& stored_registrations); | 51 const std::vector<ServiceWorkerRegistrationInfo>& stored_registrations); |
51 void StopOnIOThread(); | 52 void StopOnIOThread(); |
52 | 53 |
53 void StoreRegistrationInfo( | 54 void StoreRegistrationInfo( |
54 const ServiceWorkerRegistrationInfo& registration, | 55 const ServiceWorkerRegistrationInfo& registration, |
55 base::ScopedPtrHashMap<int64_t, | 56 base::ScopedPtrHashMap<int64_t, |
56 scoped_ptr<ServiceWorkerRegistrationInfo>>* | 57 scoped_ptr<ServiceWorkerRegistrationInfo>>* |
57 info_map); | 58 info_map); |
58 void StoreVersionInfo(const ServiceWorkerVersionInfo& version); | 59 void StoreVersionInfo(const ServiceWorkerVersionInfo& version); |
59 | 60 |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 version_info_map_; | 106 version_info_map_; |
106 scoped_refptr<ServiceWorkerContextWrapper> context_; | 107 scoped_refptr<ServiceWorkerContextWrapper> context_; |
107 WorkerRegistrationUpdatedCallback registration_callback_; | 108 WorkerRegistrationUpdatedCallback registration_callback_; |
108 WorkerVersionUpdatedCallback version_callback_; | 109 WorkerVersionUpdatedCallback version_callback_; |
109 WorkerErrorReportedCallback error_callback_; | 110 WorkerErrorReportedCallback error_callback_; |
110 }; | 111 }; |
111 | 112 |
112 } // namespace content | 113 } // namespace content |
113 | 114 |
114 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_WATCHER_H_ | 115 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_WATCHER_H_ |
OLD | NEW |