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 <map> | 8 #include <map> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 // script resources for the registration's stored version | 86 // script resources for the registration's stored version |
87 // will remain available until either a browser restart or | 87 // will remain available until either a browser restart or |
88 // DeleteVersionResources is called. | 88 // DeleteVersionResources is called. |
89 void DeleteRegistration(int64 registration_id, | 89 void DeleteRegistration(int64 registration_id, |
90 const StatusCallback& callback); | 90 const StatusCallback& callback); |
91 | 91 |
92 // Returns new IDs which are guaranteed to be unique in the storage. | 92 // Returns new IDs which are guaranteed to be unique in the storage. |
93 int64 NewRegistrationId(); | 93 int64 NewRegistrationId(); |
94 int64 NewVersionId(); | 94 int64 NewVersionId(); |
95 int64 NewResourceId(); | 95 int64 NewResourceId(); |
| 96 const base::FilePath& path() { return path_; } |
96 | 97 |
97 // Intended for use only by ServiceWorkerRegisterJob. | 98 // Intended for use only by ServiceWorkerRegisterJob. |
98 void NotifyInstallingRegistration( | 99 void NotifyInstallingRegistration( |
99 ServiceWorkerRegistration* registration); | 100 ServiceWorkerRegistration* registration); |
100 void NotifyDoneInstallingRegistration( | 101 void NotifyDoneInstallingRegistration( |
101 ServiceWorkerRegistration* registration); | 102 ServiceWorkerRegistration* registration); |
102 | 103 |
103 private: | 104 private: |
104 friend class ServiceWorkerStorageTest; | 105 friend class ServiceWorkerStorageTest; |
105 | 106 |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
138 base::FilePath path_; | 139 base::FilePath path_; |
139 base::WeakPtr<ServiceWorkerContextCore> context_; | 140 base::WeakPtr<ServiceWorkerContextCore> context_; |
140 scoped_refptr<quota::QuotaManagerProxy> quota_manager_proxy_; | 141 scoped_refptr<quota::QuotaManagerProxy> quota_manager_proxy_; |
141 | 142 |
142 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerStorage); | 143 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerStorage); |
143 }; | 144 }; |
144 | 145 |
145 } // namespace content | 146 } // namespace content |
146 | 147 |
147 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_STORAGE_H_ | 148 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_STORAGE_H_ |
OLD | NEW |