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 /extensions | |
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 'extensions')
-rw-r--r-- | extensions/browser/api/alarms/alarm_manager.h | 2 | ||||
-rw-r--r-- | extensions/browser/api/cast_channel/cast_socket.cc | 2 | ||||
-rw-r--r-- | extensions/browser/api/idle/idle_manager.h | 2 | ||||
-rw-r--r-- | extensions/browser/app_window/app_window_geometry_cache.h | 2 | ||||
-rw-r--r-- | extensions/browser/quota_service.h | 2 | ||||
-rw-r--r-- | extensions/renderer/dispatcher.cc | 2 | ||||
-rw-r--r-- | extensions/renderer/dispatcher.h | 2 | ||||
-rw-r--r-- | extensions/shell/browser/shell_network_controller_chromeos.h | 2 |
8 files changed, 8 insertions, 8 deletions
diff --git a/extensions/browser/api/alarms/alarm_manager.h b/extensions/browser/api/alarms/alarm_manager.h index 404f764..6a8bc7e 100644 --- a/extensions/browser/api/alarms/alarm_manager.h +++ b/extensions/browser/api/alarms/alarm_manager.h @@ -220,7 +220,7 @@ class AlarmManager : public BrowserContextKeyedAPI, extension_registry_observer_; // The timer for this alarm manager. - base::OneShotTimer<AlarmManager> timer_; + base::OneShotTimer timer_; // A map of our pending alarms, per extension. // Invariant: None of the AlarmLists are empty. diff --git a/extensions/browser/api/cast_channel/cast_socket.cc b/extensions/browser/api/cast_channel/cast_socket.cc index 0368c47..6b8afcb 100644 --- a/extensions/browser/api/cast_channel/cast_socket.cc +++ b/extensions/browser/api/cast_channel/cast_socket.cc @@ -103,7 +103,7 @@ CastSocketImpl::CastSocketImpl(const std::string& owner_extension_id, keep_alive_(keep_alive), logger_(logger), connect_timeout_(timeout), - connect_timeout_timer_(new base::OneShotTimer<CastSocketImpl>), + connect_timeout_timer_(new base::OneShotTimer), is_canceled_(false), device_capabilities_(device_capabilities), audio_only_(false), diff --git a/extensions/browser/api/idle/idle_manager.h b/extensions/browser/api/idle/idle_manager.h index 64c0b4f..27e881f 100644 --- a/extensions/browser/api/idle/idle_manager.h +++ b/extensions/browser/api/idle/idle_manager.h @@ -126,7 +126,7 @@ class IdleManager : public ExtensionRegistryObserver, ui::IdleState last_state_; MonitorMap monitors_; - base::RepeatingTimer<IdleManager> poll_timer_; + base::RepeatingTimer poll_timer_; scoped_ptr<IdleTimeProvider> idle_time_provider_; scoped_ptr<EventDelegate> event_delegate_; diff --git a/extensions/browser/app_window/app_window_geometry_cache.h b/extensions/browser/app_window/app_window_geometry_cache.h index 08aeeb8..ac6e931 100644 --- a/extensions/browser/app_window/app_window_geometry_cache.h +++ b/extensions/browser/app_window/app_window_geometry_cache.h @@ -140,7 +140,7 @@ class AppWindowGeometryCache : public KeyedService, std::set<std::string> unsynced_extensions_; // The timer used to save the data. - base::OneShotTimer<AppWindowGeometryCache> sync_timer_; + base::OneShotTimer sync_timer_; // The timeout value we'll use for |sync_timer_|. base::TimeDelta sync_delay_; diff --git a/extensions/browser/quota_service.h b/extensions/browser/quota_service.h index ff985f4..46b6432 100644 --- a/extensions/browser/quota_service.h +++ b/extensions/browser/quota_service.h @@ -69,7 +69,7 @@ class QuotaService : public base::NonThreadSafe { // while tracking quota. void Purge(); void PurgeFunctionHeuristicsMap(FunctionHeuristicsMap* map); - base::RepeatingTimer<QuotaService> purge_timer_; + base::RepeatingTimer purge_timer_; // Our quota tracking state for extensions that have invoked quota limited // functions. Each extension is treated separately, so extension ids are the diff --git a/extensions/renderer/dispatcher.cc b/extensions/renderer/dispatcher.cc index d69eb59..9530a8e 100644 --- a/extensions/renderer/dispatcher.cc +++ b/extensions/renderer/dispatcher.cc @@ -902,7 +902,7 @@ void Dispatcher::WebKitInitialized() { // For extensions, we want to ensure we call the IdleHandler every so often, // even if the extension keeps up activity. if (set_idle_notifications_) { - forced_idle_timer_.reset(new base::RepeatingTimer<RenderThread>); + forced_idle_timer_.reset(new base::RepeatingTimer); forced_idle_timer_->Start( FROM_HERE, base::TimeDelta::FromMilliseconds(kMaxExtensionIdleHandlerDelayMs), diff --git a/extensions/renderer/dispatcher.h b/extensions/renderer/dispatcher.h index 5d6bb6ad..43d7071 100644 --- a/extensions/renderer/dispatcher.h +++ b/extensions/renderer/dispatcher.h @@ -271,7 +271,7 @@ class Dispatcher : public content::RenderProcessObserver, // Same as above, but on a longer timer and will run even if the process is // not idle, to ensure that IdleHandle gets called eventually. - scoped_ptr<base::RepeatingTimer<content::RenderThread> > forced_idle_timer_; + scoped_ptr<base::RepeatingTimer> forced_idle_timer_; // The extensions and apps that are active in this process. ExtensionIdSet active_extension_ids_; diff --git a/extensions/shell/browser/shell_network_controller_chromeos.h b/extensions/shell/browser/shell_network_controller_chromeos.h index 4945c80..36b73d7 100644 --- a/extensions/shell/browser/shell_network_controller_chromeos.h +++ b/extensions/shell/browser/shell_network_controller_chromeos.h @@ -71,7 +71,7 @@ class ShellNetworkController : public chromeos::NetworkStateHandlerObserver { State state_; // Invokes RequestScan() periodically. - base::RepeatingTimer<ShellNetworkController> scan_timer_; + base::RepeatingTimer scan_timer_; // Optionally-supplied name of the preferred network. std::string preferred_network_name_; |