| OLD | NEW |
| 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_CONTEXT_WRAPPER_H_ | 5 #ifndef CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_WRAPPER_H_ |
| 6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_WRAPPER_H_ | 6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_WRAPPER_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 205 const base::FilePath& user_data_directory, | 205 const base::FilePath& user_data_directory, |
| 206 std::unique_ptr<ServiceWorkerDatabaseTaskManager> database_task_manager, | 206 std::unique_ptr<ServiceWorkerDatabaseTaskManager> database_task_manager, |
| 207 const scoped_refptr<base::SingleThreadTaskRunner>& disk_cache_thread, | 207 const scoped_refptr<base::SingleThreadTaskRunner>& disk_cache_thread, |
| 208 storage::QuotaManagerProxy* quota_manager_proxy, | 208 storage::QuotaManagerProxy* quota_manager_proxy, |
| 209 storage::SpecialStoragePolicy* special_storage_policy); | 209 storage::SpecialStoragePolicy* special_storage_policy); |
| 210 void ShutdownOnIO(); | 210 void ShutdownOnIO(); |
| 211 | 211 |
| 212 void DidFindRegistrationForFindReady( | 212 void DidFindRegistrationForFindReady( |
| 213 const FindRegistrationCallback& callback, | 213 const FindRegistrationCallback& callback, |
| 214 ServiceWorkerStatusCode status, | 214 ServiceWorkerStatusCode status, |
| 215 scoped_refptr<ServiceWorkerRegistration> registration); | 215 const scoped_refptr<ServiceWorkerRegistration>& registration); |
| 216 void OnStatusChangedForFindReadyRegistration( | 216 void OnStatusChangedForFindReadyRegistration( |
| 217 const FindRegistrationCallback& callback, | 217 const FindRegistrationCallback& callback, |
| 218 scoped_refptr<ServiceWorkerRegistration> registration); | 218 const scoped_refptr<ServiceWorkerRegistration>& registration); |
| 219 | 219 |
| 220 void DidDeleteAndStartOver(ServiceWorkerStatusCode status); | 220 void DidDeleteAndStartOver(ServiceWorkerStatusCode status); |
| 221 | 221 |
| 222 void DidGetAllRegistrationsForGetAllOrigins( | 222 void DidGetAllRegistrationsForGetAllOrigins( |
| 223 const GetUsageInfoCallback& callback, | 223 const GetUsageInfoCallback& callback, |
| 224 ServiceWorkerStatusCode status, | 224 ServiceWorkerStatusCode status, |
| 225 const std::vector<ServiceWorkerRegistrationInfo>& registrations); | 225 const std::vector<ServiceWorkerRegistrationInfo>& registrations); |
| 226 | 226 |
| 227 void DidCheckHasServiceWorker(const CheckHasServiceWorkerCallback& callback, | 227 void DidCheckHasServiceWorker(const CheckHasServiceWorkerCallback& callback, |
| 228 bool has_service_worker); | 228 bool has_service_worker); |
| 229 | 229 |
| 230 void DidFindRegistrationForUpdate( | 230 void DidFindRegistrationForUpdate( |
| 231 ServiceWorkerStatusCode status, | 231 ServiceWorkerStatusCode status, |
| 232 scoped_refptr<content::ServiceWorkerRegistration> registration); | 232 const scoped_refptr<content::ServiceWorkerRegistration>& registration); |
| 233 | 233 |
| 234 // The core context is only for use on the IO thread. | 234 // The core context is only for use on the IO thread. |
| 235 // Can be null before/during init, during/after shutdown, and after | 235 // Can be null before/during init, during/after shutdown, and after |
| 236 // DeleteAndStartOver fails. | 236 // DeleteAndStartOver fails. |
| 237 ServiceWorkerContextCore* context(); | 237 ServiceWorkerContextCore* context(); |
| 238 | 238 |
| 239 const scoped_refptr<base::ObserverListThreadSafe< | 239 const scoped_refptr<base::ObserverListThreadSafe< |
| 240 ServiceWorkerContextObserver>> observer_list_; | 240 ServiceWorkerContextObserver>> observer_list_; |
| 241 const std::unique_ptr<ServiceWorkerProcessManager> process_manager_; | 241 const std::unique_ptr<ServiceWorkerProcessManager> process_manager_; |
| 242 // Cleared in ShutdownOnIO(): | 242 // Cleared in ShutdownOnIO(): |
| 243 std::unique_ptr<ServiceWorkerContextCore> context_core_; | 243 std::unique_ptr<ServiceWorkerContextCore> context_core_; |
| 244 | 244 |
| 245 // Initialized in Init(); true if the user data directory is empty. | 245 // Initialized in Init(); true if the user data directory is empty. |
| 246 bool is_incognito_; | 246 bool is_incognito_; |
| 247 | 247 |
| 248 // Raw pointer to the StoragePartitionImpl owning |this|. | 248 // Raw pointer to the StoragePartitionImpl owning |this|. |
| 249 StoragePartitionImpl* storage_partition_; | 249 StoragePartitionImpl* storage_partition_; |
| 250 | 250 |
| 251 // The ResourceContext associated with this context. | 251 // The ResourceContext associated with this context. |
| 252 ResourceContext* resource_context_; | 252 ResourceContext* resource_context_; |
| 253 | 253 |
| 254 scoped_refptr<net::URLRequestContextGetter> request_context_getter_; | 254 scoped_refptr<net::URLRequestContextGetter> request_context_getter_; |
| 255 | 255 |
| 256 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerContextWrapper); | 256 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerContextWrapper); |
| 257 }; | 257 }; |
| 258 | 258 |
| 259 } // namespace content | 259 } // namespace content |
| 260 | 260 |
| 261 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_WRAPPER_H_ | 261 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_WRAPPER_H_ |
| OLD | NEW |