summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--jingle/glue/pseudotcp_adapter_unittest.cc4
-rw-r--r--jingle/glue/thread_wrapper_unittest.cc12
-rw-r--r--remoting/client/plugin/chromoting_instance.cc4
-rw-r--r--remoting/host/policy_hack/nat_policy.cc2
-rw-r--r--remoting/jingle_glue/iq_sender.cc2
-rw-r--r--remoting/jingle_glue/jingle_thread_unittest.cc4
-rw-r--r--remoting/protocol/connection_tester.cc8
7 files changed, 20 insertions, 16 deletions
diff --git a/jingle/glue/pseudotcp_adapter_unittest.cc b/jingle/glue/pseudotcp_adapter_unittest.cc
index 84d3b56..fd070e6 100644
--- a/jingle/glue/pseudotcp_adapter_unittest.cc
+++ b/jingle/glue/pseudotcp_adapter_unittest.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -141,7 +141,7 @@ class FakeSocket : public net::Socket {
base::Bind(&FakeSocket::AppendInputPacket,
base::Unretained(peer_socket_),
std::vector<char>(buf->data(), buf->data() + buf_len)),
- latency_ms_);
+ base::TimeDelta::FromMilliseconds(latency_ms_));
}
return buf_len;
diff --git a/jingle/glue/thread_wrapper_unittest.cc b/jingle/glue/thread_wrapper_unittest.cc
index 2fef6d3..41df41c 100644
--- a/jingle/glue/thread_wrapper_unittest.cc
+++ b/jingle/glue/thread_wrapper_unittest.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -147,8 +147,9 @@ TEST_F(ThreadWrapperTest, PostDelayed) {
MatchMessage(&handler2_, kTestMessage1, data4)))
.WillOnce(DeleteMessageData());
- message_loop_.PostDelayedTask(FROM_HERE, MessageLoop::QuitClosure(),
- kMaxTestDelay);
+ message_loop_.PostDelayedTask(
+ FROM_HERE, MessageLoop::QuitClosure(),
+ base::TimeDelta::FromMilliseconds(kMaxTestDelay));
message_loop_.Run();
}
@@ -197,8 +198,9 @@ TEST_F(ThreadWrapperTest, ClearDelayed) {
MatchMessage(&handler2_, kTestMessage1, null_data)))
.WillOnce(DeleteMessageData());
- message_loop_.PostDelayedTask(FROM_HERE, MessageLoop::QuitClosure(),
- kMaxTestDelay);
+ message_loop_.PostDelayedTask(
+ FROM_HERE, MessageLoop::QuitClosure(),
+ base::TimeDelta::FromMilliseconds(kMaxTestDelay));
message_loop_.Run();
}
diff --git a/remoting/client/plugin/chromoting_instance.cc b/remoting/client/plugin/chromoting_instance.cc
index 44796db..fac4d75 100644
--- a/remoting/client/plugin/chromoting_instance.cc
+++ b/remoting/client/plugin/chromoting_instance.cc
@@ -361,7 +361,7 @@ void ChromotingInstance::Connect(const ClientConfig& config) {
// Start timer that periodically sends perf stats.
plugin_message_loop_->PostDelayedTask(
FROM_HERE, base::Bind(&ChromotingInstance::SendPerfStats, AsWeakPtr()),
- kPerfStatsIntervalMs);
+ base::TimeDelta::FromMilliseconds(kPerfStatsIntervalMs));
VLOG(1) << "Connection status: Initializing";
SetConnectionState(STATE_INITIALIZING, ERROR_NONE);
@@ -431,7 +431,7 @@ void ChromotingInstance::SendPerfStats() {
plugin_message_loop_->PostDelayedTask(
FROM_HERE, base::Bind(&ChromotingInstance::SendPerfStats, AsWeakPtr()),
- kPerfStatsIntervalMs);
+ base::TimeDelta::FromMilliseconds(kPerfStatsIntervalMs));
scoped_ptr<base::DictionaryValue> data(new base::DictionaryValue());
ChromotingStats* stats = client_->GetStats();
diff --git a/remoting/host/policy_hack/nat_policy.cc b/remoting/host/policy_hack/nat_policy.cc
index 631550b..bccc509 100644
--- a/remoting/host/policy_hack/nat_policy.cc
+++ b/remoting/host/policy_hack/nat_policy.cc
@@ -77,7 +77,7 @@ void NatPolicy::ScheduleReloadTask(const base::TimeDelta& delay) {
message_loop_proxy_->PostDelayedTask(
FROM_HERE,
base::Bind(&NatPolicy::Reload, weak_factory_.GetWeakPtr()),
- delay.InMilliseconds());
+ delay);
}
bool NatPolicy::OnPolicyThread() const {
diff --git a/remoting/jingle_glue/iq_sender.cc b/remoting/jingle_glue/iq_sender.cc
index c3b19b8..6bc7810 100644
--- a/remoting/jingle_glue/iq_sender.cc
+++ b/remoting/jingle_glue/iq_sender.cc
@@ -146,7 +146,7 @@ IqRequest::~IqRequest() {
void IqRequest::SetTimeout(base::TimeDelta timeout) {
base::MessageLoopProxy::current()->PostDelayedTask(
FROM_HERE, base::Bind(&IqRequest::OnTimeout, AsWeakPtr()),
- timeout.InMilliseconds());
+ timeout);
}
void IqRequest::CallCallback(const buzz::XmlElement* stanza) {
diff --git a/remoting/jingle_glue/jingle_thread_unittest.cc b/remoting/jingle_glue/jingle_thread_unittest.cc
index 9deb8db..e73c8b2 100644
--- a/remoting/jingle_glue/jingle_thread_unittest.cc
+++ b/remoting/jingle_glue/jingle_thread_unittest.cc
@@ -63,7 +63,7 @@ TEST(JingleThreadTest, PostDelayedTask) {
base::Time start = base::Time::Now();
thread.message_loop()->PostDelayedTask(
FROM_HERE, base::Bind(&MockCallback::Run, base::Unretained(&task)),
- kDelayMs);
+ base::TimeDelta::FromMilliseconds(kDelayMs));
event.TimedWait(base::TimeDelta::FromMilliseconds(kDelayTimeoutMs));
base::Time end = base::Time::Now();
thread.Stop();
@@ -81,7 +81,7 @@ TEST(JingleThreadTest, PostNonNestableDelayedTask) {
base::Time start = base::Time::Now();
thread.message_loop()->PostNonNestableDelayedTask(
FROM_HERE, base::Bind(&MockCallback::Run, base::Unretained(&task)),
- kDelayMs);
+ base::TimeDelta::FromMilliseconds(kDelayMs));
event.TimedWait(base::TimeDelta::FromMilliseconds(kDelayTimeoutMs));
base::Time end = base::Time::Now();
thread.Stop();
diff --git a/remoting/protocol/connection_tester.cc b/remoting/protocol/connection_tester.cc
index 4b0b4ee..f597c11 100644
--- a/remoting/protocol/connection_tester.cc
+++ b/remoting/protocol/connection_tester.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -203,8 +203,10 @@ void DatagramConnectionTester::HandleWriteResult(int result) {
} else if (result > 0) {
EXPECT_EQ(message_size_, result);
packets_sent_++;
- message_loop_->PostDelayedTask(FROM_HERE, base::Bind(
- &DatagramConnectionTester::DoWrite, base::Unretained(this)), delay_ms_);
+ message_loop_->PostDelayedTask(
+ FROM_HERE,
+ base::Bind(&DatagramConnectionTester::DoWrite, base::Unretained(this)),
+ base::TimeDelta::FromMilliseconds(delay_ms_));
}
}