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 342 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
353 break; | 353 break; |
354 } | 354 } |
355 | 355 |
356 if (request.reportUploadProgress()) | 356 if (request.reportUploadProgress()) |
357 load_flags |= net::LOAD_ENABLE_UPLOAD_PROGRESS; | 357 load_flags |= net::LOAD_ENABLE_UPLOAD_PROGRESS; |
358 if (request.reportLoadTiming()) | 358 if (request.reportLoadTiming()) |
359 load_flags |= net::LOAD_ENABLE_LOAD_TIMING; | 359 load_flags |= net::LOAD_ENABLE_LOAD_TIMING; |
360 if (request.reportRawHeaders()) | 360 if (request.reportRawHeaders()) |
361 load_flags |= net::LOAD_REPORT_RAW_HEADERS; | 361 load_flags |= net::LOAD_REPORT_RAW_HEADERS; |
362 | 362 |
363 if (!request.allowCookies() || !request.allowStoredCredentials()) { | 363 if (!request.allowStoredCredentials()) { |
364 load_flags |= net::LOAD_DO_NOT_SAVE_COOKIES; | 364 load_flags |= net::LOAD_DO_NOT_SAVE_COOKIES; |
365 load_flags |= net::LOAD_DO_NOT_SEND_COOKIES; | 365 load_flags |= net::LOAD_DO_NOT_SEND_COOKIES; |
366 } | 366 } |
367 | 367 |
368 if (!request.allowStoredCredentials()) | 368 if (!request.allowStoredCredentials()) |
369 load_flags |= net::LOAD_DO_NOT_SEND_AUTH_DATA; | 369 load_flags |= net::LOAD_DO_NOT_SEND_AUTH_DATA; |
370 | 370 |
371 if (request.targetType() == WebURLRequest::TargetIsXHR && | 371 if (request.targetType() == WebURLRequest::TargetIsXHR && |
372 (url.has_username() || url.has_password())) { | 372 (url.has_username() || url.has_password())) { |
373 load_flags |= net::LOAD_DO_NOT_PROMPT_FOR_LOGIN; | 373 load_flags |= net::LOAD_DO_NOT_PROMPT_FOR_LOGIN; |
(...skipping 494 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
868 | 868 |
869 void WebURLLoaderImpl::setDefersLoading(bool value) { | 869 void WebURLLoaderImpl::setDefersLoading(bool value) { |
870 context_->SetDefersLoading(value); | 870 context_->SetDefersLoading(value); |
871 } | 871 } |
872 | 872 |
873 void WebURLLoaderImpl::didChangePriority(WebURLRequest::Priority new_priority) { | 873 void WebURLLoaderImpl::didChangePriority(WebURLRequest::Priority new_priority) { |
874 context_->DidChangePriority(new_priority); | 874 context_->DidChangePriority(new_priority); |
875 } | 875 } |
876 | 876 |
877 } // namespace content | 877 } // namespace content |
OLD | NEW |