summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chrome/browser/status_icons/desktop_notification_balloon.cc10
-rw-r--r--chrome/browser/sync/engine/sync_scheduler.cc10
-rw-r--r--chrome/browser/sync/engine/sync_scheduler.h4
-rw-r--r--chrome/browser/sync/glue/session_model_associator.cc4
-rw-r--r--chrome/browser/sync/notifier/chrome_system_resources.cc4
-rw-r--r--chrome/browser/sync/profile_sync_service_harness.cc2
-rw-r--r--content/worker/test/worker_uitest.cc4
-rw-r--r--content/worker/websharedworkerclient_proxy.cc6
8 files changed, 23 insertions, 21 deletions
diff --git a/chrome/browser/status_icons/desktop_notification_balloon.cc b/chrome/browser/status_icons/desktop_notification_balloon.cc
index 4f1777a..a0361d4 100644
--- a/chrome/browser/status_icons/desktop_notification_balloon.cc
+++ b/chrome/browser/status_icons/desktop_notification_balloon.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.
@@ -26,7 +26,7 @@ void CloseBalloon(const std::string& id) {
const char kNotificationPrefix[] = "desktop_notification_balloon.";
// Timeout for automatically dismissing the notification balloon.
-const size_t kTimeoutMilliseconds = 6000;
+const size_t kTimeoutSeconds = 6;
class DummyNotificationDelegate : public NotificationDelegate {
public:
@@ -35,8 +35,10 @@ class DummyNotificationDelegate : public NotificationDelegate {
virtual ~DummyNotificationDelegate() {}
virtual void Display() OVERRIDE {
- MessageLoop::current()->PostDelayedTask(FROM_HERE,
- base::Bind(&CloseBalloon, id()), kTimeoutMilliseconds);
+ MessageLoop::current()->PostDelayedTask(
+ FROM_HERE,
+ base::Bind(&CloseBalloon, id()),
+ base::TimeDelta::FromSeconds(kTimeoutSeconds));
}
virtual void Error() OVERRIDE {}
virtual void Close(bool by_user) OVERRIDE {}
diff --git a/chrome/browser/sync/engine/sync_scheduler.cc b/chrome/browser/sync/engine/sync_scheduler.cc
index 241692e..8ba1959 100644
--- a/chrome/browser/sync/engine/sync_scheduler.cc
+++ b/chrome/browser/sync/engine/sync_scheduler.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.
@@ -677,15 +677,15 @@ void SyncScheduler::PostTask(
void SyncScheduler::PostDelayedTask(
const tracked_objects::Location& from_here,
- const char* name, const base::Closure& task, int64 delay_ms) {
+ const char* name, const base::Closure& task, base::TimeDelta delay) {
SDVLOG_LOC(from_here, 3) << "Posting " << name << " task with "
- << delay_ms << " ms delay";
+ << delay.InMilliseconds() << " ms delay";
DCHECK_EQ(MessageLoop::current(), sync_loop_);
if (!started_) {
SDVLOG(1) << "Not posting task as scheduler is stopped.";
return;
}
- sync_loop_->PostDelayedTask(from_here, task, delay_ms);
+ sync_loop_->PostDelayedTask(from_here, task, delay);
}
void SyncScheduler::ScheduleSyncSessionJob(const SyncSessionJob& job) {
@@ -708,7 +708,7 @@ void SyncScheduler::ScheduleSyncSessionJob(const SyncSessionJob& job) {
base::Bind(&SyncScheduler::DoSyncSessionJob,
weak_ptr_factory_.GetWeakPtr(),
job),
- delay.InMilliseconds());
+ delay);
}
void SyncScheduler::SetSyncerStepsForPurpose(
diff --git a/chrome/browser/sync/engine/sync_scheduler.h b/chrome/browser/sync/engine/sync_scheduler.h
index 24b9968..4b1593b 100644
--- a/chrome/browser/sync/engine/sync_scheduler.h
+++ b/chrome/browser/sync/engine/sync_scheduler.h
@@ -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.
//
@@ -252,7 +252,7 @@ class SyncScheduler : public sessions::SyncSession::Delegate,
void PostDelayedTask(const tracked_objects::Location& from_here,
const char* name,
const base::Closure& task,
- int64 delay_ms);
+ base::TimeDelta delay);
// Helper to assemble a job and post a delayed task to sync.
void ScheduleSyncSessionJob(const SyncSessionJob& job);
diff --git a/chrome/browser/sync/glue/session_model_associator.cc b/chrome/browser/sync/glue/session_model_associator.cc
index 0a32957..0ecdf53 100644
--- a/chrome/browser/sync/glue/session_model_associator.cc
+++ b/chrome/browser/sync/glue/session_model_associator.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.
@@ -1096,7 +1096,7 @@ void SessionModelAssociator::BlockUntilLocalChangeForTest(
FROM_HERE,
base::Bind(&SessionModelAssociator::QuitLoopForSubtleTesting,
test_weak_factory_.GetWeakPtr()),
- timeout_milliseconds);
+ base::TimeDelta::FromMilliseconds(timeout_milliseconds));
}
// ==========================================================================
diff --git a/chrome/browser/sync/notifier/chrome_system_resources.cc b/chrome/browser/sync/notifier/chrome_system_resources.cc
index 71d24da..9d46c73 100644
--- a/chrome/browser/sync/notifier/chrome_system_resources.cc
+++ b/chrome/browser/sync/notifier/chrome_system_resources.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.
@@ -99,7 +99,7 @@ void ChromeScheduler::Schedule(invalidation::TimeDelta delay,
MessageLoop::current()->PostDelayedTask(
FROM_HERE, base::Bind(&ChromeScheduler::RunPostedTask,
weak_factory_.GetWeakPtr(), task),
- delay.InMillisecondsRoundedUp());
+ delay);
}
bool ChromeScheduler::IsRunningOnThread() const {
diff --git a/chrome/browser/sync/profile_sync_service_harness.cc b/chrome/browser/sync/profile_sync_service_harness.cc
index ff64bd0..d403396 100644
--- a/chrome/browser/sync/profile_sync_service_harness.cc
+++ b/chrome/browser/sync/profile_sync_service_harness.cc
@@ -744,7 +744,7 @@ bool ProfileSyncServiceHarness::AwaitStatusChangeWithTimeout(
FROM_HERE,
base::Bind(&StateChangeTimeoutEvent::Callback,
timeout_signal.get()),
- timeout_milliseconds);
+ base::TimeDelta::FromMilliseconds(timeout_milliseconds));
loop->Run();
loop->SetNestableTasksAllowed(did_allow_nestable_tasks);
if (timeout_signal->Abort()) {
diff --git a/content/worker/test/worker_uitest.cc b/content/worker/test/worker_uitest.cc
index ed22c52..29c32d0 100644
--- a/content/worker/test/worker_uitest.cc
+++ b/content/worker/test/worker_uitest.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.
@@ -105,7 +105,7 @@ class WorkerTest : public UILayoutTest {
// Sometimes the worker processes can take a while to shut down on the
// bots, so use a longer timeout period to avoid spurious failures.
- base::PlatformThread::Sleep(TestTimeouts::action_max_timeout_ms() / 100);
+ base::PlatformThread::Sleep(TestTimeouts::action_max_timeout() / 100);
}
EXPECT_EQ(number_of_processes, cur_process_count);
diff --git a/content/worker/websharedworkerclient_proxy.cc b/content/worker/websharedworkerclient_proxy.cc
index 78ffdd1..df0ddbf 100644
--- a/content/worker/websharedworkerclient_proxy.cc
+++ b/content/worker/websharedworkerclient_proxy.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.
@@ -39,7 +39,7 @@ using WebKit::WebWorker;
using WebKit::WebSharedWorkerClient;
// How long to wait for worker to finish after it's been told to terminate.
-#define kMaxTimeForRunawayWorkerMs 3000
+#define kMaxTimeForRunawayWorkerSeconds 3
WebSharedWorkerClientProxy::WebSharedWorkerClientProxy(
int route_id, WebSharedWorkerStub* stub)
@@ -215,5 +215,5 @@ void WebSharedWorkerClientProxy::EnsureWorkerContextTerminates() {
base::Bind(
&WebSharedWorkerClientProxy::workerContextDestroyed,
weak_factory_.GetWeakPtr()),
- kMaxTimeForRunawayWorkerMs);
+ base::TimeDelta::FromSeconds(kMaxTimeForRunawayWorkerSeconds));
}