Chromium Code Reviews| 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 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 247 ServiceWorkerRegistration* FindInstallingRegistrationForId( | 247 ServiceWorkerRegistration* FindInstallingRegistrationForId( |
| 248 int64 registration_id); | 248 int64 registration_id); |
| 249 | 249 |
| 250 // Lazy disk_cache getter. | 250 // Lazy disk_cache getter. |
| 251 ServiceWorkerDiskCache* disk_cache(); | 251 ServiceWorkerDiskCache* disk_cache(); |
| 252 void OnDiskCacheInitialized(int rv); | 252 void OnDiskCacheInitialized(int rv); |
| 253 | 253 |
| 254 // ServiceWorkerVersion::Listener override | 254 // ServiceWorkerVersion::Listener override |
| 255 virtual void OnNoControllees(ServiceWorkerVersion* version) OVERRIDE; | 255 virtual void OnNoControllees(ServiceWorkerVersion* version) OVERRIDE; |
| 256 | 256 |
| 257 void SchedulePurgeResources(int64 version_id, | 257 // Sets the version to redundant and purges its resources. If the version |
| 258 const std::vector<int64>& resources); | 258 // is controlling a page, defers until the version no longer controls a page. |
| 259 void DecommissionVersion(int64 version_id, | |
|
falken
2014/07/09 08:47:13
suggestions on this naming are welcome. My other t
| |
| 260 const std::vector<int64>& resources); | |
| 261 | |
| 259 void StartPurgingResources(const std::vector<int64>& ids); | 262 void StartPurgingResources(const std::vector<int64>& ids); |
| 260 void StartPurgingResources(const ResourceList& resources); | 263 void StartPurgingResources(const ResourceList& resources); |
| 261 void ContinuePurgingResources(); | 264 void ContinuePurgingResources(); |
| 262 void PurgeResource(int64 id); | 265 void PurgeResource(int64 id); |
| 263 void OnResourcePurged(int64 id, int rv); | 266 void OnResourcePurged(int64 id, int rv); |
| 264 | 267 |
| 265 // Static cross-thread helpers. | 268 // Static cross-thread helpers. |
| 266 static void ReadInitialDataFromDB( | 269 static void ReadInitialDataFromDB( |
| 267 ServiceWorkerDatabase* database, | 270 ServiceWorkerDatabase* database, |
| 268 scoped_refptr<base::SequencedTaskRunner> original_task_runner, | 271 scoped_refptr<base::SequencedTaskRunner> original_task_runner, |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 340 std::map<int64, std::vector<int64> > deleted_version_resource_ids_; | 343 std::map<int64, std::vector<int64> > deleted_version_resource_ids_; |
| 341 | 344 |
| 342 base::WeakPtrFactory<ServiceWorkerStorage> weak_factory_; | 345 base::WeakPtrFactory<ServiceWorkerStorage> weak_factory_; |
| 343 | 346 |
| 344 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerStorage); | 347 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerStorage); |
| 345 }; | 348 }; |
| 346 | 349 |
| 347 } // namespace content | 350 } // namespace content |
| 348 | 351 |
| 349 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_STORAGE_H_ | 352 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_STORAGE_H_ |
| OLD | NEW |