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

Side by Side Diff: net/http/http_network_transaction.cc

Issue 1898133002: Add reprioritization to socket pools. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix glitch in ClientSocketHandle API contract. Created 3 years, 11 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/http/http_network_transaction.h" 5 #include "net/http/http_network_transaction.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <set> 8 #include <set>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 403 matching lines...) Expand 10 before | Expand all | Expand 10 after
414 void HttpNetworkTransaction::PopulateNetErrorDetails( 414 void HttpNetworkTransaction::PopulateNetErrorDetails(
415 NetErrorDetails* details) const { 415 NetErrorDetails* details) const {
416 *details = net_error_details_; 416 *details = net_error_details_;
417 if (stream_) 417 if (stream_)
418 stream_->PopulateNetErrorDetails(details); 418 stream_->PopulateNetErrorDetails(details);
419 } 419 }
420 420
421 void HttpNetworkTransaction::SetPriority(RequestPriority priority) { 421 void HttpNetworkTransaction::SetPriority(RequestPriority priority) {
422 priority_ = priority; 422 priority_ = priority;
423 423
424 // TODO: Note that if throttling is ever implemented below this 424 // TODO(rdsmith): Note also that if priority-based throttling is
425 // level, either of the two below calls may result in request 425 // ever implemented below this level, either of the two below calls
426 // completion, callbacks, and the potential deletion of this object 426 // may result in request completion, callbacks, and the potential
427 // (like the call below to throttle_->SetPriority()). In that case, 427 // deletion of this object (like the call below to
428 // this code will need to be modified. 428 // throttle_->SetPriority()). In that case, this code will need to
429 // be modified.
mmenke 2017/01/05 20:18:35 Ok, now I understand what you mean because of your
Randy Smith (Not in Mondays) 2017/01/13 23:05:44 Done, though I felt a need to be a bit wordier onc
429 if (stream_request_) 430 if (stream_request_)
430 stream_request_->SetPriority(priority); 431 stream_request_->SetPriority(priority);
431 if (stream_) 432 if (stream_)
432 stream_->SetPriority(priority); 433 stream_->SetPriority(priority);
433 434
434 if (throttle_) 435 if (throttle_)
435 throttle_->SetPriority(priority); 436 throttle_->SetPriority(priority);
436 // The above call may have resulted in deleting |*this|. 437 // The above call may have resulted in deleting |*this|.
437 } 438 }
438 439
(...skipping 1261 matching lines...) Expand 10 before | Expand all | Expand 10 after
1700 DCHECK(stream_request_); 1701 DCHECK(stream_request_);
1701 1702
1702 // Since the transaction can restart with auth credentials, it may create a 1703 // Since the transaction can restart with auth credentials, it may create a
1703 // stream more than once. Accumulate all of the connection attempts across 1704 // stream more than once. Accumulate all of the connection attempts across
1704 // those streams by appending them to the vector: 1705 // those streams by appending them to the vector:
1705 for (const auto& attempt : stream_request_->connection_attempts()) 1706 for (const auto& attempt : stream_request_->connection_attempts())
1706 connection_attempts_.push_back(attempt); 1707 connection_attempts_.push_back(attempt);
1707 } 1708 }
1708 1709
1709 } // namespace net 1710 } // namespace net
OLDNEW
« no previous file with comments | « no previous file | net/http/http_proxy_client_socket_pool.h » ('j') | net/http/http_stream_factory_impl_job.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698