OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_HOST_H_ | 5 #ifndef WEBKIT_APPCACHE_APPCACHE_HOST_H_ |
6 #define WEBKIT_APPCACHE_APPCACHE_HOST_H_ | 6 #define WEBKIT_APPCACHE_APPCACHE_HOST_H_ |
7 | 7 |
8 #include "base/callback.h" | 8 #include "base/callback.h" |
9 #include "base/gtest_prod_util.h" | 9 #include "base/gtest_prod_util.h" |
10 #include "base/observer_list.h" | 10 #include "base/observer_list.h" |
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
167 scoped_refptr<AppCache> swappable_cache_; | 167 scoped_refptr<AppCache> swappable_cache_; |
168 | 168 |
169 // Keep a reference to the group being updated until the update completes. | 169 // Keep a reference to the group being updated until the update completes. |
170 scoped_refptr<AppCacheGroup> group_being_updated_; | 170 scoped_refptr<AppCacheGroup> group_being_updated_; |
171 | 171 |
172 // Similarly, keep a reference to the newest cache of the group until the | 172 // Similarly, keep a reference to the newest cache of the group until the |
173 // update completes. When adding a new master entry to a cache that is not | 173 // update completes. When adding a new master entry to a cache that is not |
174 // in use in any other host, this reference keeps the cache in memory. | 174 // in use in any other host, this reference keeps the cache in memory. |
175 scoped_refptr<AppCache> newest_cache_of_group_being_updated_; | 175 scoped_refptr<AppCache> newest_cache_of_group_being_updated_; |
176 | 176 |
| 177 // We defend against multiple calls to SelectCache() which should not happen. |
| 178 bool was_select_cache_called_; |
| 179 |
177 // Keep a reference to the cache of the main resource so it survives frame | 180 // Keep a reference to the cache of the main resource so it survives frame |
178 // navigations. | 181 // navigations. |
179 scoped_refptr<AppCache> main_resource_cache_; | 182 scoped_refptr<AppCache> main_resource_cache_; |
180 int64 pending_main_resource_cache_id_; | 183 int64 pending_main_resource_cache_id_; |
181 | 184 |
182 // Cache loading is async, if we're loading a specific cache or group | 185 // Cache loading is async, if we're loading a specific cache or group |
183 // for the purposes of cache selection, one or the other of these will | 186 // for the purposes of cache selection, one or the other of these will |
184 // indicate which cache or group is being loaded. | 187 // indicate which cache or group is being loaded. |
185 int64 pending_selected_cache_id_; | 188 int64 pending_selected_cache_id_; |
186 GURL pending_selected_manifest_url_; | 189 GURL pending_selected_manifest_url_; |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
231 FRIEND_TEST_ALL_PREFIXES(AppCacheHostTest, SetSwappableCache); | 234 FRIEND_TEST_ALL_PREFIXES(AppCacheHostTest, SetSwappableCache); |
232 FRIEND_TEST_ALL_PREFIXES(AppCacheHostTest, ForDedicatedWorker); | 235 FRIEND_TEST_ALL_PREFIXES(AppCacheHostTest, ForDedicatedWorker); |
233 FRIEND_TEST_ALL_PREFIXES(AppCacheGroupTest, QueueUpdate); | 236 FRIEND_TEST_ALL_PREFIXES(AppCacheGroupTest, QueueUpdate); |
234 | 237 |
235 DISALLOW_COPY_AND_ASSIGN(AppCacheHost); | 238 DISALLOW_COPY_AND_ASSIGN(AppCacheHost); |
236 }; | 239 }; |
237 | 240 |
238 } // namespace appcache | 241 } // namespace appcache |
239 | 242 |
240 #endif // WEBKIT_APPCACHE_APPCACHE_HOST_H_ | 243 #endif // WEBKIT_APPCACHE_APPCACHE_HOST_H_ |
OLD | NEW |