summaryrefslogtreecommitdiffstats
path: root/remoting
diff options
context:
space:
mode:
authorasanka@chromium.org <asanka@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-06-01 22:05:10 +0000
committerasanka@chromium.org <asanka@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-06-01 22:05:10 +0000
commitad5fb16613da3b87e9b271212616c6538494ba82 (patch)
tree39a79b406b12d5781da2e58642078626dee2b663 /remoting
parent500cc4569242f0c381c8aad56b67909ab6ba40f4 (diff)
downloadchromium_src-ad5fb16613da3b87e9b271212616c6538494ba82.zip
chromium_src-ad5fb16613da3b87e9b271212616c6538494ba82.tar.gz
chromium_src-ad5fb16613da3b87e9b271212616c6538494ba82.tar.bz2
Revert 140102 - Remove old PostDelayedTask interfaces that use int ms instead of TimeDelta.
Compile failed on ChromiumOS x86 and Tegra. BUG=108171 Review URL: https://chromiumcodereview.appspot.com/9703053 TBR=tedvessenes@gmail.com Review URL: https://chromiumcodereview.appspot.com/10496002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@140109 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting')
-rw-r--r--remoting/base/plugin_message_loop_proxy.cc16
-rw-r--r--remoting/base/plugin_message_loop_proxy.h8
-rw-r--r--remoting/base/scoped_thread_proxy.cc10
-rw-r--r--remoting/base/scoped_thread_proxy.h2
-rw-r--r--remoting/host/it2me_host_user_interface.cc3
5 files changed, 31 insertions, 8 deletions
diff --git a/remoting/base/plugin_message_loop_proxy.cc b/remoting/base/plugin_message_loop_proxy.cc
index ad595c8..9d9a599 100644
--- a/remoting/base/plugin_message_loop_proxy.cc
+++ b/remoting/base/plugin_message_loop_proxy.cc
@@ -27,6 +27,14 @@ void PluginMessageLoopProxy::Detach() {
bool PluginMessageLoopProxy::PostDelayedTask(
const tracked_objects::Location& from_here,
const base::Closure& task,
+ int64 delay_ms) {
+ return PostDelayedTask(
+ from_here, task, base::TimeDelta::FromMilliseconds(delay_ms));
+}
+
+bool PluginMessageLoopProxy::PostDelayedTask(
+ const tracked_objects::Location& from_here,
+ const base::Closure& task,
base::TimeDelta delay) {
base::AutoLock auto_lock(lock_);
if (!delegate_)
@@ -41,6 +49,14 @@ bool PluginMessageLoopProxy::PostDelayedTask(
bool PluginMessageLoopProxy::PostNonNestableDelayedTask(
const tracked_objects::Location& from_here,
const base::Closure& task,
+ int64 delay_ms) {
+ // All tasks running on this message loop are non-nestable.
+ return PostDelayedTask(from_here, task, delay_ms);
+}
+
+bool PluginMessageLoopProxy::PostNonNestableDelayedTask(
+ const tracked_objects::Location& from_here,
+ const base::Closure& task,
base::TimeDelta delay) {
// All tasks running on this message loop are non-nestable.
return PostDelayedTask(from_here, task, delay);
diff --git a/remoting/base/plugin_message_loop_proxy.h b/remoting/base/plugin_message_loop_proxy.h
index 1088344..23e2c7a 100644
--- a/remoting/base/plugin_message_loop_proxy.h
+++ b/remoting/base/plugin_message_loop_proxy.h
@@ -34,10 +34,18 @@ class PluginMessageLoopProxy : public base::MessageLoopProxy {
virtual bool PostDelayedTask(
const tracked_objects::Location& from_here,
const base::Closure& task,
+ int64 delay_ms) OVERRIDE;
+ virtual bool PostDelayedTask(
+ const tracked_objects::Location& from_here,
+ const base::Closure& task,
base::TimeDelta delay) OVERRIDE;
virtual bool PostNonNestableDelayedTask(
const tracked_objects::Location& from_here,
const base::Closure& task,
+ int64 delay_ms) OVERRIDE;
+ virtual bool PostNonNestableDelayedTask(
+ const tracked_objects::Location& from_here,
+ const base::Closure& task,
base::TimeDelta delay) OVERRIDE;
virtual bool RunsTasksOnCurrentThread() const OVERRIDE;
diff --git a/remoting/base/scoped_thread_proxy.cc b/remoting/base/scoped_thread_proxy.cc
index 7209a52..d1dcc26 100644
--- a/remoting/base/scoped_thread_proxy.cc
+++ b/remoting/base/scoped_thread_proxy.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.
@@ -24,9 +24,9 @@ class ScopedThreadProxy::Core : public base::RefCountedThreadSafe<Core> {
void PostDelayedTask(
const tracked_objects::Location& from_here,
const base::Closure& closure,
- base::TimeDelta delay) {
+ int64 delay_ms) {
if (!canceled_) {
- message_loop_->PostDelayedTask(from_here, Wrap(closure), delay);
+ message_loop_->PostDelayedTask(from_here, Wrap(closure), delay_ms);
}
}
@@ -75,8 +75,8 @@ void ScopedThreadProxy::PostTask(const tracked_objects::Location& from_here,
void ScopedThreadProxy::PostDelayedTask(
const tracked_objects::Location& from_here,
const base::Closure& closure,
- base::TimeDelta delay) {
- core_->PostDelayedTask(from_here, closure, delay);
+ int64 delay_ms) {
+ core_->PostDelayedTask(from_here, closure, delay_ms);
}
void ScopedThreadProxy::Detach() {
diff --git a/remoting/base/scoped_thread_proxy.h b/remoting/base/scoped_thread_proxy.h
index 8e69d8f..9e43a15 100644
--- a/remoting/base/scoped_thread_proxy.h
+++ b/remoting/base/scoped_thread_proxy.h
@@ -54,7 +54,7 @@ class ScopedThreadProxy {
const base::Closure& closure);
void PostDelayedTask(const tracked_objects::Location& from_here,
const base::Closure& closure,
- base::TimeDelta delay);
+ int64 delay_ms);
// Cancels all tasks posted via this proxy. Must be called on the
// thread this object belongs to.
diff --git a/remoting/host/it2me_host_user_interface.cc b/remoting/host/it2me_host_user_interface.cc
index 3edb144..c39f6d3 100644
--- a/remoting/host/it2me_host_user_interface.cc
+++ b/remoting/host/it2me_host_user_interface.cc
@@ -30,8 +30,7 @@ class It2MeHostUserInterface::TimerTask {
const base::Closure& task,
int delay_ms)
: thread_proxy_(message_loop) {
- thread_proxy_.PostDelayedTask(
- FROM_HERE, task, base::TimeDelta::FromMilliseconds(delay_ms));
+ thread_proxy_.PostDelayedTask(FROM_HERE, task, delay_ms);
}
private: