diff options
author | tedvessenes@gmail.com <tedvessenes@gmail.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-03-11 01:12:20 +0000 |
---|---|---|
committer | tedvessenes@gmail.com <tedvessenes@gmail.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-03-11 01:12:20 +0000 |
commit | 4b45426889b252dd2094371f8b7b62aaa0220c2d (patch) | |
tree | 2db3b96f5bc95f4ce51f60903f550935171301bd /dbus/bus.cc | |
parent | 21658d82902a1c89a260744c86909a0cdb7a20c3 (diff) | |
download | chromium_src-4b45426889b252dd2094371f8b7b62aaa0220c2d.zip chromium_src-4b45426889b252dd2094371f8b7b62aaa0220c2d.tar.gz chromium_src-4b45426889b252dd2094371f8b7b62aaa0220c2d.tar.bz2 |
Convert uses of int ms to TimeDelta in dbus.
R=satorux@chromium.org
BUG=108171
Review URL: http://codereview.chromium.org/9582044
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@126055 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'dbus/bus.cc')
-rw-r--r-- | dbus/bus.cc | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/dbus/bus.cc b/dbus/bus.cc index e391bc5..9d4a436 100644 --- a/dbus/bus.cc +++ b/dbus/bus.cc @@ -117,7 +117,7 @@ class Timeout : public base::RefCountedThreadSafe<Timeout> { bus->PostDelayedTaskToDBusThread(FROM_HERE, base::Bind(&Timeout::HandleTimeout, this), - GetIntervalInMs()); + GetInterval()); monitoring_is_active_ = true; } @@ -128,9 +128,10 @@ class Timeout : public base::RefCountedThreadSafe<Timeout> { monitoring_is_active_ = false; } - // Returns the interval in milliseconds. - int GetIntervalInMs() { - return dbus_timeout_get_interval(raw_timeout_); + // Returns the interval. + base::TimeDelta GetInterval() { + return base::TimeDelta::FromMilliseconds( + dbus_timeout_get_interval(raw_timeout_)); } // Cleans up the raw_timeout and marks that timeout is completed. @@ -642,16 +643,16 @@ void Bus::PostTaskToDBusThread(const tracked_objects::Location& from_here, void Bus::PostDelayedTaskToDBusThread( const tracked_objects::Location& from_here, const base::Closure& task, - int delay_ms) { + base::TimeDelta delay) { if (dbus_thread_message_loop_proxy_.get()) { if (!dbus_thread_message_loop_proxy_->PostDelayedTask( - from_here, task, delay_ms)) { + from_here, task, delay)) { LOG(WARNING) << "Failed to post a task to the D-Bus thread message loop"; } } else { DCHECK(origin_message_loop_proxy_.get()); if (!origin_message_loop_proxy_->PostDelayedTask( - from_here, task, delay_ms)) { + from_here, task, delay)) { LOG(WARNING) << "Failed to post a task to the origin message loop"; } } |