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/test_tools/crypto_test_utils.h" | 5 #include "net/quic/test_tools/crypto_test_utils.h" |
6 | 6 |
7 #include "net/quic/crypto/channel_id.h" | 7 #include "net/quic/crypto/channel_id.h" |
8 #include "net/quic/crypto/common_cert_set.h" | 8 #include "net/quic/crypto/common_cert_set.h" |
9 #include "net/quic/crypto/crypto_handshake.h" | 9 #include "net/quic/crypto/crypto_handshake.h" |
10 #include "net/quic/crypto/quic_crypto_server_config.h" | 10 #include "net/quic/crypto/quic_crypto_server_config.h" |
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
325 << " packets a->b"; | 325 << " packets a->b"; |
326 MovePackets(a_conn, &a_i, b, b_conn); | 326 MovePackets(a_conn, &a_i, b, b_conn); |
327 | 327 |
328 VLOG(1) << "Processing " << b_conn->encrypted_packets_.size() - b_i | 328 VLOG(1) << "Processing " << b_conn->encrypted_packets_.size() - b_i |
329 << " packets b->a"; | 329 << " packets b->a"; |
330 if (b_conn->encrypted_packets_.size() - b_i == 2) { | 330 if (b_conn->encrypted_packets_.size() - b_i == 2) { |
331 VLOG(1) << "here"; | 331 VLOG(1) << "here"; |
332 } | 332 } |
333 MovePackets(b_conn, &b_i, a, a_conn); | 333 MovePackets(b_conn, &b_i, a, a_conn); |
334 | 334 |
335 return make_pair(a_i, b_i); | 335 return std::make_pair(a_i, b_i); |
336 } | 336 } |
337 | 337 |
338 // static | 338 // static |
339 string CryptoTestUtils::GetValueForTag(const CryptoHandshakeMessage& message, | 339 string CryptoTestUtils::GetValueForTag(const CryptoHandshakeMessage& message, |
340 QuicTag tag) { | 340 QuicTag tag) { |
341 QuicTagValueMap::const_iterator it = message.tag_value_map().find(tag); | 341 QuicTagValueMap::const_iterator it = message.tag_value_map().find(tag); |
342 if (it == message.tag_value_map().end()) { | 342 if (it == message.tag_value_map().end()) { |
343 return string(); | 343 return string(); |
344 } | 344 } |
345 return it->second; | 345 return it->second; |
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
624 scoped_ptr<QuicData> bytes(CryptoFramer::ConstructHandshakeMessage(msg)); | 624 scoped_ptr<QuicData> bytes(CryptoFramer::ConstructHandshakeMessage(msg)); |
625 scoped_ptr<CryptoHandshakeMessage> parsed( | 625 scoped_ptr<CryptoHandshakeMessage> parsed( |
626 CryptoFramer::ParseMessage(bytes->AsStringPiece())); | 626 CryptoFramer::ParseMessage(bytes->AsStringPiece())); |
627 CHECK(parsed.get()); | 627 CHECK(parsed.get()); |
628 | 628 |
629 return *parsed; | 629 return *parsed; |
630 } | 630 } |
631 | 631 |
632 } // namespace test | 632 } // namespace test |
633 } // namespace net | 633 } // namespace net |
OLD | NEW |