Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(15)

Side by Side Diff: net/url_request/url_request_http_job.cc

Issue 1097303003: Plumb ConnectionAttempts from HttpNetworkTransaction to URLRequest. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@domrel_serverip1
Patch Set: rebase Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 261 matching lines...) Expand 10 before | Expand all | Expand 10 after
272 272
273 void URLRequestHttpJob::Kill() { 273 void URLRequestHttpJob::Kill() {
274 if (!transaction_.get()) 274 if (!transaction_.get())
275 return; 275 return;
276 276
277 weak_factory_.InvalidateWeakPtrs(); 277 weak_factory_.InvalidateWeakPtrs();
278 DestroyTransaction(); 278 DestroyTransaction();
279 URLRequestJob::Kill(); 279 URLRequestJob::Kill();
280 } 280 }
281 281
282 void URLRequestHttpJob::GetConnectionAttempts(ConnectionAttempts* out) const {
283 if (transaction_)
284 transaction_->GetConnectionAttempts(out);
285 else
286 out->clear();
287 }
288
282 void URLRequestHttpJob::NotifyBeforeSendProxyHeadersCallback( 289 void URLRequestHttpJob::NotifyBeforeSendProxyHeadersCallback(
283 const ProxyInfo& proxy_info, 290 const ProxyInfo& proxy_info,
284 HttpRequestHeaders* request_headers) { 291 HttpRequestHeaders* request_headers) {
285 DCHECK(request_headers); 292 DCHECK(request_headers);
286 DCHECK_NE(URLRequestStatus::CANCELED, GetStatus().status()); 293 DCHECK_NE(URLRequestStatus::CANCELED, GetStatus().status());
287 if (network_delegate()) { 294 if (network_delegate()) {
288 network_delegate()->NotifyBeforeSendProxyHeaders( 295 network_delegate()->NotifyBeforeSendProxyHeaders(
289 request_, 296 request_,
290 proxy_info, 297 proxy_info,
291 request_headers); 298 request_headers);
(...skipping 1217 matching lines...) Expand 10 before | Expand all | Expand 10 after
1509 return override_response_headers_.get() ? 1516 return override_response_headers_.get() ?
1510 override_response_headers_.get() : 1517 override_response_headers_.get() :
1511 transaction_->GetResponseInfo()->headers.get(); 1518 transaction_->GetResponseInfo()->headers.get();
1512 } 1519 }
1513 1520
1514 void URLRequestHttpJob::NotifyURLRequestDestroyed() { 1521 void URLRequestHttpJob::NotifyURLRequestDestroyed() {
1515 awaiting_callback_ = false; 1522 awaiting_callback_ = false;
1516 } 1523 }
1517 1524
1518 } // namespace net 1525 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698