| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #include "content/browser/appcache/appcache_interceptor.h" | 5 #include "content/browser/appcache/appcache_interceptor.h" |
| 6 | 6 |
| 7 #include "webkit/browser/appcache/appcache_backend_impl.h" | 7 #include "content/browser/appcache/appcache_backend_impl.h" |
| 8 #include "webkit/browser/appcache/appcache_host.h" | 8 #include "content/browser/appcache/appcache_host.h" |
| 9 #include "webkit/browser/appcache/appcache_request_handler.h" | 9 #include "content/browser/appcache/appcache_request_handler.h" |
| 10 #include "webkit/browser/appcache/appcache_service_impl.h" | 10 #include "content/browser/appcache/appcache_service_impl.h" |
| 11 #include "webkit/browser/appcache/appcache_url_request_job.h" | 11 #include "content/browser/appcache/appcache_url_request_job.h" |
| 12 #include "webkit/common/appcache/appcache_interfaces.h" | 12 #include "content/common/appcache_interfaces.h" |
| 13 | |
| 14 using appcache::AppCacheBackendImpl; | |
| 15 using appcache::AppCacheHost; | |
| 16 using appcache::AppCacheRequestHandler; | |
| 17 using appcache::AppCacheServiceImpl; | |
| 18 using appcache::kAppCacheNoCacheId; | |
| 19 using appcache::kAppCacheNoHostId; | |
| 20 | 13 |
| 21 namespace content { | 14 namespace content { |
| 22 | 15 |
| 23 // static | 16 // static |
| 24 AppCacheInterceptor* AppCacheInterceptor::GetInstance() { | 17 AppCacheInterceptor* AppCacheInterceptor::GetInstance() { |
| 25 return Singleton<AppCacheInterceptor>::get(); | 18 return Singleton<AppCacheInterceptor>::get(); |
| 26 } | 19 } |
| 27 | 20 |
| 28 void AppCacheInterceptor::SetHandler( | 21 void AppCacheInterceptor::SetHandler( |
| 29 net::URLRequest* request, AppCacheRequestHandler* handler) { | 22 net::URLRequest* request, AppCacheRequestHandler* handler) { |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 | 112 |
| 120 net::URLRequestJob* AppCacheInterceptor::MaybeInterceptResponse( | 113 net::URLRequestJob* AppCacheInterceptor::MaybeInterceptResponse( |
| 121 net::URLRequest* request, net::NetworkDelegate* network_delegate) { | 114 net::URLRequest* request, net::NetworkDelegate* network_delegate) { |
| 122 AppCacheRequestHandler* handler = GetHandler(request); | 115 AppCacheRequestHandler* handler = GetHandler(request); |
| 123 if (!handler) | 116 if (!handler) |
| 124 return NULL; | 117 return NULL; |
| 125 return handler->MaybeLoadFallbackForResponse(request, network_delegate); | 118 return handler->MaybeLoadFallbackForResponse(request, network_delegate); |
| 126 } | 119 } |
| 127 | 120 |
| 128 } // namespace content | 121 } // namespace content |
| OLD | NEW |