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

Side by Side Diff: net/quic/test_tools/mock_crypto_client_stream.cc

Issue 763833003: Remove using namespace in net/quic/quic_stream_sequencer.h (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years 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
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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/mock_crypto_client_stream.h" 5 #include "net/quic/test_tools/mock_crypto_client_stream.h"
6 6
7 #include <string>
8
7 #include "net/quic/crypto/quic_decrypter.h" 9 #include "net/quic/crypto/quic_decrypter.h"
8 #include "net/quic/quic_client_session_base.h" 10 #include "net/quic/quic_client_session_base.h"
9 #include "net/quic/quic_server_id.h" 11 #include "net/quic/quic_server_id.h"
10 #include "testing/gtest/include/gtest/gtest.h" 12 #include "testing/gtest/include/gtest/gtest.h"
11 13
12 namespace net { 14 namespace net {
13 15
14 MockCryptoClientStream::MockCryptoClientStream( 16 MockCryptoClientStream::MockCryptoClientStream(
15 const QuicServerId& server_id, 17 const QuicServerId& server_id,
16 QuicClientSessionBase* session, 18 QuicClientSessionBase* session,
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 cgst.push_back(kQBIC); 90 cgst.push_back(kQBIC);
89 session()->config()->SetCongestionFeedback(cgst, kQBIC); 91 session()->config()->SetCongestionFeedback(cgst, kQBIC);
90 session()->config()->SetIdleConnectionStateLifetime( 92 session()->config()->SetIdleConnectionStateLifetime(
91 QuicTime::Delta::FromSeconds(2 * kMaximumIdleTimeoutSecs), 93 QuicTime::Delta::FromSeconds(2 * kMaximumIdleTimeoutSecs),
92 QuicTime::Delta::FromSeconds(kMaximumIdleTimeoutSecs)); 94 QuicTime::Delta::FromSeconds(kMaximumIdleTimeoutSecs));
93 session()->config()->SetMaxStreamsPerConnection( 95 session()->config()->SetMaxStreamsPerConnection(
94 2 * kDefaultMaxStreamsPerConnection, kDefaultMaxStreamsPerConnection); 96 2 * kDefaultMaxStreamsPerConnection, kDefaultMaxStreamsPerConnection);
95 97
96 CryptoHandshakeMessage msg; 98 CryptoHandshakeMessage msg;
97 session()->config()->ToHandshakeMessage(&msg); 99 session()->config()->ToHandshakeMessage(&msg);
98 string error_details; 100 std::string error_details;
99 const QuicErrorCode error = 101 const QuicErrorCode error =
100 session()->config()->ProcessPeerHello(msg, CLIENT, &error_details); 102 session()->config()->ProcessPeerHello(msg, CLIENT, &error_details);
101 ASSERT_EQ(QUIC_NO_ERROR, error); 103 ASSERT_EQ(QUIC_NO_ERROR, error);
102 ASSERT_TRUE(session()->config()->negotiated()); 104 ASSERT_TRUE(session()->config()->negotiated());
103 session()->OnConfigNegotiated(); 105 session()->OnConfigNegotiated();
104 } 106 }
105 107
106 QuicClientSessionBase* MockCryptoClientStream::client_session() { 108 QuicClientSessionBase* MockCryptoClientStream::client_session() {
107 return reinterpret_cast<QuicClientSessionBase*>(session()); 109 return reinterpret_cast<QuicClientSessionBase*>(session());
108 } 110 }
109 111
110 } // namespace net 112 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698