| 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/quic/core/quic_multipath_sent_packet_manager.h" | 5 #include "net/quic/core/quic_multipath_sent_packet_manager.h" |
| 6 | 6 |
| 7 #include <cstdint> | 7 #include <cstdint> |
| 8 | 8 |
| 9 #include "base/strings/string_number_conversions.h" | |
| 10 #include "net/quic/core/quic_bug_tracker.h" | 9 #include "net/quic/core/quic_bug_tracker.h" |
| 11 #include "net/quic/platform/api/quic_str_cat.h" | 10 #include "net/quic/platform/api/quic_str_cat.h" |
| 12 | 11 |
| 13 using std::string; | 12 using std::string; |
| 14 | 13 |
| 15 namespace net { | 14 namespace net { |
| 16 | 15 |
| 17 QuicMultipathSentPacketManager::QuicMultipathSentPacketManager( | 16 QuicMultipathSentPacketManager::QuicMultipathSentPacketManager( |
| 18 QuicSentPacketManagerInterface* manager, | 17 QuicSentPacketManagerInterface* manager, |
| 19 QuicConnectionCloseDelegateInterface* delegate) | 18 QuicConnectionCloseDelegateInterface* delegate) |
| (...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 320 string debug_state_by_path; | 319 string debug_state_by_path; |
| 321 for (size_t i = 0; i < path_managers_info_.size(); ++i) { | 320 for (size_t i = 0; i < path_managers_info_.size(); ++i) { |
| 322 if (path_managers_info_[i].manager == nullptr || | 321 if (path_managers_info_[i].manager == nullptr || |
| 323 path_managers_info_[i].state != ACTIVE) { | 322 path_managers_info_[i].state != ACTIVE) { |
| 324 continue; | 323 continue; |
| 325 } | 324 } |
| 326 const string& debug_state = path_managers_info_[i].manager->GetDebugState(); | 325 const string& debug_state = path_managers_info_[i].manager->GetDebugState(); |
| 327 if (debug_state.empty()) { | 326 if (debug_state.empty()) { |
| 328 continue; | 327 continue; |
| 329 } | 328 } |
| 330 debug_state_by_path = | 329 debug_state_by_path = QuicStrCat( |
| 331 debug_state_by_path + "[" + base::IntToString(i) + "]:" + debug_state; | 330 debug_state_by_path, "[", i, "]:", debug_state); |
| 332 } | 331 } |
| 333 return debug_state_by_path; | 332 return debug_state_by_path; |
| 334 } | 333 } |
| 335 | 334 |
| 336 void QuicMultipathSentPacketManager::CancelRetransmissionsForStream( | 335 void QuicMultipathSentPacketManager::CancelRetransmissionsForStream( |
| 337 QuicStreamId stream_id) { | 336 QuicStreamId stream_id) { |
| 338 for (PathSentPacketManagerInfo path_manager_info : path_managers_info_) { | 337 for (PathSentPacketManagerInfo path_manager_info : path_managers_info_) { |
| 339 if (path_manager_info.manager != nullptr) { | 338 if (path_manager_info.manager != nullptr) { |
| 340 path_manager_info.manager->CancelRetransmissionsForStream(stream_id); | 339 path_manager_info.manager->CancelRetransmissionsForStream(stream_id); |
| 341 } | 340 } |
| (...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 527 const { | 526 const { |
| 528 QuicSentPacketManagerInterface* path_manager = | 527 QuicSentPacketManagerInterface* path_manager = |
| 529 MaybeGetSentPacketManagerForActivePath(kDefaultPathId); | 528 MaybeGetSentPacketManagerForActivePath(kDefaultPathId); |
| 530 if (path_manager == nullptr) { | 529 if (path_manager == nullptr) { |
| 531 return nullptr; | 530 return nullptr; |
| 532 } | 531 } |
| 533 return path_manager->GetSendAlgorithm(); | 532 return path_manager->GetSendAlgorithm(); |
| 534 } | 533 } |
| 535 | 534 |
| 536 } // namespace net | 535 } // namespace net |
| OLD | NEW |