| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "net/url_request/url_request_http_job.h" | 5 #include "net/url_request/url_request_http_job.h" |
| 6 | 6 |
| 7 #include "base/base_switches.h" | 7 #include "base/base_switches.h" |
| 8 #include "base/bind.h" | 8 #include "base/bind.h" |
| 9 #include "base/bind_helpers.h" | 9 #include "base/bind_helpers.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 238 void URLRequestHttpJob::Start() { | 238 void URLRequestHttpJob::Start() { |
| 239 DCHECK(!transaction_.get()); | 239 DCHECK(!transaction_.get()); |
| 240 | 240 |
| 241 // URLRequest::SetReferrer ensures that we do not send username and password | 241 // URLRequest::SetReferrer ensures that we do not send username and password |
| 242 // fields in the referrer. | 242 // fields in the referrer. |
| 243 GURL referrer(request_->referrer()); | 243 GURL referrer(request_->referrer()); |
| 244 | 244 |
| 245 request_info_.url = request_->url(); | 245 request_info_.url = request_->url(); |
| 246 request_info_.method = request_->method(); | 246 request_info_.method = request_->method(); |
| 247 request_info_.load_flags = request_->load_flags(); | 247 request_info_.load_flags = request_->load_flags(); |
| 248 request_info_.max_automatic_retries_on_network_changes_ = |
| 249 request_->max_automatic_retries_on_network_changes(); |
| 248 // Enable privacy mode if cookie settings or flags tell us not send or | 250 // Enable privacy mode if cookie settings or flags tell us not send or |
| 249 // save cookies. | 251 // save cookies. |
| 250 bool enable_privacy_mode = | 252 bool enable_privacy_mode = |
| 251 (request_info_.load_flags & LOAD_DO_NOT_SEND_COOKIES) || | 253 (request_info_.load_flags & LOAD_DO_NOT_SEND_COOKIES) || |
| 252 (request_info_.load_flags & LOAD_DO_NOT_SAVE_COOKIES) || | 254 (request_info_.load_flags & LOAD_DO_NOT_SAVE_COOKIES) || |
| 253 CanEnablePrivacyMode(); | 255 CanEnablePrivacyMode(); |
| 254 // Privacy mode could still be disabled in OnCookiesLoaded if we are going | 256 // Privacy mode could still be disabled in OnCookiesLoaded if we are going |
| 255 // to send previously saved cookies. | 257 // to send previously saved cookies. |
| 256 request_info_.privacy_mode = enable_privacy_mode ? | 258 request_info_.privacy_mode = enable_privacy_mode ? |
| 257 kPrivacyModeEnabled : kPrivacyModeDisabled; | 259 kPrivacyModeEnabled : kPrivacyModeDisabled; |
| (...skipping 1209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1467 return override_response_headers_.get() ? | 1469 return override_response_headers_.get() ? |
| 1468 override_response_headers_.get() : | 1470 override_response_headers_.get() : |
| 1469 transaction_->GetResponseInfo()->headers.get(); | 1471 transaction_->GetResponseInfo()->headers.get(); |
| 1470 } | 1472 } |
| 1471 | 1473 |
| 1472 void URLRequestHttpJob::NotifyURLRequestDestroyed() { | 1474 void URLRequestHttpJob::NotifyURLRequestDestroyed() { |
| 1473 awaiting_callback_ = false; | 1475 awaiting_callback_ = false; |
| 1474 } | 1476 } |
| 1475 | 1477 |
| 1476 } // namespace net | 1478 } // namespace net |
| OLD | NEW |