OLD | NEW |
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 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 | 112 |
113 size_t QuicStreamFactoryPeer::GetNumberOfActiveJobs( | 113 size_t QuicStreamFactoryPeer::GetNumberOfActiveJobs( |
114 QuicStreamFactory* factory, | 114 QuicStreamFactory* factory, |
115 const QuicServerId& server_id) { | 115 const QuicServerId& server_id) { |
116 auto it = factory->active_jobs_.find(server_id); | 116 auto it = factory->active_jobs_.find(server_id); |
117 if (it == factory->active_jobs_.end()) | 117 if (it == factory->active_jobs_.end()) |
118 return 0; | 118 return 0; |
119 return it->second.size(); | 119 return it->second.size(); |
120 } | 120 } |
121 | 121 |
122 void QuicStreamFactoryPeer::MaybeInitialize(QuicStreamFactory* factory) { | |
123 factory->MaybeInitialize(); | |
124 } | |
125 | |
126 bool QuicStreamFactoryPeer::HasInitializedData(QuicStreamFactory* factory) { | |
127 return factory->has_initialized_data_; | |
128 } | |
129 | |
130 bool QuicStreamFactoryPeer::SupportsQuicAtStartUp(QuicStreamFactory* factory, | |
131 HostPortPair host_port_pair) { | |
132 return base::ContainsKey(factory->quic_supported_servers_at_startup_, | |
133 host_port_pair); | |
134 } | |
135 | |
136 bool QuicStreamFactoryPeer::CryptoConfigCacheIsEmpty( | 122 bool QuicStreamFactoryPeer::CryptoConfigCacheIsEmpty( |
137 QuicStreamFactory* factory, | 123 QuicStreamFactory* factory, |
138 const QuicServerId& quic_server_id) { | 124 const QuicServerId& quic_server_id) { |
139 return factory->CryptoConfigCacheIsEmpty(quic_server_id); | 125 return factory->CryptoConfigCacheIsEmpty(quic_server_id); |
140 } | 126 } |
141 | 127 |
142 void QuicStreamFactoryPeer::CacheDummyServerConfig( | 128 void QuicStreamFactoryPeer::CacheDummyServerConfig( |
143 QuicStreamFactory* factory, | 129 QuicStreamFactory* factory, |
144 const QuicServerId& quic_server_id) { | 130 const QuicServerId& quic_server_id) { |
145 // Minimum SCFG that passes config validation checks. | 131 // Minimum SCFG that passes config validation checks. |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
191 } | 177 } |
192 | 178 |
193 void QuicStreamFactoryPeer::SetAlarmFactory( | 179 void QuicStreamFactoryPeer::SetAlarmFactory( |
194 QuicStreamFactory* factory, | 180 QuicStreamFactory* factory, |
195 std::unique_ptr<QuicAlarmFactory> alarm_factory) { | 181 std::unique_ptr<QuicAlarmFactory> alarm_factory) { |
196 factory->alarm_factory_ = std::move(alarm_factory); | 182 factory->alarm_factory_ = std::move(alarm_factory); |
197 } | 183 } |
198 | 184 |
199 } // namespace test | 185 } // namespace test |
200 } // namespace net | 186 } // namespace net |
OLD | NEW |