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

Side by Side Diff: net/quic/chromium/quic_stream_factory_peer.cc

Issue 2842883002: Change QuicStreamFactory::active_jobs_ to a Map from QuicServerId to Job (Closed)
Patch Set: Created 3 years, 8 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
« no previous file with comments | « net/quic/chromium/quic_stream_factory.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/chromium/quic_stream_factory_peer.h" 5 #include "net/quic/chromium/quic_stream_factory_peer.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "net/cert/x509_certificate.h" 10 #include "net/cert/x509_certificate.h"
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 int yield_after_packets) { 97 int yield_after_packets) {
98 factory->yield_after_packets_ = yield_after_packets; 98 factory->yield_after_packets_ = yield_after_packets;
99 } 99 }
100 100
101 void QuicStreamFactoryPeer::SetYieldAfterDuration( 101 void QuicStreamFactoryPeer::SetYieldAfterDuration(
102 QuicStreamFactory* factory, 102 QuicStreamFactory* factory,
103 QuicTime::Delta yield_after_duration) { 103 QuicTime::Delta yield_after_duration) {
104 factory->yield_after_duration_ = yield_after_duration; 104 factory->yield_after_duration_ = yield_after_duration;
105 } 105 }
106 106
107 size_t QuicStreamFactoryPeer::GetNumberOfActiveJobs(
108 QuicStreamFactory* factory,
109 const QuicServerId& server_id) {
110 auto it = factory->active_jobs_.find(server_id);
111 if (it == factory->active_jobs_.end())
112 return 0;
113 return it->second.size();
114 }
115
116 bool QuicStreamFactoryPeer::CryptoConfigCacheIsEmpty( 107 bool QuicStreamFactoryPeer::CryptoConfigCacheIsEmpty(
117 QuicStreamFactory* factory, 108 QuicStreamFactory* factory,
118 const QuicServerId& quic_server_id) { 109 const QuicServerId& quic_server_id) {
119 return factory->CryptoConfigCacheIsEmpty(quic_server_id); 110 return factory->CryptoConfigCacheIsEmpty(quic_server_id);
120 } 111 }
121 112
122 void QuicStreamFactoryPeer::CacheDummyServerConfig( 113 void QuicStreamFactoryPeer::CacheDummyServerConfig(
123 QuicStreamFactory* factory, 114 QuicStreamFactory* factory,
124 const QuicServerId& quic_server_id) { 115 const QuicServerId& quic_server_id) {
125 // Minimum SCFG that passes config validation checks. 116 // Minimum SCFG that passes config validation checks.
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 } 162 }
172 163
173 void QuicStreamFactoryPeer::SetAlarmFactory( 164 void QuicStreamFactoryPeer::SetAlarmFactory(
174 QuicStreamFactory* factory, 165 QuicStreamFactory* factory,
175 std::unique_ptr<QuicAlarmFactory> alarm_factory) { 166 std::unique_ptr<QuicAlarmFactory> alarm_factory) {
176 factory->alarm_factory_ = std::move(alarm_factory); 167 factory->alarm_factory_ = std::move(alarm_factory);
177 } 168 }
178 169
179 } // namespace test 170 } // namespace test
180 } // namespace net 171 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/chromium/quic_stream_factory.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698