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" |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 return; | 48 return; |
49 | 49 |
50 // Create a handler for this request and associate it with the request. | 50 // Create a handler for this request and associate it with the request. |
51 AppCacheRequestHandler* handler = | 51 AppCacheRequestHandler* handler = |
52 host->CreateRequestHandler(request, resource_type, should_reset_appcache); | 52 host->CreateRequestHandler(request, resource_type, should_reset_appcache); |
53 if (handler) | 53 if (handler) |
54 SetHandler(request, handler); | 54 SetHandler(request, handler); |
55 } | 55 } |
56 | 56 |
57 void AppCacheInterceptor::GetExtraResponseInfo(net::URLRequest* request, | 57 void AppCacheInterceptor::GetExtraResponseInfo(net::URLRequest* request, |
58 int64* cache_id, | 58 int64_t* cache_id, |
59 GURL* manifest_url) { | 59 GURL* manifest_url) { |
60 DCHECK(*cache_id == kAppCacheNoCacheId); | 60 DCHECK(*cache_id == kAppCacheNoCacheId); |
61 DCHECK(manifest_url->is_empty()); | 61 DCHECK(manifest_url->is_empty()); |
62 AppCacheRequestHandler* handler = GetHandler(request); | 62 AppCacheRequestHandler* handler = GetHandler(request); |
63 if (handler) | 63 if (handler) |
64 handler->GetExtraResponseInfo(cache_id, manifest_url); | 64 handler->GetExtraResponseInfo(cache_id, manifest_url); |
65 } | 65 } |
66 | 66 |
67 void AppCacheInterceptor::PrepareForCrossSiteTransfer( | 67 void AppCacheInterceptor::PrepareForCrossSiteTransfer( |
68 net::URLRequest* request, | 68 net::URLRequest* request, |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
121 | 121 |
122 net::URLRequestJob* AppCacheInterceptor::MaybeInterceptResponse( | 122 net::URLRequestJob* AppCacheInterceptor::MaybeInterceptResponse( |
123 net::URLRequest* request, net::NetworkDelegate* network_delegate) const { | 123 net::URLRequest* request, net::NetworkDelegate* network_delegate) const { |
124 AppCacheRequestHandler* handler = GetHandler(request); | 124 AppCacheRequestHandler* handler = GetHandler(request); |
125 if (!handler) | 125 if (!handler) |
126 return NULL; | 126 return NULL; |
127 return handler->MaybeLoadFallbackForResponse(request, network_delegate); | 127 return handler->MaybeLoadFallbackForResponse(request, network_delegate); |
128 } | 128 } |
129 | 129 |
130 } // namespace content | 130 } // namespace content |
OLD | NEW |