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_REQUEST_HANDLER_H_ | 5 #ifndef CONTENT_BROWSER_APPCACHE_APPCACHE_REQUEST_HANDLER_H_ |
6 #define CONTENT_BROWSER_APPCACHE_APPCACHE_REQUEST_HANDLER_H_ | 6 #define CONTENT_BROWSER_APPCACHE_APPCACHE_REQUEST_HANDLER_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
117 | 117 |
118 // Called just before the request is restarted. Grabs the reason for | 118 // Called just before the request is restarted. Grabs the reason for |
119 // restarting, so can correctly continue to handle the request. | 119 // restarting, so can correctly continue to handle the request. |
120 void OnPrepareToRestart(); | 120 void OnPrepareToRestart(); |
121 | 121 |
122 // Helper method to create an AppCacheJob and populate job_. | 122 // Helper method to create an AppCacheJob and populate job_. |
123 // Caller takes ownership of returned value. | 123 // Caller takes ownership of returned value. |
124 std::unique_ptr<AppCacheJob> CreateJob( | 124 std::unique_ptr<AppCacheJob> CreateJob( |
125 net::NetworkDelegate* network_delegate); | 125 net::NetworkDelegate* network_delegate); |
126 | 126 |
| 127 // Helper method to create an AppCacheJob for fallback responses. |
| 128 std::unique_ptr<AppCacheJob> MaybeCreateJobForFallback( |
| 129 net::NetworkDelegate* network_delegate); |
| 130 |
127 // Helper to retrieve a pointer to the storage object. | 131 // Helper to retrieve a pointer to the storage object. |
128 AppCacheStorage* storage() const; | 132 AppCacheStorage* storage() const; |
129 | 133 |
130 bool is_main_resource() const { | 134 bool is_main_resource() const { |
131 return IsMainResourceType(resource_type_); | 135 return IsMainResourceType(resource_type_); |
132 } | 136 } |
133 | 137 |
134 // Main-resource loading ------------------------------------- | 138 // Main-resource loading ------------------------------------- |
135 // Frame and SharedWorker main resources are handled here. | 139 // Frame and SharedWorker main resources are handled here. |
136 | 140 |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
243 // The AppCache host instance. We pass this to the | 247 // The AppCache host instance. We pass this to the |
244 // AppCacheSubresourceURLFactory instance on creation. | 248 // AppCacheSubresourceURLFactory instance on creation. |
245 base::WeakPtr<AppCacheHost> appcache_host_; | 249 base::WeakPtr<AppCacheHost> appcache_host_; |
246 | 250 |
247 DISALLOW_COPY_AND_ASSIGN(AppCacheRequestHandler); | 251 DISALLOW_COPY_AND_ASSIGN(AppCacheRequestHandler); |
248 }; | 252 }; |
249 | 253 |
250 } // namespace content | 254 } // namespace content |
251 | 255 |
252 #endif // CONTENT_BROWSER_APPCACHE_APPCACHE_REQUEST_HANDLER_H_ | 256 #endif // CONTENT_BROWSER_APPCACHE_APPCACHE_REQUEST_HANDLER_H_ |
OLD | NEW |