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/test_tools/quic_stream_factory_peer.h" | 5 #include "net/quic/test_tools/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 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
190 DCHECK(cert); | 190 DCHECK(cert); |
191 std::string der_bytes; | 191 std::string der_bytes; |
192 DCHECK(X509Certificate::GetDEREncoded(cert->os_cert_handle(), &der_bytes)); | 192 DCHECK(X509Certificate::GetDEREncoded(cert->os_cert_handle(), &der_bytes)); |
193 certs.push_back(der_bytes); | 193 certs.push_back(der_bytes); |
194 | 194 |
195 QuicCryptoClientConfig* crypto_config = &factory->crypto_config_; | 195 QuicCryptoClientConfig* crypto_config = &factory->crypto_config_; |
196 QuicCryptoClientConfig::CachedState* cached = | 196 QuicCryptoClientConfig::CachedState* cached = |
197 crypto_config->LookupOrCreate(quic_server_id); | 197 crypto_config->LookupOrCreate(quic_server_id); |
198 QuicClock clock; | 198 QuicClock clock; |
199 cached->Initialize(server_config, source_address_token, certs, "", "", | 199 cached->Initialize(server_config, source_address_token, certs, "", "", |
200 signature, clock.WallNow()); | 200 signature, clock.WallNow(), QuicWallTime::Zero()); |
201 DCHECK(!cached->certs().empty()); | 201 DCHECK(!cached->certs().empty()); |
202 } | 202 } |
203 | 203 |
204 QuicClientPushPromiseIndex* QuicStreamFactoryPeer::GetPushPromiseIndex( | 204 QuicClientPushPromiseIndex* QuicStreamFactoryPeer::GetPushPromiseIndex( |
205 QuicStreamFactory* factory) { | 205 QuicStreamFactory* factory) { |
206 return &factory->push_promise_index_; | 206 return &factory->push_promise_index_; |
207 } | 207 } |
208 | 208 |
209 int QuicStreamFactoryPeer::GetNumPushStreamsCreated( | 209 int QuicStreamFactoryPeer::GetNumPushStreamsCreated( |
210 QuicStreamFactory* factory) { | 210 QuicStreamFactory* factory) { |
211 return factory->num_push_streams_created_; | 211 return factory->num_push_streams_created_; |
212 } | 212 } |
213 | 213 |
214 } // namespace test | 214 } // namespace test |
215 } // namespace net | 215 } // namespace net |
OLD | NEW |