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 CONTENT_BROWSER_APPCACHE_APPCACHE_STORAGE_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_APPCACHE_APPCACHE_STORAGE_IMPL_H_ |
6 #define CONTENT_BROWSER_APPCACHE_APPCACHE_STORAGE_IMPL_H_ | 6 #define CONTENT_BROWSER_APPCACHE_APPCACHE_STORAGE_IMPL_H_ |
7 | 7 |
8 #include <deque> | 8 #include <deque> |
9 #include <map> | 9 #include <map> |
10 #include <set> | 10 #include <set> |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 Delegate* delegate) override; | 53 Delegate* delegate) override; |
54 void FindResponseForSubRequest(AppCache* cache, | 54 void FindResponseForSubRequest(AppCache* cache, |
55 const GURL& url, | 55 const GURL& url, |
56 AppCacheEntry* found_entry, | 56 AppCacheEntry* found_entry, |
57 AppCacheEntry* found_fallback_entry, | 57 AppCacheEntry* found_fallback_entry, |
58 bool* found_network_namespace) override; | 58 bool* found_network_namespace) override; |
59 void MarkEntryAsForeign(const GURL& entry_url, int64 cache_id) override; | 59 void MarkEntryAsForeign(const GURL& entry_url, int64 cache_id) override; |
60 void MakeGroupObsolete(AppCacheGroup* group, | 60 void MakeGroupObsolete(AppCacheGroup* group, |
61 Delegate* delegate, | 61 Delegate* delegate, |
62 int response_code) override; | 62 int response_code) override; |
| 63 void StoreEvictionTimes(AppCacheGroup* group) override; |
63 AppCacheResponseReader* CreateResponseReader(const GURL& manifest_url, | 64 AppCacheResponseReader* CreateResponseReader(const GURL& manifest_url, |
64 int64 group_id, | 65 int64 group_id, |
65 int64 response_id) override; | 66 int64 response_id) override; |
66 AppCacheResponseWriter* CreateResponseWriter(const GURL& manifest_url, | 67 AppCacheResponseWriter* CreateResponseWriter(const GURL& manifest_url, |
67 int64 group_id) override; | 68 int64 group_id) override; |
68 AppCacheResponseMetadataWriter* CreateResponseMetadataWriter( | 69 AppCacheResponseMetadataWriter* CreateResponseMetadataWriter( |
69 int64 group_id, | 70 int64 group_id, |
70 int64 response_id) override; | 71 int64 response_id) override; |
71 void DoomResponses(const GURL& manifest_url, | 72 void DoomResponses(const GURL& manifest_url, |
72 const std::vector<int64>& response_ids) override; | 73 const std::vector<int64>& response_ids) override; |
(...skipping 13 matching lines...) Expand all Loading... |
86 class GroupLoadTask; | 87 class GroupLoadTask; |
87 class StoreGroupAndCacheTask; | 88 class StoreGroupAndCacheTask; |
88 class FindMainResponseTask; | 89 class FindMainResponseTask; |
89 class MarkEntryAsForeignTask; | 90 class MarkEntryAsForeignTask; |
90 class MakeGroupObsoleteTask; | 91 class MakeGroupObsoleteTask; |
91 class GetDeletableResponseIdsTask; | 92 class GetDeletableResponseIdsTask; |
92 class InsertDeletableResponseIdsTask; | 93 class InsertDeletableResponseIdsTask; |
93 class DeleteDeletableResponseIdsTask; | 94 class DeleteDeletableResponseIdsTask; |
94 class LazyUpdateLastAccessTimeTask; | 95 class LazyUpdateLastAccessTimeTask; |
95 class CommitLastAccessTimesTask; | 96 class CommitLastAccessTimesTask; |
| 97 class UpdateEvictionTimesTask; |
96 | 98 |
97 typedef std::deque<DatabaseTask*> DatabaseTaskQueue; | 99 typedef std::deque<DatabaseTask*> DatabaseTaskQueue; |
98 typedef std::map<int64, CacheLoadTask*> PendingCacheLoads; | 100 typedef std::map<int64, CacheLoadTask*> PendingCacheLoads; |
99 typedef std::map<GURL, GroupLoadTask*> PendingGroupLoads; | 101 typedef std::map<GURL, GroupLoadTask*> PendingGroupLoads; |
100 typedef std::deque<std::pair<GURL, int64> > PendingForeignMarkings; | 102 typedef std::deque<std::pair<GURL, int64> > PendingForeignMarkings; |
101 typedef std::set<StoreGroupAndCacheTask*> PendingQuotaQueries; | 103 typedef std::set<StoreGroupAndCacheTask*> PendingQuotaQueries; |
102 | 104 |
103 bool IsInitTaskComplete() { | 105 bool IsInitTaskComplete() { |
104 return last_cache_id_ != AppCacheStorage::kUnitializedId; | 106 return last_cache_id_ != AppCacheStorage::kUnitializedId; |
105 } | 107 } |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
181 std::deque<base::Closure> pending_simple_tasks_; | 183 std::deque<base::Closure> pending_simple_tasks_; |
182 base::WeakPtrFactory<AppCacheStorageImpl> weak_factory_; | 184 base::WeakPtrFactory<AppCacheStorageImpl> weak_factory_; |
183 | 185 |
184 friend class content::AppCacheStorageImplTest; | 186 friend class content::AppCacheStorageImplTest; |
185 friend class content::ChromeAppCacheServiceTest; | 187 friend class content::ChromeAppCacheServiceTest; |
186 }; | 188 }; |
187 | 189 |
188 } // namespace content | 190 } // namespace content |
189 | 191 |
190 #endif // CONTENT_BROWSER_APPCACHE_APPCACHE_STORAGE_IMPL_H_ | 192 #endif // CONTENT_BROWSER_APPCACHE_APPCACHE_STORAGE_IMPL_H_ |
OLD | NEW |