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

Side by Side Diff: jingle/glue/pseudotcp_adapter_unittest.cc

Issue 9572038: Convert uses of int ms to TimeDelta in jingle and remoting. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fix nits. Created 8 years, 9 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
« no previous file with comments | « no previous file | jingle/glue/thread_wrapper_unittest.cc » ('j') | 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 134
135 virtual int Write(net::IOBuffer* buf, int buf_len, 135 virtual int Write(net::IOBuffer* buf, int buf_len,
136 const net::CompletionCallback& callback) OVERRIDE { 136 const net::CompletionCallback& callback) OVERRIDE {
137 DCHECK(buf); 137 DCHECK(buf);
138 if (peer_socket_) { 138 if (peer_socket_) {
139 MessageLoop::current()->PostDelayedTask( 139 MessageLoop::current()->PostDelayedTask(
140 FROM_HERE, 140 FROM_HERE,
141 base::Bind(&FakeSocket::AppendInputPacket, 141 base::Bind(&FakeSocket::AppendInputPacket,
142 base::Unretained(peer_socket_), 142 base::Unretained(peer_socket_),
143 std::vector<char>(buf->data(), buf->data() + buf_len)), 143 std::vector<char>(buf->data(), buf->data() + buf_len)),
144 latency_ms_); 144 base::TimeDelta::FromMilliseconds(latency_ms_));
145 } 145 }
146 146
147 return buf_len; 147 return buf_len;
148 } 148 }
149 149
150 virtual bool SetReceiveBufferSize(int32 size) OVERRIDE { 150 virtual bool SetReceiveBufferSize(int32 size) OVERRIDE {
151 NOTIMPLEMENTED(); 151 NOTIMPLEMENTED();
152 return false; 152 return false;
153 } 153 }
154 virtual bool SetSendBufferSize(int32 size) OVERRIDE { 154 virtual bool SetSendBufferSize(int32 size) OVERRIDE {
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after
403 base::Unretained(&host_delete))); 403 base::Unretained(&host_delete)));
404 client_pseudotcp_->Connect(client_connect_cb.callback()); 404 client_pseudotcp_->Connect(client_connect_cb.callback());
405 message_loop_.Run(); 405 message_loop_.Run();
406 406
407 ASSERT_EQ(NULL, host_pseudotcp_.get()); 407 ASSERT_EQ(NULL, host_pseudotcp_.get());
408 } 408 }
409 409
410 } // namespace 410 } // namespace
411 411
412 } // namespace jingle_glue 412 } // namespace jingle_glue
OLDNEW
« no previous file with comments | « no previous file | jingle/glue/thread_wrapper_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698