| 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 // An implementation of WebURLLoader in terms of ResourceLoaderBridge. | 5 // An implementation of WebURLLoader in terms of ResourceLoaderBridge. |
| 6 | 6 |
| 7 #include "content/child/web_url_loader_impl.h" | 7 #include "content/child/web_url_loader_impl.h" |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
| (...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 336 GURL referrer_url( | 336 GURL referrer_url( |
| 337 request.httpHeaderField(WebString::fromUTF8("Referer")).latin1()); | 337 request.httpHeaderField(WebString::fromUTF8("Referer")).latin1()); |
| 338 const std::string& method = request.httpMethod().latin1(); | 338 const std::string& method = request.httpMethod().latin1(); |
| 339 | 339 |
| 340 int load_flags = net::LOAD_NORMAL; | 340 int load_flags = net::LOAD_NORMAL; |
| 341 switch (request.cachePolicy()) { | 341 switch (request.cachePolicy()) { |
| 342 case WebURLRequest::ReloadIgnoringCacheData: | 342 case WebURLRequest::ReloadIgnoringCacheData: |
| 343 // Required by LayoutTests/http/tests/misc/refresh-headers.php | 343 // Required by LayoutTests/http/tests/misc/refresh-headers.php |
| 344 load_flags |= net::LOAD_VALIDATE_CACHE; | 344 load_flags |= net::LOAD_VALIDATE_CACHE; |
| 345 break; | 345 break; |
| 346 case WebURLRequest::ReloadBypassingCache: |
| 347 load_flags |= net::LOAD_BYPASS_CACHE; |
| 348 break; |
| 346 case WebURLRequest::ReturnCacheDataElseLoad: | 349 case WebURLRequest::ReturnCacheDataElseLoad: |
| 347 load_flags |= net::LOAD_PREFERRING_CACHE; | 350 load_flags |= net::LOAD_PREFERRING_CACHE; |
| 348 break; | 351 break; |
| 349 case WebURLRequest::ReturnCacheDataDontLoad: | 352 case WebURLRequest::ReturnCacheDataDontLoad: |
| 350 load_flags |= net::LOAD_ONLY_FROM_CACHE; | 353 load_flags |= net::LOAD_ONLY_FROM_CACHE; |
| 351 break; | 354 break; |
| 352 case WebURLRequest::UseProtocolCachePolicy: | 355 case WebURLRequest::UseProtocolCachePolicy: |
| 353 break; | 356 break; |
| 354 } | 357 } |
| 355 | 358 |
| (...skipping 516 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 872 void WebURLLoaderImpl::setDefersLoading(bool value) { | 875 void WebURLLoaderImpl::setDefersLoading(bool value) { |
| 873 context_->SetDefersLoading(value); | 876 context_->SetDefersLoading(value); |
| 874 } | 877 } |
| 875 | 878 |
| 876 void WebURLLoaderImpl::didChangePriority(WebURLRequest::Priority new_priority, | 879 void WebURLLoaderImpl::didChangePriority(WebURLRequest::Priority new_priority, |
| 877 int intra_priority_value) { | 880 int intra_priority_value) { |
| 878 context_->DidChangePriority(new_priority, intra_priority_value); | 881 context_->DidChangePriority(new_priority, intra_priority_value); |
| 879 } | 882 } |
| 880 | 883 |
| 881 } // namespace content | 884 } // namespace content |
| OLD | NEW |