| 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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 void StoreRegistration( | 97 void StoreRegistration( |
| 98 ServiceWorkerRegistration* registration, | 98 ServiceWorkerRegistration* registration, |
| 99 ServiceWorkerVersion* version, | 99 ServiceWorkerVersion* version, |
| 100 const StatusCallback& callback); | 100 const StatusCallback& callback); |
| 101 | 101 |
| 102 // Updates the state of the registration's stored version to active. | 102 // Updates the state of the registration's stored version to active. |
| 103 void UpdateToActiveState( | 103 void UpdateToActiveState( |
| 104 ServiceWorkerRegistration* registration, | 104 ServiceWorkerRegistration* registration, |
| 105 const StatusCallback& callback); | 105 const StatusCallback& callback); |
| 106 | 106 |
| 107 // Updates the stored time to match the value of |
| 108 // registration->last_update_check(). |
| 109 void UpdateLastUpdateCheckTime(ServiceWorkerRegistration* registration); |
| 110 |
| 107 // Deletes the registration data for |registration_id|. If the registration's | 111 // Deletes the registration data for |registration_id|. If the registration's |
| 108 // version is live, its script resources will remain available. | 112 // version is live, its script resources will remain available. |
| 109 // PurgeResources should be called when it's OK to delete them. | 113 // PurgeResources should be called when it's OK to delete them. |
| 110 void DeleteRegistration(int64 registration_id, | 114 void DeleteRegistration(int64 registration_id, |
| 111 const GURL& origin, | 115 const GURL& origin, |
| 112 const StatusCallback& callback); | 116 const StatusCallback& callback); |
| 113 | 117 |
| 114 scoped_ptr<ServiceWorkerResponseReader> CreateResponseReader( | 118 scoped_ptr<ServiceWorkerResponseReader> CreateResponseReader( |
| 115 int64 response_id); | 119 int64 response_id); |
| 116 scoped_ptr<ServiceWorkerResponseWriter> CreateResponseWriter( | 120 scoped_ptr<ServiceWorkerResponseWriter> CreateResponseWriter( |
| (...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 372 std::set<int64> pending_deletions_; | 376 std::set<int64> pending_deletions_; |
| 373 | 377 |
| 374 base::WeakPtrFactory<ServiceWorkerStorage> weak_factory_; | 378 base::WeakPtrFactory<ServiceWorkerStorage> weak_factory_; |
| 375 | 379 |
| 376 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerStorage); | 380 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerStorage); |
| 377 }; | 381 }; |
| 378 | 382 |
| 379 } // namespace content | 383 } // namespace content |
| 380 | 384 |
| 381 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_STORAGE_H_ | 385 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_STORAGE_H_ |
| OLD | NEW |