| 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 333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 344 // instance WebCore::FrameLoader::HideReferrer. | 344 // instance WebCore::FrameLoader::HideReferrer. |
| 345 if (referrer.is_valid()) { | 345 if (referrer.is_valid()) { |
| 346 request_info_.extra_headers.SetHeader(HttpRequestHeaders::kReferer, | 346 request_info_.extra_headers.SetHeader(HttpRequestHeaders::kReferer, |
| 347 referrer.spec()); | 347 referrer.spec()); |
| 348 } | 348 } |
| 349 | 349 |
| 350 request_info_.extra_headers.SetHeaderIfMissing( | 350 request_info_.extra_headers.SetHeaderIfMissing( |
| 351 HttpRequestHeaders::kUserAgent, | 351 HttpRequestHeaders::kUserAgent, |
| 352 http_user_agent_settings_ ? | 352 http_user_agent_settings_ ? |
| 353 http_user_agent_settings_->GetUserAgent(request_->url()) : | 353 http_user_agent_settings_->GetUserAgent(request_->url()) : |
| 354 EmptyString()); | 354 std::string()); |
| 355 | 355 |
| 356 AddExtraHeaders(); | 356 AddExtraHeaders(); |
| 357 AddCookieHeaderAndStart(); | 357 AddCookieHeaderAndStart(); |
| 358 } | 358 } |
| 359 | 359 |
| 360 void URLRequestHttpJob::Kill() { | 360 void URLRequestHttpJob::Kill() { |
| 361 http_transaction_delegate_->OnDetachRequest(); | 361 http_transaction_delegate_->OnDetachRequest(); |
| 362 | 362 |
| 363 if (!transaction_.get()) | 363 if (!transaction_.get()) |
| 364 return; | 364 return; |
| (...skipping 1152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1517 | 1517 |
| 1518 void URLRequestHttpJob::NotifyURLRequestDestroyed() { | 1518 void URLRequestHttpJob::NotifyURLRequestDestroyed() { |
| 1519 awaiting_callback_ = false; | 1519 awaiting_callback_ = false; |
| 1520 } | 1520 } |
| 1521 | 1521 |
| 1522 void URLRequestHttpJob::OnDetachRequest() { | 1522 void URLRequestHttpJob::OnDetachRequest() { |
| 1523 http_transaction_delegate_->OnDetachRequest(); | 1523 http_transaction_delegate_->OnDetachRequest(); |
| 1524 } | 1524 } |
| 1525 | 1525 |
| 1526 } // namespace net | 1526 } // namespace net |
| OLD | NEW |