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

Side by Side Diff: remoting/protocol/connection_tester.h

Issue 1864213002: Convert //remoting to use std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Mac IWYU Created 4 years, 8 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
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 #ifndef REMOTING_PROTOCOL_CONNECTION_TESTER_H_ 5 #ifndef REMOTING_PROTOCOL_CONNECTION_TESTER_H_
6 #define REMOTING_PROTOCOL_CONNECTION_TESTER_H_ 6 #define REMOTING_PROTOCOL_CONNECTION_TESTER_H_
7 7
8 #include <list> 8 #include <list>
9 #include <memory>
9 #include <vector> 10 #include <vector>
10 11
11 #include "base/memory/ref_counted.h" 12 #include "base/memory/ref_counted.h"
12 #include "base/memory/scoped_ptr.h"
13 #include "base/run_loop.h" 13 #include "base/run_loop.h"
14 14
15 namespace base { 15 namespace base {
16 class MessageLoop; 16 class MessageLoop;
17 } // namespace base 17 } // namespace base
18 18
19 namespace net { 19 namespace net {
20 class DrainableIOBuffer; 20 class DrainableIOBuffer;
21 class GrowableIOBuffer; 21 class GrowableIOBuffer;
22 class IOBuffer; 22 class IOBuffer;
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 public: 116 public:
117 MessagePipeConnectionTester(MessagePipe* client_pipe, 117 MessagePipeConnectionTester(MessagePipe* client_pipe,
118 MessagePipe* host_pipe, 118 MessagePipe* host_pipe,
119 int message_size, 119 int message_size,
120 int message_count); 120 int message_count);
121 ~MessagePipeConnectionTester(); 121 ~MessagePipeConnectionTester();
122 122
123 void RunAndCheckResults(); 123 void RunAndCheckResults();
124 124
125 protected: 125 protected:
126 void OnMessageReceived(scoped_ptr<CompoundBuffer> message); 126 void OnMessageReceived(std::unique_ptr<CompoundBuffer> message);
127 127
128 private: 128 private:
129 base::RunLoop run_loop_; 129 base::RunLoop run_loop_;
130 MessagePipe* host_pipe_; 130 MessagePipe* host_pipe_;
131 MessagePipe* client_pipe_; 131 MessagePipe* client_pipe_;
132 int message_size_; 132 int message_size_;
133 int message_count_; 133 int message_count_;
134 134
135 std::vector<scoped_ptr<VideoPacket>> sent_messages_; 135 std::vector<std::unique_ptr<VideoPacket>> sent_messages_;
136 std::vector<scoped_ptr<VideoPacket>> received_messages_; 136 std::vector<std::unique_ptr<VideoPacket>> received_messages_;
137 }; 137 };
138 138
139 } // namespace protocol 139 } // namespace protocol
140 } // namespace remoting 140 } // namespace remoting
141 141
142 #endif // REMOTING_PROTOCOL_CONNECTION_TESTER_H_ 142 #endif // REMOTING_PROTOCOL_CONNECTION_TESTER_H_
OLDNEW
« no previous file with comments | « remoting/protocol/client_video_dispatcher_unittest.cc ('k') | remoting/protocol/connection_tester.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698