diff options
author | danakj <danakj@chromium.org> | 2015-09-24 00:53:00 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-09-24 07:53:38 +0000 |
commit | 8c3eb804c56b7173f00e58e040f47fe867dabda7 (patch) | |
tree | 3dee4211092c1942e4eaf24684f3255cfddd9e34 /chromeos | |
parent | f7033f79311149ae641bcaa3986c753f60f1db7e (diff) | |
download | chromium_src-8c3eb804c56b7173f00e58e040f47fe867dabda7.zip chromium_src-8c3eb804c56b7173f00e58e040f47fe867dabda7.tar.gz chromium_src-8c3eb804c56b7173f00e58e040f47fe867dabda7.tar.bz2 |
base: Template methods on Timer classes instead of the classes themselves.
The base class for OneShotTimer and DelayedTimer is templated but
only the Start method needs to be (which has a TODO to make it go away
entirely too).
The DelayedTimer class is also templated but only its constructor
needs to be, and the type can be inferred at the callsite, so less
typing all around.
R=thakis@chromium.org
TBR=sky,brettw
BUG=148832
CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel
Review URL: https://codereview.chromium.org/1355063004
Cr-Commit-Position: refs/heads/master@{#350496}
Diffstat (limited to 'chromeos')
-rw-r--r-- | chromeos/audio/cras_audio_handler.h | 2 | ||||
-rw-r--r-- | chromeos/geolocation/simple_geolocation_request.h | 4 | ||||
-rw-r--r-- | chromeos/timezone/timezone_request.h | 2 | ||||
-rw-r--r-- | chromeos/timezone/timezone_resolver.cc | 2 |
4 files changed, 5 insertions, 5 deletions
diff --git a/chromeos/audio/cras_audio_handler.h b/chromeos/audio/cras_audio_handler.h index 343fafd..a12e5ae4 100644 --- a/chromeos/audio/cras_audio_handler.h +++ b/chromeos/audio/cras_audio_handler.h @@ -356,7 +356,7 @@ class CHROMEOS_EXPORT CrasAudioHandler : public CrasAudioClient::Observer, bool log_errors_; // Timer for HDMI re-discovering grace period. - base::OneShotTimer<CrasAudioHandler> hdmi_rediscover_timer_; + base::OneShotTimer hdmi_rediscover_timer_; int hdmi_rediscover_grace_period_duration_in_ms_; bool hdmi_rediscovering_; diff --git a/chromeos/geolocation/simple_geolocation_request.h b/chromeos/geolocation/simple_geolocation_request.h index 179efcb..5ec5ce3 100644 --- a/chromeos/geolocation/simple_geolocation_request.h +++ b/chromeos/geolocation/simple_geolocation_request.h @@ -103,10 +103,10 @@ class SimpleGeolocationRequest : private net::URLFetcherDelegate { const base::TimeDelta timeout_; // Pending retry. - base::OneShotTimer<SimpleGeolocationRequest> request_scheduled_; + base::OneShotTimer request_scheduled_; // Stop request on timeout. - base::OneShotTimer<SimpleGeolocationRequest> timeout_timer_; + base::OneShotTimer timeout_timer_; // Number of retry attempts. unsigned retries_; diff --git a/chromeos/timezone/timezone_request.h b/chromeos/timezone/timezone_request.h index e908578..dbad66b 100644 --- a/chromeos/timezone/timezone_request.h +++ b/chromeos/timezone/timezone_request.h @@ -118,7 +118,7 @@ class CHROMEOS_EXPORT TimeZoneRequest : private net::URLFetcherDelegate { base::Time retry_timeout_abs_; // Pending retry. - base::OneShotTimer<TimeZoneRequest> timezone_request_scheduled_; + base::OneShotTimer timezone_request_scheduled_; base::TimeDelta retry_sleep_on_server_error_; diff --git a/chromeos/timezone/timezone_resolver.cc b/chromeos/timezone/timezone_resolver.cc index be73382..051a558 100644 --- a/chromeos/timezone/timezone_resolver.cc +++ b/chromeos/timezone/timezone_resolver.cc @@ -125,7 +125,7 @@ class TimeZoneResolver::TimeZoneResolverImpl : public base::PowerObserver { SimpleGeolocationProvider geolocation_provider_; TimeZoneProvider timezone_provider_; - base::OneShotTimer<TimeZoneResolver::TimeZoneResolverImpl> refresh_timer_; + base::OneShotTimer refresh_timer_; // Total number of request attempts. int requests_count_; |