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 <string> | 5 #include <string> |
6 | 6 |
7 #include "base/memory/scoped_ptr.h" | 7 #include "base/memory/scoped_ptr.h" |
8 #include "base/message_loop/message_loop.h" | 8 #include "base/message_loop/message_loop.h" |
9 #include "blimp/common/create_blimp_message.h" | 9 #include "blimp/common/create_blimp_message.h" |
10 #include "blimp/common/proto/blimp_message.pb.h" | 10 #include "blimp/common/proto/blimp_message.pb.h" |
(...skipping 24 matching lines...) Expand all Loading... |
35 engine_.reset(new TCPEngineTransport(local_address, nullptr)); | 35 engine_.reset(new TCPEngineTransport(local_address, nullptr)); |
36 } | 36 } |
37 | 37 |
38 net::AddressList GetLocalAddressList() const { | 38 net::AddressList GetLocalAddressList() const { |
39 net::IPEndPoint local_address; | 39 net::IPEndPoint local_address; |
40 engine_->GetLocalAddressForTesting(&local_address); | 40 engine_->GetLocalAddressForTesting(&local_address); |
41 return net::AddressList(local_address); | 41 return net::AddressList(local_address); |
42 } | 42 } |
43 | 43 |
44 void ParseAddress(const std::string& ip_str, | 44 void ParseAddress(const std::string& ip_str, |
45 uint16 port, | 45 uint16_t port, |
46 net::IPEndPoint* address) { | 46 net::IPEndPoint* address) { |
47 net::IPAddressNumber ip_number; | 47 net::IPAddressNumber ip_number; |
48 bool rv = net::ParseIPLiteralToNumber(ip_str, &ip_number); | 48 bool rv = net::ParseIPLiteralToNumber(ip_str, &ip_number); |
49 if (!rv) | 49 if (!rv) |
50 return; | 50 return; |
51 *address = net::IPEndPoint(ip_number, port); | 51 *address = net::IPEndPoint(ip_number, port); |
52 } | 52 } |
53 | 53 |
54 base::MessageLoopForIO message_loop_; | 54 base::MessageLoopForIO message_loop_; |
55 scoped_ptr<TCPEngineTransport> engine_; | 55 scoped_ptr<TCPEngineTransport> engine_; |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
145 // Client sends the second message. | 145 // Client sends the second message. |
146 net::TestCompletionCallback client_send_callback2; | 146 net::TestCompletionCallback client_send_callback2; |
147 client_connnection->GetOutgoingMessageProcessor()->ProcessMessage( | 147 client_connnection->GetOutgoingMessageProcessor()->ProcessMessage( |
148 std::move(client_message2), client_send_callback2.callback()); | 148 std::move(client_message2), client_send_callback2.callback()); |
149 EXPECT_EQ(net::OK, client_send_callback2.WaitForResult()); | 149 EXPECT_EQ(net::OK, client_send_callback2.WaitForResult()); |
150 } | 150 } |
151 | 151 |
152 } // namespace | 152 } // namespace |
153 | 153 |
154 } // namespace blimp | 154 } // namespace blimp |
OLD | NEW |