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 |
122 bool QuicStreamFactoryPeer::CryptoConfigCacheIsEmpty( | 136 bool QuicStreamFactoryPeer::CryptoConfigCacheIsEmpty( |
123 QuicStreamFactory* factory, | 137 QuicStreamFactory* factory, |
124 const QuicServerId& quic_server_id) { | 138 const QuicServerId& quic_server_id) { |
125 return factory->CryptoConfigCacheIsEmpty(quic_server_id); | 139 return factory->CryptoConfigCacheIsEmpty(quic_server_id); |
126 } | 140 } |
127 | 141 |
128 void QuicStreamFactoryPeer::CacheDummyServerConfig( | 142 void QuicStreamFactoryPeer::CacheDummyServerConfig( |
129 QuicStreamFactory* factory, | 143 QuicStreamFactory* factory, |
130 const QuicServerId& quic_server_id) { | 144 const QuicServerId& quic_server_id) { |
131 // Minimum SCFG that passes config validation checks. | 145 // Minimum SCFG that passes config validation checks. |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
177 } | 191 } |
178 | 192 |
179 void QuicStreamFactoryPeer::SetAlarmFactory( | 193 void QuicStreamFactoryPeer::SetAlarmFactory( |
180 QuicStreamFactory* factory, | 194 QuicStreamFactory* factory, |
181 std::unique_ptr<QuicAlarmFactory> alarm_factory) { | 195 std::unique_ptr<QuicAlarmFactory> alarm_factory) { |
182 factory->alarm_factory_ = std::move(alarm_factory); | 196 factory->alarm_factory_ = std::move(alarm_factory); |
183 } | 197 } |
184 | 198 |
185 } // namespace test | 199 } // namespace test |
186 } // namespace net | 200 } // namespace net |
OLD | NEW |