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_STORAGE_H_ | 5 #ifndef CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_STORAGE_H_ |
6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_STORAGE_H_ | 6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_STORAGE_H_ |
7 | 7 |
8 #include <deque> | 8 #include <deque> |
9 #include <map> | 9 #include <map> |
10 #include <set> | 10 #include <set> |
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
287 const base::FilePath& path, | 287 const base::FilePath& path, |
288 base::WeakPtr<ServiceWorkerContextCore> context, | 288 base::WeakPtr<ServiceWorkerContextCore> context, |
289 scoped_ptr<ServiceWorkerDatabaseTaskManager> database_task_manager, | 289 scoped_ptr<ServiceWorkerDatabaseTaskManager> database_task_manager, |
290 const scoped_refptr<base::SingleThreadTaskRunner>& disk_cache_thread, | 290 const scoped_refptr<base::SingleThreadTaskRunner>& disk_cache_thread, |
291 storage::QuotaManagerProxy* quota_manager_proxy, | 291 storage::QuotaManagerProxy* quota_manager_proxy, |
292 storage::SpecialStoragePolicy* special_storage_policy); | 292 storage::SpecialStoragePolicy* special_storage_policy); |
293 | 293 |
294 base::FilePath GetDatabasePath(); | 294 base::FilePath GetDatabasePath(); |
295 base::FilePath GetDiskCachePath(); | 295 base::FilePath GetDiskCachePath(); |
296 | 296 |
| 297 // Loads the registration data from backend storage. This must be called |
| 298 // before any method that requires registration data. |
297 bool LazyInitialize( | 299 bool LazyInitialize( |
298 const base::Closure& callback); | 300 const base::Closure& callback); |
299 void DidReadInitialData( | 301 void DidReadInitialData( |
300 InitialData* data, | 302 InitialData* data, |
301 ServiceWorkerDatabase::Status status); | 303 ServiceWorkerDatabase::Status status); |
302 void DidFindRegistrationForDocument( | 304 void DidFindRegistrationForDocument( |
303 const GURL& document_url, | 305 const GURL& document_url, |
304 const FindRegistrationCallback& callback, | 306 const FindRegistrationCallback& callback, |
305 int64 callback_id, | 307 int64 callback_id, |
306 const ServiceWorkerDatabase::RegistrationData& data, | 308 const ServiceWorkerDatabase::RegistrationData& data, |
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
490 std::set<int64> pending_deletions_; | 492 std::set<int64> pending_deletions_; |
491 | 493 |
492 base::WeakPtrFactory<ServiceWorkerStorage> weak_factory_; | 494 base::WeakPtrFactory<ServiceWorkerStorage> weak_factory_; |
493 | 495 |
494 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerStorage); | 496 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerStorage); |
495 }; | 497 }; |
496 | 498 |
497 } // namespace content | 499 } // namespace content |
498 | 500 |
499 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_STORAGE_H_ | 501 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_STORAGE_H_ |
OLD | NEW |