| 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_HOST_H_ | 5 #ifndef CONTENT_BROWSER_APPCACHE_APPCACHE_HOST_H_ |
| 6 #define CONTENT_BROWSER_APPCACHE_APPCACHE_HOST_H_ | 6 #define CONTENT_BROWSER_APPCACHE_APPCACHE_HOST_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 26 matching lines...) Expand all Loading... |
| 37 FORWARD_DECLARE_TEST(AppCacheHostTest, SetSwappableCache); | 37 FORWARD_DECLARE_TEST(AppCacheHostTest, SetSwappableCache); |
| 38 FORWARD_DECLARE_TEST(AppCacheHostTest, ForDedicatedWorker); | 38 FORWARD_DECLARE_TEST(AppCacheHostTest, ForDedicatedWorker); |
| 39 FORWARD_DECLARE_TEST(AppCacheHostTest, SelectCacheAllowed); | 39 FORWARD_DECLARE_TEST(AppCacheHostTest, SelectCacheAllowed); |
| 40 FORWARD_DECLARE_TEST(AppCacheHostTest, SelectCacheBlocked); | 40 FORWARD_DECLARE_TEST(AppCacheHostTest, SelectCacheBlocked); |
| 41 FORWARD_DECLARE_TEST(AppCacheHostTest, SelectCacheTwice); | 41 FORWARD_DECLARE_TEST(AppCacheHostTest, SelectCacheTwice); |
| 42 FORWARD_DECLARE_TEST(AppCacheTest, CleanupUnusedCache); | 42 FORWARD_DECLARE_TEST(AppCacheTest, CleanupUnusedCache); |
| 43 class AppCache; | 43 class AppCache; |
| 44 class AppCacheFrontend; | 44 class AppCacheFrontend; |
| 45 class AppCacheGroupTest; | 45 class AppCacheGroupTest; |
| 46 class AppCacheHostTest; | 46 class AppCacheHostTest; |
| 47 class AppCacheRequest; |
| 47 class AppCacheRequestHandler; | 48 class AppCacheRequestHandler; |
| 48 class AppCacheRequestHandlerTest; | 49 class AppCacheRequestHandlerTest; |
| 49 class AppCacheStorageImplTest; | 50 class AppCacheStorageImplTest; |
| 50 class AppCacheTest; | 51 class AppCacheTest; |
| 51 class AppCacheUpdateJobTest; | 52 class AppCacheUpdateJobTest; |
| 52 | 53 |
| 53 typedef base::Callback<void(AppCacheStatus, void*)> GetStatusCallback; | 54 typedef base::Callback<void(AppCacheStatus, void*)> GetStatusCallback; |
| 54 typedef base::Callback<void(bool, void*)> StartUpdateCallback; | 55 typedef base::Callback<void(bool, void*)> StartUpdateCallback; |
| 55 typedef base::Callback<void(bool, void*)> SwapCacheCallback; | 56 typedef base::Callback<void(bool, void*)> SwapCacheCallback; |
| 56 | 57 |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 109 const GURL& preferred_manifest_url() const { | 110 const GURL& preferred_manifest_url() const { |
| 110 return preferred_manifest_url_; | 111 return preferred_manifest_url_; |
| 111 } | 112 } |
| 112 void set_preferred_manifest_url(const GURL& url) { | 113 void set_preferred_manifest_url(const GURL& url) { |
| 113 preferred_manifest_url_ = url; | 114 preferred_manifest_url_ = url; |
| 114 } | 115 } |
| 115 | 116 |
| 116 // Support for loading resources out of the appcache. | 117 // Support for loading resources out of the appcache. |
| 117 // May return NULL if the request isn't subject to retrieval from an appache. | 118 // May return NULL if the request isn't subject to retrieval from an appache. |
| 118 std::unique_ptr<AppCacheRequestHandler> CreateRequestHandler( | 119 std::unique_ptr<AppCacheRequestHandler> CreateRequestHandler( |
| 119 net::URLRequest* request, | 120 AppCacheRequest* request, |
| 120 ResourceType resource_type, | 121 ResourceType resource_type, |
| 121 bool should_reset_appcache); | 122 bool should_reset_appcache); |
| 122 | 123 |
| 123 // Support for devtools inspecting appcache resources. | 124 // Support for devtools inspecting appcache resources. |
| 124 void GetResourceList(std::vector<AppCacheResourceInfo>* resource_infos); | 125 void GetResourceList(std::vector<AppCacheResourceInfo>* resource_infos); |
| 125 | 126 |
| 126 // Breaks any existing association between this host and a cache. | 127 // Breaks any existing association between this host and a cache. |
| 127 // 'manifest_url' is sent to DevTools as the manifest url that could have | 128 // 'manifest_url' is sent to DevTools as the manifest url that could have |
| 128 // been associated before or could be associated later with this host. | 129 // been associated before or could be associated later with this host. |
| 129 // Associations are broken either thru the cache selection algorithm | 130 // Associations are broken either thru the cache selection algorithm |
| (...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 351 FRIEND_TEST_ALL_PREFIXES(content::AppCacheHostTest, SelectCacheBlocked); | 352 FRIEND_TEST_ALL_PREFIXES(content::AppCacheHostTest, SelectCacheBlocked); |
| 352 FRIEND_TEST_ALL_PREFIXES(content::AppCacheHostTest, SelectCacheTwice); | 353 FRIEND_TEST_ALL_PREFIXES(content::AppCacheHostTest, SelectCacheTwice); |
| 353 FRIEND_TEST_ALL_PREFIXES(content::AppCacheTest, CleanupUnusedCache); | 354 FRIEND_TEST_ALL_PREFIXES(content::AppCacheTest, CleanupUnusedCache); |
| 354 | 355 |
| 355 DISALLOW_COPY_AND_ASSIGN(AppCacheHost); | 356 DISALLOW_COPY_AND_ASSIGN(AppCacheHost); |
| 356 }; | 357 }; |
| 357 | 358 |
| 358 } // namespace content | 359 } // namespace content |
| 359 | 360 |
| 360 #endif // CONTENT_BROWSER_APPCACHE_APPCACHE_HOST_H_ | 361 #endif // CONTENT_BROWSER_APPCACHE_APPCACHE_HOST_H_ |
| OLD | NEW |