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 "jingle/glue/pseudotcp_adapter.h" | 5 #include "jingle/glue/pseudotcp_adapter.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
135 FROM_HERE, | 135 FROM_HERE, |
136 base::Bind(&FakeSocket::AppendInputPacket, | 136 base::Bind(&FakeSocket::AppendInputPacket, |
137 base::Unretained(peer_socket_), | 137 base::Unretained(peer_socket_), |
138 std::vector<char>(buf->data(), buf->data() + buf_len)), | 138 std::vector<char>(buf->data(), buf->data() + buf_len)), |
139 base::TimeDelta::FromMilliseconds(latency_ms_)); | 139 base::TimeDelta::FromMilliseconds(latency_ms_)); |
140 } | 140 } |
141 | 141 |
142 return buf_len; | 142 return buf_len; |
143 } | 143 } |
144 | 144 |
145 virtual bool SetReceiveBufferSize(int32 size) OVERRIDE { | 145 virtual int SetReceiveBufferSize(int32 size) OVERRIDE { |
146 NOTIMPLEMENTED(); | 146 NOTIMPLEMENTED(); |
147 return false; | 147 return net::ERR_NOT_IMPLEMENTED; |
148 } | 148 } |
149 virtual bool SetSendBufferSize(int32 size) OVERRIDE { | 149 virtual int SetSendBufferSize(int32 size) OVERRIDE { |
150 NOTIMPLEMENTED(); | 150 NOTIMPLEMENTED(); |
151 return false; | 151 return net::ERR_NOT_IMPLEMENTED; |
152 } | 152 } |
153 | 153 |
154 private: | 154 private: |
155 scoped_refptr<net::IOBuffer> read_buffer_; | 155 scoped_refptr<net::IOBuffer> read_buffer_; |
156 int read_buffer_size_; | 156 int read_buffer_size_; |
157 net::CompletionCallback read_callback_; | 157 net::CompletionCallback read_callback_; |
158 | 158 |
159 std::deque<std::vector<char> > incoming_packets_; | 159 std::deque<std::vector<char> > incoming_packets_; |
160 | 160 |
161 FakeSocket* peer_socket_; | 161 FakeSocket* peer_socket_; |
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
433 client_pseudotcp_.get()); | 433 client_pseudotcp_.get()); |
434 | 434 |
435 tester->Start(); | 435 tester->Start(); |
436 message_loop_.Run(); | 436 message_loop_.Run(); |
437 tester->CheckResults(); | 437 tester->CheckResults(); |
438 } | 438 } |
439 | 439 |
440 } // namespace | 440 } // namespace |
441 | 441 |
442 } // namespace jingle_glue | 442 } // namespace jingle_glue |
OLD | NEW |