summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
Diffstat (limited to 'net')
-rw-r--r--net/base/cookie_store_unittest.h8
-rw-r--r--net/base/host_resolver_impl.cc2
-rw-r--r--net/curvecp/client_packetizer.cc9
-rw-r--r--net/curvecp/client_packetizer.h4
-rw-r--r--net/disk_cache/stress_cache.cc2
5 files changed, 11 insertions, 14 deletions
diff --git a/net/base/cookie_store_unittest.h b/net/base/cookie_store_unittest.h
index 862edbb..654f3d1 100644
--- a/net/base/cookie_store_unittest.h
+++ b/net/base/cookie_store_unittest.h
@@ -211,7 +211,7 @@ class CookieStoreTest : public testing::Test {
CookieStoreTestTraits::creation_time_granularity_in_ms);
while (!matched && base::Time::Now() <= polling_end_date) {
- base::PlatformThread::Sleep(base::TimeDelta::FromMilliseconds(10));
+ base::PlatformThread::Sleep(10);
cookies = GetCookies(cs, url);
matched = (TokenizeCookieLine(line) == TokenizeCookieLine(cookies));
}
@@ -849,12 +849,10 @@ TYPED_TEST_P(CookieStoreTest, CookieOrdering) {
"c=1"));
EXPECT_TRUE(this->SetCookie(cs, GURL("http://b.a.google.com/aa/bb/cc/x.html"),
"d=1; domain=b.a.google.com"));
- base::PlatformThread::Sleep(base::TimeDelta::FromMilliseconds(
- TypeParam::creation_time_granularity_in_ms));
+ base::PlatformThread::Sleep(TypeParam::creation_time_granularity_in_ms);
EXPECT_TRUE(this->SetCookie(cs, GURL("http://b.a.google.com/aa/bb/cc/x.html"),
"a=4; domain=b.a.google.com"));
- base::PlatformThread::Sleep(base::TimeDelta::FromMilliseconds(
- TypeParam::creation_time_granularity_in_ms));
+ base::PlatformThread::Sleep(TypeParam::creation_time_granularity_in_ms);
EXPECT_TRUE(this->SetCookie(cs,
GURL("http://c.b.a.google.com/aa/bb/cc/x.html"),
"e=1; domain=c.b.a.google.com"));
diff --git a/net/base/host_resolver_impl.cc b/net/base/host_resolver_impl.cc
index 761f1f6..c32c8f5 100644
--- a/net/base/host_resolver_impl.cc
+++ b/net/base/host_resolver_impl.cc
@@ -636,7 +636,7 @@ class HostResolverImpl::ProcTask
origin_loop_->PostDelayedTask(
FROM_HERE,
base::Bind(&ProcTask::RetryIfNotComplete, this),
- params_.unresponsive_delay);
+ params_.unresponsive_delay.InMilliseconds());
}
}
diff --git a/net/curvecp/client_packetizer.cc b/net/curvecp/client_packetizer.cc
index 4b75c6e..9cafda2 100644
--- a/net/curvecp/client_packetizer.cc
+++ b/net/curvecp/client_packetizer.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 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.
@@ -235,8 +235,7 @@ int ClientPacketizer::DoSendingHelloComplete(int rv) {
int ClientPacketizer::DoWaitingCookie() {
next_state_ = WAITING_COOKIE_COMPLETE;
- StartHelloTimer(base::TimeDelta::FromMilliseconds(
- kHelloTimeoutMs[hello_attempts_++]));
+ StartHelloTimer(kHelloTimeoutMs[hello_attempts_++]);
read_buffer_ = new IOBuffer(kMaxPacketLength);
return socket_->Read(read_buffer_, kMaxPacketLength, io_callback_);
@@ -314,11 +313,11 @@ int ClientPacketizer::ConnectNextAddress() {
return rv;
}
-void ClientPacketizer::StartHelloTimer(base::TimeDelta delay) {
+void ClientPacketizer::StartHelloTimer(int milliseconds) {
MessageLoop::current()->PostDelayedTask(
FROM_HERE,
base::Bind(&ClientPacketizer::OnHelloTimeout, weak_factory_.GetWeakPtr()),
- delay);
+ milliseconds);
}
void ClientPacketizer::RevokeHelloTimer() {
diff --git a/net/curvecp/client_packetizer.h b/net/curvecp/client_packetizer.h
index 5e83207..01869f4 100644
--- a/net/curvecp/client_packetizer.h
+++ b/net/curvecp/client_packetizer.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 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.
@@ -66,7 +66,7 @@ class ClientPacketizer : public Packetizer {
int ConnectNextAddress();
// We set a timeout for responses to the Hello message.
- void StartHelloTimer(base::TimeDelta delay);
+ void StartHelloTimer(int milliseconds);
void RevokeHelloTimer();
void OnHelloTimeout(); // Called when the Hello Timer fires.
diff --git a/net/disk_cache/stress_cache.cc b/net/disk_cache/stress_cache.cc
index 56e1346..b01e5b3 100644
--- a/net/disk_cache/stress_cache.cc
+++ b/net/disk_cache/stress_cache.cc
@@ -208,7 +208,7 @@ void CrashCallback() {
}
void RunSoon(MessageLoop* target_loop) {
- const base::TimeDelta kTaskDelay = base::TimeDelta::FromSeconds(10);
+ const int kTaskDelay = 10000; // 10 seconds
target_loop->PostDelayedTask(
FROM_HERE, base::Bind(&CrashCallback), kTaskDelay);
}