Chromium Code Reviews| 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 <map> | 8 #include <map> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 144 // will be marked. There is no delegate completion callback. | 144 // will be marked. There is no delegate completion callback. |
| 145 virtual void MarkEntryAsForeign(const GURL& entry_url, int64 cache_id) = 0; | 145 virtual void MarkEntryAsForeign(const GURL& entry_url, int64 cache_id) = 0; |
| 146 | 146 |
| 147 // Schedules a task to update persistent storage and doom the group and all | 147 // Schedules a task to update persistent storage and doom the group and all |
| 148 // related caches and responses for deletion. Upon completion the in-memory | 148 // related caches and responses for deletion. Upon completion the in-memory |
| 149 // instance is marked as obsolete and the delegate callback is called. | 149 // instance is marked as obsolete and the delegate callback is called. |
| 150 virtual void MakeGroupObsolete(AppCacheGroup* group, | 150 virtual void MakeGroupObsolete(AppCacheGroup* group, |
| 151 Delegate* delegate, | 151 Delegate* delegate, |
| 152 int response_code) = 0; | 152 int response_code) = 0; |
| 153 | 153 |
| 154 // Schedules a task to update persistent storage with the times of the first | |
| 155 // evictable error and last successful full update check. | |
| 156 virtual void StoreEvictionTimes(AppCacheGroup* group) {} | |
|
palmer
2015/06/01 21:09:02
Nit: = 0 seems to be the idiom in this file. Proba
michaeln
2015/06/19 21:38:19
Done.
| |
| 157 | |
| 154 // Cancels all pending callbacks for the delegate. The delegate callbacks | 158 // Cancels all pending callbacks for the delegate. The delegate callbacks |
| 155 // will not be invoked after, however any scheduled operations will still | 159 // will not be invoked after, however any scheduled operations will still |
| 156 // take place. The callbacks for subsequently scheduled operations are | 160 // take place. The callbacks for subsequently scheduled operations are |
| 157 // unaffected. | 161 // unaffected. |
| 158 void CancelDelegateCallbacks(Delegate* delegate) { | 162 void CancelDelegateCallbacks(Delegate* delegate) { |
| 159 DelegateReference* delegate_reference = GetDelegateReference(delegate); | 163 DelegateReference* delegate_reference = GetDelegateReference(delegate); |
| 160 if (delegate_reference) | 164 if (delegate_reference) |
| 161 delegate_reference->CancelReference(); | 165 delegate_reference->CancelReference(); |
| 162 } | 166 } |
| 163 | 167 |
| (...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 324 | 328 |
| 325 FRIEND_TEST_ALL_PREFIXES(content::AppCacheStorageTest, DelegateReferences); | 329 FRIEND_TEST_ALL_PREFIXES(content::AppCacheStorageTest, DelegateReferences); |
| 326 FRIEND_TEST_ALL_PREFIXES(content::AppCacheStorageTest, UsageMap); | 330 FRIEND_TEST_ALL_PREFIXES(content::AppCacheStorageTest, UsageMap); |
| 327 | 331 |
| 328 DISALLOW_COPY_AND_ASSIGN(AppCacheStorage); | 332 DISALLOW_COPY_AND_ASSIGN(AppCacheStorage); |
| 329 }; | 333 }; |
| 330 | 334 |
| 331 } // namespace content | 335 } // namespace content |
| 332 | 336 |
| 333 #endif // CONTENT_BROWSER_APPCACHE_APPCACHE_STORAGE_H_ | 337 #endif // CONTENT_BROWSER_APPCACHE_APPCACHE_STORAGE_H_ |
| OLD | NEW |