Chromium Code Reviews| 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/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 Loading... | |
| 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): Handle race between SetPriority and |
| 425 // HttpStreamFactoryImpl::Job notifying this class of stream | |
| 426 // creation (where this class will have set the priority on the | |
| 427 // stream_request_ but that will be a no-op because the stream has | |
| 428 // already been created). | |
|
mmenke
2017/01/03 22:51:22
Think this should be clearer. I assume the issue
Randy Smith (Not in Mondays)
2017/01/05 03:47:18
Yep. I've reworded the comment; let me know what
| |
| 429 | |
| 430 // TODO(rdsmith): Note that if throttling is ever implemented below this | |
|
mmenke
2017/01/03 22:51:22
Know this is an old comment, but I can't remember
Randy Smith (Not in Mondays)
2017/01/05 03:47:18
I've added " ... if *priority based* throttling ..
| |
| 425 // level, either of the two below calls may result in request | 431 // level, either of the two below calls may result in request |
| 426 // completion, callbacks, and the potential deletion of this object | 432 // completion, callbacks, and the potential deletion of this object |
| 427 // (like the call below to throttle_->SetPriority()). In that case, | 433 // (like the call below to throttle_->SetPriority()). In that case, |
| 428 // this code will need to be modified. | 434 // this code will need to be modified. |
| 429 if (stream_request_) | 435 if (stream_request_) |
| 430 stream_request_->SetPriority(priority); | 436 stream_request_->SetPriority(priority); |
| 431 if (stream_) | 437 if (stream_) |
| 432 stream_->SetPriority(priority); | 438 stream_->SetPriority(priority); |
| 433 | 439 |
| 434 if (throttle_) | 440 if (throttle_) |
| (...skipping 1265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1700 DCHECK(stream_request_); | 1706 DCHECK(stream_request_); |
| 1701 | 1707 |
| 1702 // Since the transaction can restart with auth credentials, it may create a | 1708 // Since the transaction can restart with auth credentials, it may create a |
| 1703 // stream more than once. Accumulate all of the connection attempts across | 1709 // stream more than once. Accumulate all of the connection attempts across |
| 1704 // those streams by appending them to the vector: | 1710 // those streams by appending them to the vector: |
| 1705 for (const auto& attempt : stream_request_->connection_attempts()) | 1711 for (const auto& attempt : stream_request_->connection_attempts()) |
| 1706 connection_attempts_.push_back(attempt); | 1712 connection_attempts_.push_back(attempt); |
| 1707 } | 1713 } |
| 1708 | 1714 |
| 1709 } // namespace net | 1715 } // namespace net |
| OLD | NEW |