Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(172)

Unified Diff: content/browser/device_orientation/provider_impl.cc

Issue 9195028: Convert use of int ms to TimeDelta in files owned by bulach. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/browser/device_orientation/provider_impl.cc
diff --git a/content/browser/device_orientation/provider_impl.cc b/content/browser/device_orientation/provider_impl.cc
index e60cf2092f446b23d5b6b4cef4babd89ddf4ab28..04962dd7dde25daeb1706ad1bd1247378264d810 100644
--- a/content/browser/device_orientation/provider_impl.cc
+++ b/content/browser/device_orientation/provider_impl.cc
@@ -154,7 +154,7 @@ void ProviderImpl::ScheduleDoPoll() {
polling_loop->PostDelayedTask(
FROM_HERE,
base::Bind(&ProviderImpl::DoPoll, weak_factory_.GetWeakPtr()),
- SamplingIntervalMs());
+ SamplingInterval());
}
namespace {
@@ -192,14 +192,14 @@ bool ProviderImpl::SignificantlyDifferent(const Orientation& o1,
o2.gamma_);
}
-int ProviderImpl::SamplingIntervalMs() const {
+base::TimeDelta ProviderImpl::SamplingInterval() const {
DCHECK(MessageLoop::current() == polling_thread_->message_loop());
DCHECK(data_fetcher_.get());
// TODO(erg): There used to be unused code here, that called a default
// implementation on the DataFetcherInterface that was never defined. I'm
// removing unused methods from headers.
- return kDesiredSamplingIntervalMs;
+ return base::TimeDelta::FromMilliseconds(kDesiredSamplingIntervalMs);
}
} // namespace device_orientation
« no previous file with comments | « content/browser/device_orientation/provider_impl.h ('k') | content/browser/geolocation/device_data_provider_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698