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 #include "webkit/appcache/appcache_interceptor.h" | 5 #include "webkit/appcache/appcache_interceptor.h" |
6 | 6 |
7 #include "webkit/appcache/appcache_backend_impl.h" | 7 #include "webkit/appcache/appcache_backend_impl.h" |
8 #include "webkit/appcache/appcache_host.h" | 8 #include "webkit/appcache/appcache_host.h" |
9 #include "webkit/appcache/appcache_interfaces.h" | 9 #include "webkit/appcache/appcache_interfaces.h" |
10 #include "webkit/appcache/appcache_request_handler.h" | 10 #include "webkit/appcache/appcache_request_handler.h" |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 | 64 |
65 AppCacheInterceptor::AppCacheInterceptor() { | 65 AppCacheInterceptor::AppCacheInterceptor() { |
66 net::URLRequest::Deprecated::RegisterRequestInterceptor(this); | 66 net::URLRequest::Deprecated::RegisterRequestInterceptor(this); |
67 } | 67 } |
68 | 68 |
69 AppCacheInterceptor::~AppCacheInterceptor() { | 69 AppCacheInterceptor::~AppCacheInterceptor() { |
70 net::URLRequest::Deprecated::UnregisterRequestInterceptor(this); | 70 net::URLRequest::Deprecated::UnregisterRequestInterceptor(this); |
71 } | 71 } |
72 | 72 |
73 net::URLRequestJob* AppCacheInterceptor::MaybeIntercept( | 73 net::URLRequestJob* AppCacheInterceptor::MaybeIntercept( |
74 net::URLRequest* request) { | 74 net::URLRequest* request, net::NetworkDelegate* network_delegate) { |
75 AppCacheRequestHandler* handler = GetHandler(request); | 75 AppCacheRequestHandler* handler = GetHandler(request); |
76 if (!handler) | 76 if (!handler) |
77 return NULL; | 77 return NULL; |
78 return handler->MaybeLoadResource(request); | 78 return handler->MaybeLoadResource(request, network_delegate); |
79 } | 79 } |
80 | 80 |
81 net::URLRequestJob* AppCacheInterceptor::MaybeInterceptRedirect( | 81 net::URLRequestJob* AppCacheInterceptor::MaybeInterceptRedirect( |
82 net::URLRequest* request, | 82 net::URLRequest* request, |
| 83 net::NetworkDelegate* network_delegate, |
83 const GURL& location) { | 84 const GURL& location) { |
84 AppCacheRequestHandler* handler = GetHandler(request); | 85 AppCacheRequestHandler* handler = GetHandler(request); |
85 if (!handler) | 86 if (!handler) |
86 return NULL; | 87 return NULL; |
87 return handler->MaybeLoadFallbackForRedirect(request, location); | 88 return handler->MaybeLoadFallbackForRedirect( |
| 89 request, network_delegate, location); |
88 } | 90 } |
89 | 91 |
90 net::URLRequestJob* AppCacheInterceptor::MaybeInterceptResponse( | 92 net::URLRequestJob* AppCacheInterceptor::MaybeInterceptResponse( |
91 net::URLRequest* request) { | 93 net::URLRequest* request, net::NetworkDelegate* network_delegate) { |
92 AppCacheRequestHandler* handler = GetHandler(request); | 94 AppCacheRequestHandler* handler = GetHandler(request); |
93 if (!handler) | 95 if (!handler) |
94 return NULL; | 96 return NULL; |
95 return handler->MaybeLoadFallbackForResponse(request); | 97 return handler->MaybeLoadFallbackForResponse(request, network_delegate); |
96 } | 98 } |
97 | 99 |
98 } // namespace appcache | 100 } // namespace appcache |
OLD | NEW |