| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_APPCACHE_APPCACHE_STORAGE_H_ | 5 #ifndef CONTENT_BROWSER_APPCACHE_APPCACHE_STORAGE_H_ |
| 6 #define CONTENT_BROWSER_APPCACHE_APPCACHE_STORAGE_H_ | 6 #define CONTENT_BROWSER_APPCACHE_APPCACHE_STORAGE_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| (...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 187 // persistently such that the responses will be deleted upon restart | 187 // persistently such that the responses will be deleted upon restart |
| 188 // if they aren't deleted prior to shutdown. | 188 // if they aren't deleted prior to shutdown. |
| 189 virtual void DoomResponses(const GURL& manifest_url, | 189 virtual void DoomResponses(const GURL& manifest_url, |
| 190 const std::vector<int64_t>& response_ids) = 0; | 190 const std::vector<int64_t>& response_ids) = 0; |
| 191 | 191 |
| 192 // Schedules the lazy deletion of responses without persistently saving | 192 // Schedules the lazy deletion of responses without persistently saving |
| 193 // the response ids. | 193 // the response ids. |
| 194 virtual void DeleteResponses(const GURL& manifest_url, | 194 virtual void DeleteResponses(const GURL& manifest_url, |
| 195 const std::vector<int64_t>& response_ids) = 0; | 195 const std::vector<int64_t>& response_ids) = 0; |
| 196 | 196 |
| 197 // Returns true if the AppCacheStorage instance is initialized. |
| 198 virtual bool IsInitialized() = 0; |
| 199 |
| 197 // Generates unique storage ids for different object types. | 200 // Generates unique storage ids for different object types. |
| 198 int64_t NewCacheId() { return ++last_cache_id_; } | 201 int64_t NewCacheId() { return ++last_cache_id_; } |
| 199 int64_t NewGroupId() { return ++last_group_id_; } | 202 int64_t NewGroupId() { return ++last_group_id_; } |
| 200 | 203 |
| 201 // The working set of object instances currently in memory. | 204 // The working set of object instances currently in memory. |
| 202 AppCacheWorkingSet* working_set() { return &working_set_; } | 205 AppCacheWorkingSet* working_set() { return &working_set_; } |
| 203 | 206 |
| 204 // A map of origins to usage. | 207 // A map of origins to usage. |
| 205 const UsageMap* usage_map() { return &usage_map_; } | 208 const UsageMap* usage_map() { return &usage_map_; } |
| 206 | 209 |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 325 | 328 |
| 326 FRIEND_TEST_ALL_PREFIXES(content::AppCacheStorageTest, DelegateReferences); | 329 FRIEND_TEST_ALL_PREFIXES(content::AppCacheStorageTest, DelegateReferences); |
| 327 FRIEND_TEST_ALL_PREFIXES(content::AppCacheStorageTest, UsageMap); | 330 FRIEND_TEST_ALL_PREFIXES(content::AppCacheStorageTest, UsageMap); |
| 328 | 331 |
| 329 DISALLOW_COPY_AND_ASSIGN(AppCacheStorage); | 332 DISALLOW_COPY_AND_ASSIGN(AppCacheStorage); |
| 330 }; | 333 }; |
| 331 | 334 |
| 332 } // namespace content | 335 } // namespace content |
| 333 | 336 |
| 334 #endif // CONTENT_BROWSER_APPCACHE_APPCACHE_STORAGE_H_ | 337 #endif // CONTENT_BROWSER_APPCACHE_APPCACHE_STORAGE_H_ |
| OLD | NEW |