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

Side by Side Diff: net/tools/quic/quic_dispatcher_test.cc

Issue 304623002: clang_tidy: remove redundant .get() calls on smart ptrs (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 months 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 | Annotate | Revision Log
« no previous file with comments | « net/quic/reliable_quic_stream_test.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/tools/quic/quic_dispatcher.h" 5 #include "net/tools/quic/quic_dispatcher.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/strings/string_piece.h" 9 #include "base/strings/string_piece.h"
10 #include "net/quic/crypto/crypto_handshake.h" 10 #include "net/quic/crypto/crypto_handshake.h"
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 return reinterpret_cast<MockConnection*>(session2_->connection()); 117 return reinterpret_cast<MockConnection*>(session2_->connection());
118 } 118 }
119 119
120 void ProcessPacket(IPEndPoint client_address, 120 void ProcessPacket(IPEndPoint client_address,
121 QuicConnectionId connection_id, 121 QuicConnectionId connection_id,
122 bool has_version_flag, 122 bool has_version_flag,
123 const string& data) { 123 const string& data) {
124 scoped_ptr<QuicEncryptedPacket> packet(ConstructEncryptedPacket( 124 scoped_ptr<QuicEncryptedPacket> packet(ConstructEncryptedPacket(
125 connection_id, has_version_flag, false, 1, data)); 125 connection_id, has_version_flag, false, 1, data));
126 data_ = string(packet->data(), packet->length()); 126 data_ = string(packet->data(), packet->length());
127 dispatcher_.ProcessPacket(server_address_, client_address, *packet.get()); 127 dispatcher_.ProcessPacket(server_address_, client_address, *packet);
128 } 128 }
129 129
130 void ValidatePacket(const QuicEncryptedPacket& packet) { 130 void ValidatePacket(const QuicEncryptedPacket& packet) {
131 EXPECT_EQ(data_.length(), packet.AsStringPiece().length()); 131 EXPECT_EQ(data_.length(), packet.AsStringPiece().length());
132 EXPECT_EQ(data_, packet.AsStringPiece()); 132 EXPECT_EQ(data_, packet.AsStringPiece());
133 } 133 }
134 134
135 EpollServer eps_; 135 EpollServer eps_;
136 QuicConfig config_; 136 QuicConfig config_;
137 QuicCryptoServerConfig crypto_config_; 137 QuicCryptoServerConfig crypto_config_;
(...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after
494 // And we'll resume where we left off when we get another call. 494 // And we'll resume where we left off when we get another call.
495 EXPECT_CALL(*connection2(), OnCanWrite()); 495 EXPECT_CALL(*connection2(), OnCanWrite());
496 dispatcher_.OnCanWrite(); 496 dispatcher_.OnCanWrite();
497 EXPECT_FALSE(dispatcher_.HasPendingWrites()); 497 EXPECT_FALSE(dispatcher_.HasPendingWrites());
498 } 498 }
499 499
500 } // namespace 500 } // namespace
501 } // namespace test 501 } // namespace test
502 } // namespace tools 502 } // namespace tools
503 } // namespace net 503 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/reliable_quic_stream_test.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698