| 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 "content/browser/appcache/appcache_backend_impl.h" | 7 #include "content/browser/appcache/appcache_backend_impl.h" |
| 8 #include "content/browser/appcache/appcache_host.h" | 8 #include "content/browser/appcache/appcache_host.h" |
| 9 #include "content/browser/appcache/appcache_request_handler.h" | 9 #include "content/browser/appcache/appcache_request_handler.h" |
| 10 #include "content/browser/appcache/appcache_service_impl.h" | 10 #include "content/browser/appcache/appcache_service_impl.h" |
| 11 #include "content/browser/appcache/appcache_url_request_job.h" | 11 #include "content/browser/appcache/appcache_url_request_job.h" |
| 12 #include "content/common/appcache_interfaces.h" | 12 #include "content/common/appcache_interfaces.h" |
| 13 | 13 |
| 14 namespace content { | 14 namespace content { |
| 15 | 15 |
| 16 class AppCacheInterceptor::StartInterceptor | 16 class AppCacheInterceptor::StartInterceptor |
| 17 : public net::URLRequestInterceptor { | 17 : public net::URLRequestInterceptor { |
| 18 public: | 18 public: |
| 19 StartInterceptor() {} | 19 StartInterceptor() {} |
| 20 virtual ~StartInterceptor() {} | 20 ~StartInterceptor() override {} |
| 21 virtual net::URLRequestJob* MaybeInterceptRequest( | 21 net::URLRequestJob* MaybeInterceptRequest( |
| 22 net::URLRequest* request, | 22 net::URLRequest* request, |
| 23 net::NetworkDelegate* network_delegate) const override { | 23 net::NetworkDelegate* network_delegate) const override { |
| 24 AppCacheRequestHandler* handler = GetHandler(request); | 24 AppCacheRequestHandler* handler = GetHandler(request); |
| 25 if (!handler) | 25 if (!handler) |
| 26 return NULL; | 26 return NULL; |
| 27 return handler->MaybeLoadResource(request, network_delegate); | 27 return handler->MaybeLoadResource(request, network_delegate); |
| 28 } | 28 } |
| 29 | 29 |
| 30 private: | 30 private: |
| 31 DISALLOW_COPY_AND_ASSIGN(StartInterceptor); | 31 DISALLOW_COPY_AND_ASSIGN(StartInterceptor); |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 139 | 139 |
| 140 net::URLRequestJob* AppCacheInterceptor::MaybeInterceptResponse( | 140 net::URLRequestJob* AppCacheInterceptor::MaybeInterceptResponse( |
| 141 net::URLRequest* request, net::NetworkDelegate* network_delegate) { | 141 net::URLRequest* request, net::NetworkDelegate* network_delegate) { |
| 142 AppCacheRequestHandler* handler = GetHandler(request); | 142 AppCacheRequestHandler* handler = GetHandler(request); |
| 143 if (!handler) | 143 if (!handler) |
| 144 return NULL; | 144 return NULL; |
| 145 return handler->MaybeLoadFallbackForResponse(request, network_delegate); | 145 return handler->MaybeLoadFallbackForResponse(request, network_delegate); |
| 146 } | 146 } |
| 147 | 147 |
| 148 } // namespace content | 148 } // namespace content |
| OLD | NEW |