| 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 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 141 } | 141 } |
| 142 | 142 |
| 143 GURL redirect_url; | 143 GURL redirect_url; |
| 144 if (request->GetHSTSRedirect(&redirect_url)) | 144 if (request->GetHSTSRedirect(&redirect_url)) |
| 145 return new URLRequestRedirectJob(request, redirect_url); | 145 return new URLRequestRedirectJob(request, redirect_url); |
| 146 return new URLRequestHttpJob(request); | 146 return new URLRequestHttpJob(request); |
| 147 } | 147 } |
| 148 | 148 |
| 149 | 149 |
| 150 URLRequestHttpJob::URLRequestHttpJob(URLRequest* request) | 150 URLRequestHttpJob::URLRequestHttpJob(URLRequest* request) |
| 151 : URLRequestJob(request), | 151 : URLRequestJob(request, request->context()->network_delegate()), |
| 152 response_info_(NULL), | 152 response_info_(NULL), |
| 153 response_cookies_save_index_(0), | 153 response_cookies_save_index_(0), |
| 154 proxy_auth_state_(AUTH_STATE_DONT_NEED_AUTH), | 154 proxy_auth_state_(AUTH_STATE_DONT_NEED_AUTH), |
| 155 server_auth_state_(AUTH_STATE_DONT_NEED_AUTH), | 155 server_auth_state_(AUTH_STATE_DONT_NEED_AUTH), |
| 156 ALLOW_THIS_IN_INITIALIZER_LIST(start_callback_( | 156 ALLOW_THIS_IN_INITIALIZER_LIST(start_callback_( |
| 157 base::Bind(&URLRequestHttpJob::OnStartCompleted, | 157 base::Bind(&URLRequestHttpJob::OnStartCompleted, |
| 158 base::Unretained(this)))), | 158 base::Unretained(this)))), |
| 159 ALLOW_THIS_IN_INITIALIZER_LIST(notify_before_headers_sent_callback_( | 159 ALLOW_THIS_IN_INITIALIZER_LIST(notify_before_headers_sent_callback_( |
| 160 base::Bind(&URLRequestHttpJob::NotifyBeforeSendHeadersCallback, | 160 base::Bind(&URLRequestHttpJob::NotifyBeforeSendHeadersCallback, |
| 161 base::Unretained(this)))), | 161 base::Unretained(this)))), |
| (...skipping 1265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1427 return override_response_headers_.get() ? | 1427 return override_response_headers_.get() ? |
| 1428 override_response_headers_ : | 1428 override_response_headers_ : |
| 1429 transaction_->GetResponseInfo()->headers; | 1429 transaction_->GetResponseInfo()->headers; |
| 1430 } | 1430 } |
| 1431 | 1431 |
| 1432 void URLRequestHttpJob::NotifyURLRequestDestroyed() { | 1432 void URLRequestHttpJob::NotifyURLRequestDestroyed() { |
| 1433 awaiting_callback_ = false; | 1433 awaiting_callback_ = false; |
| 1434 } | 1434 } |
| 1435 | 1435 |
| 1436 } // namespace net | 1436 } // namespace net |
| OLD | NEW |