OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 WEBKIT_APPCACHE_APPCACHE_STORAGE_H_ | 5 #ifndef WEBKIT_APPCACHE_APPCACHE_STORAGE_H_ |
6 #define WEBKIT_APPCACHE_APPCACHE_STORAGE_H_ | 6 #define WEBKIT_APPCACHE_APPCACHE_STORAGE_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 // old caches and responses from persistent storage (although they may still | 107 // old caches and responses from persistent storage (although they may still |
108 // linger in the in-memory working set until no longer needed). The new | 108 // linger in the in-memory working set until no longer needed). The new |
109 // cache will be added as the group's newest complete cache only if storage | 109 // cache will be added as the group's newest complete cache only if storage |
110 // succeeds. | 110 // succeeds. |
111 virtual void StoreGroupAndNewestCache( | 111 virtual void StoreGroupAndNewestCache( |
112 AppCacheGroup* group, AppCache* newest_cache, Delegate* delegate) = 0; | 112 AppCacheGroup* group, AppCache* newest_cache, Delegate* delegate) = 0; |
113 | 113 |
114 // Schedules a query to identify a response for a main request. Upon | 114 // Schedules a query to identify a response for a main request. Upon |
115 // completion the delegate will be called back. | 115 // completion the delegate will be called back. |
116 virtual void FindResponseForMainRequest( | 116 virtual void FindResponseForMainRequest( |
117 const GURL& url, Delegate* delegate) = 0; | 117 const GURL& url, |
| 118 const GURL& preferred_manifest_url, |
| 119 Delegate* delegate) = 0; |
118 | 120 |
119 // Performs an immediate lookup of the in-memory cache to | 121 // Performs an immediate lookup of the in-memory cache to |
120 // identify a response for a sub resource request. | 122 // identify a response for a sub resource request. |
121 virtual void FindResponseForSubRequest( | 123 virtual void FindResponseForSubRequest( |
122 AppCache* cache, const GURL& url, | 124 AppCache* cache, const GURL& url, |
123 AppCacheEntry* found_entry, AppCacheEntry* found_fallback_entry, | 125 AppCacheEntry* found_entry, AppCacheEntry* found_fallback_entry, |
124 bool* found_network_namespace) = 0; | 126 bool* found_network_namespace) = 0; |
125 | 127 |
126 // Immediately updates in-memory storage, if the cache is in memory, | 128 // Immediately updates in-memory storage, if the cache is in memory, |
127 // and schedules a task to update persistent storage. If the cache is | 129 // and schedules a task to update persistent storage. If the cache is |
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
293 | 295 |
294 FRIEND_TEST_ALL_PREFIXES(AppCacheStorageTest, DelegateReferences); | 296 FRIEND_TEST_ALL_PREFIXES(AppCacheStorageTest, DelegateReferences); |
295 | 297 |
296 DISALLOW_COPY_AND_ASSIGN(AppCacheStorage); | 298 DISALLOW_COPY_AND_ASSIGN(AppCacheStorage); |
297 }; | 299 }; |
298 | 300 |
299 } // namespace appcache | 301 } // namespace appcache |
300 | 302 |
301 #endif // WEBKIT_APPCACHE_APPCACHE_STORAGE_H_ | 303 #endif // WEBKIT_APPCACHE_APPCACHE_STORAGE_H_ |
302 | 304 |
OLD | NEW |