| 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 // An implementation of WebURLLoader in terms of ResourceLoaderBridge. | 5 // An implementation of WebURLLoader in terms of ResourceLoaderBridge. |
| 6 | 6 |
| 7 #include "webkit/glue/weburlloader_impl.h" | 7 #include "webkit/glue/weburlloader_impl.h" |
| 8 | 8 |
| 9 #include "base/file_path.h" | 9 #include "base/file_path.h" |
| 10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
| (...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 396 load_flags |= net::LOAD_REPORT_RAW_HEADERS; | 396 load_flags |= net::LOAD_REPORT_RAW_HEADERS; |
| 397 | 397 |
| 398 if (!request.allowCookies() || !request.allowStoredCredentials()) { | 398 if (!request.allowCookies() || !request.allowStoredCredentials()) { |
| 399 load_flags |= net::LOAD_DO_NOT_SAVE_COOKIES; | 399 load_flags |= net::LOAD_DO_NOT_SAVE_COOKIES; |
| 400 load_flags |= net::LOAD_DO_NOT_SEND_COOKIES; | 400 load_flags |= net::LOAD_DO_NOT_SEND_COOKIES; |
| 401 } | 401 } |
| 402 | 402 |
| 403 if (!request.allowStoredCredentials()) | 403 if (!request.allowStoredCredentials()) |
| 404 load_flags |= net::LOAD_DO_NOT_SEND_AUTH_DATA; | 404 load_flags |= net::LOAD_DO_NOT_SEND_AUTH_DATA; |
| 405 | 405 |
| 406 if (request.forPrerendering()) |
| 407 load_flags |= net::LOAD_PRERENDER; |
| 408 |
| 406 HeaderFlattener flattener(load_flags); | 409 HeaderFlattener flattener(load_flags); |
| 407 request.visitHTTPHeaderFields(&flattener); | 410 request.visitHTTPHeaderFields(&flattener); |
| 408 | 411 |
| 409 // TODO(abarth): These are wrong! I need to figure out how to get the right | 412 // TODO(abarth): These are wrong! I need to figure out how to get the right |
| 410 // strings here. See: http://crbug.com/8706 | 413 // strings here. See: http://crbug.com/8706 |
| 411 std::string frame_origin = request.firstPartyForCookies().spec(); | 414 std::string frame_origin = request.firstPartyForCookies().spec(); |
| 412 std::string main_frame_origin = request.firstPartyForCookies().spec(); | 415 std::string main_frame_origin = request.firstPartyForCookies().spec(); |
| 413 | 416 |
| 414 // TODO(brettw) this should take parameter encoding into account when | 417 // TODO(brettw) this should take parameter encoding into account when |
| 415 // creating the GURLs. | 418 // creating the GURLs. |
| (...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 747 | 750 |
| 748 void WebURLLoaderImpl::cancel() { | 751 void WebURLLoaderImpl::cancel() { |
| 749 context_->Cancel(); | 752 context_->Cancel(); |
| 750 } | 753 } |
| 751 | 754 |
| 752 void WebURLLoaderImpl::setDefersLoading(bool value) { | 755 void WebURLLoaderImpl::setDefersLoading(bool value) { |
| 753 context_->SetDefersLoading(value); | 756 context_->SetDefersLoading(value); |
| 754 } | 757 } |
| 755 | 758 |
| 756 } // namespace webkit_glue | 759 } // namespace webkit_glue |
| OLD | NEW |