| 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 333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 344 load_flags |= net::LOAD_VALIDATE_CACHE; | 344 load_flags |= net::LOAD_VALIDATE_CACHE; |
| 345 break; | 345 break; |
| 346 case WebURLRequest::ReturnCacheDataElseLoad: | 346 case WebURLRequest::ReturnCacheDataElseLoad: |
| 347 load_flags |= net::LOAD_PREFERRING_CACHE; | 347 load_flags |= net::LOAD_PREFERRING_CACHE; |
| 348 break; | 348 break; |
| 349 case WebURLRequest::ReturnCacheDataDontLoad: | 349 case WebURLRequest::ReturnCacheDataDontLoad: |
| 350 load_flags |= net::LOAD_ONLY_FROM_CACHE; | 350 load_flags |= net::LOAD_ONLY_FROM_CACHE; |
| 351 break; | 351 break; |
| 352 case WebURLRequest::UseProtocolCachePolicy: | 352 case WebURLRequest::UseProtocolCachePolicy: |
| 353 break; | 353 break; |
| 354 default: |
| 355 NOTREACHED(); |
| 354 } | 356 } |
| 355 | 357 |
| 356 if (request.reportUploadProgress()) | 358 if (request.reportUploadProgress()) |
| 357 load_flags |= net::LOAD_ENABLE_UPLOAD_PROGRESS; | 359 load_flags |= net::LOAD_ENABLE_UPLOAD_PROGRESS; |
| 358 if (request.reportLoadTiming()) | 360 if (request.reportLoadTiming()) |
| 359 load_flags |= net::LOAD_ENABLE_LOAD_TIMING; | 361 load_flags |= net::LOAD_ENABLE_LOAD_TIMING; |
| 360 if (request.reportRawHeaders()) | 362 if (request.reportRawHeaders()) |
| 361 load_flags |= net::LOAD_REPORT_RAW_HEADERS; | 363 load_flags |= net::LOAD_REPORT_RAW_HEADERS; |
| 362 | 364 |
| 363 if (!request.allowStoredCredentials()) { | 365 if (!request.allowStoredCredentials()) { |
| (...skipping 508 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 872 void WebURLLoaderImpl::setDefersLoading(bool value) { | 874 void WebURLLoaderImpl::setDefersLoading(bool value) { |
| 873 context_->SetDefersLoading(value); | 875 context_->SetDefersLoading(value); |
| 874 } | 876 } |
| 875 | 877 |
| 876 void WebURLLoaderImpl::didChangePriority(WebURLRequest::Priority new_priority, | 878 void WebURLLoaderImpl::didChangePriority(WebURLRequest::Priority new_priority, |
| 877 int intra_priority_value) { | 879 int intra_priority_value) { |
| 878 context_->DidChangePriority(new_priority, intra_priority_value); | 880 context_->DidChangePriority(new_priority, intra_priority_value); |
| 879 } | 881 } |
| 880 | 882 |
| 881 } // namespace content | 883 } // namespace content |
| OLD | NEW |