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> |
| 11 |
10 #include "base/callback.h" | 12 #include "base/callback.h" |
11 #include "base/gtest_prod_util.h" | 13 #include "base/gtest_prod_util.h" |
12 #include "base/macros.h" | 14 #include "base/macros.h" |
13 #include "base/memory/ref_counted.h" | 15 #include "base/memory/ref_counted.h" |
14 #include "base/observer_list.h" | 16 #include "base/observer_list.h" |
15 #include "content/browser/appcache/appcache_group.h" | 17 #include "content/browser/appcache/appcache_group.h" |
16 #include "content/browser/appcache/appcache_service_impl.h" | 18 #include "content/browser/appcache/appcache_service_impl.h" |
17 #include "content/browser/appcache/appcache_storage.h" | 19 #include "content/browser/appcache/appcache_storage.h" |
18 #include "content/common/appcache_interfaces.h" | 20 #include "content/common/appcache_interfaces.h" |
19 #include "content/common/content_export.h" | 21 #include "content/common/content_export.h" |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
106 | 108 |
107 const GURL& preferred_manifest_url() const { | 109 const GURL& preferred_manifest_url() const { |
108 return preferred_manifest_url_; | 110 return preferred_manifest_url_; |
109 } | 111 } |
110 void set_preferred_manifest_url(const GURL& url) { | 112 void set_preferred_manifest_url(const GURL& url) { |
111 preferred_manifest_url_ = url; | 113 preferred_manifest_url_ = url; |
112 } | 114 } |
113 | 115 |
114 // Support for loading resources out of the appcache. | 116 // Support for loading resources out of the appcache. |
115 // May return NULL if the request isn't subject to retrieval from an appache. | 117 // May return NULL if the request isn't subject to retrieval from an appache. |
116 AppCacheRequestHandler* CreateRequestHandler( | 118 std::unique_ptr<AppCacheRequestHandler> CreateRequestHandler( |
117 net::URLRequest* request, | 119 net::URLRequest* request, |
118 ResourceType resource_type, | 120 ResourceType resource_type, |
119 bool should_reset_appcache); | 121 bool should_reset_appcache); |
120 | 122 |
121 // Support for devtools inspecting appcache resources. | 123 // Support for devtools inspecting appcache resources. |
122 void GetResourceList(std::vector<AppCacheResourceInfo>* resource_infos); | 124 void GetResourceList(std::vector<AppCacheResourceInfo>* resource_infos); |
123 | 125 |
124 // Breaks any existing association between this host and a cache. | 126 // Breaks any existing association between this host and a cache. |
125 // 'manifest_url' is sent to DevTools as the manifest url that could have | 127 // 'manifest_url' is sent to DevTools as the manifest url that could have |
126 // been associated before or could be associated later with this host. | 128 // been associated before or could be associated later with this host. |
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
349 FRIEND_TEST_ALL_PREFIXES(content::AppCacheHostTest, SelectCacheBlocked); | 351 FRIEND_TEST_ALL_PREFIXES(content::AppCacheHostTest, SelectCacheBlocked); |
350 FRIEND_TEST_ALL_PREFIXES(content::AppCacheHostTest, SelectCacheTwice); | 352 FRIEND_TEST_ALL_PREFIXES(content::AppCacheHostTest, SelectCacheTwice); |
351 FRIEND_TEST_ALL_PREFIXES(content::AppCacheTest, CleanupUnusedCache); | 353 FRIEND_TEST_ALL_PREFIXES(content::AppCacheTest, CleanupUnusedCache); |
352 | 354 |
353 DISALLOW_COPY_AND_ASSIGN(AppCacheHost); | 355 DISALLOW_COPY_AND_ASSIGN(AppCacheHost); |
354 }; | 356 }; |
355 | 357 |
356 } // namespace content | 358 } // namespace content |
357 | 359 |
358 #endif // CONTENT_BROWSER_APPCACHE_APPCACHE_HOST_H_ | 360 #endif // CONTENT_BROWSER_APPCACHE_APPCACHE_HOST_H_ |
OLD | NEW |