diff options
361 files changed, 531 insertions, 560 deletions
diff --git a/android_webview/renderer/aw_render_view_ext.h b/android_webview/renderer/aw_render_view_ext.h index 5a91967..ee04684 100644 --- a/android_webview/renderer/aw_render_view_ext.h +++ b/android_webview/renderer/aw_render_view_ext.h @@ -65,7 +65,7 @@ class AwRenderViewExt : public content::RenderViewObserver { float page_scale_factor_; gfx::Size last_sent_contents_size_; - base::OneShotTimer<AwRenderViewExt> check_contents_size_timer_; + base::OneShotTimer check_contents_size_timer_; DISALLOW_COPY_AND_ASSIGN(AwRenderViewExt); }; diff --git a/ash/accelerators/exit_warning_handler.h b/ash/accelerators/exit_warning_handler.h index b99681c..7de5fc8 100644 --- a/ash/accelerators/exit_warning_handler.h +++ b/ash/accelerators/exit_warning_handler.h @@ -73,7 +73,7 @@ class ASH_EXPORT ExitWarningHandler { State state_; scoped_ptr<views::Widget> widget_; - base::OneShotTimer<ExitWarningHandler> timer_; + base::OneShotTimer timer_; // Flag to suppress starting the timer for testing. For test we call // TimerAction() directly to simulate the expiration of the timer. diff --git a/ash/desktop_background/desktop_background_controller.h b/ash/desktop_background/desktop_background_controller.h index a06a3fd..2fe365f 100644 --- a/ash/desktop_background/desktop_background_controller.h +++ b/ash/desktop_background/desktop_background_controller.h @@ -155,7 +155,7 @@ class ASH_EXPORT DesktopBackgroundController gfx::Size current_max_display_size_; - base::OneShotTimer<DesktopBackgroundController> timer_; + base::OneShotTimer timer_; int wallpaper_reload_delay_; diff --git a/ash/display/display_configurator_animation.cc b/ash/display/display_configurator_animation.cc index 0a4d60e..dbbe00b 100644 --- a/ash/display/display_configurator_animation.cc +++ b/ash/display/display_configurator_animation.cc @@ -139,7 +139,7 @@ void DisplayConfiguratorAnimation::StartFadeOutAnimation( // In case that OnDisplayModeChanged() isn't called or its animator is // canceled due to some unknown errors, we set a timer to clear these // hiding layers. - timer_.reset(new base::OneShotTimer<DisplayConfiguratorAnimation>()); + timer_.reset(new base::OneShotTimer()); timer_->Start(FROM_HERE, base::TimeDelta::FromSeconds(kFadingTimeoutDurationInSeconds), this, diff --git a/ash/display/display_configurator_animation.h b/ash/display/display_configurator_animation.h index 0c25b14..2dcc0bd 100644 --- a/ash/display/display_configurator_animation.h +++ b/ash/display/display_configurator_animation.h @@ -56,7 +56,7 @@ class ASH_EXPORT DisplayConfiguratorAnimation void ClearHidingLayers(); std::map<aura::Window*, ui::Layer*> hiding_layers_; - scoped_ptr<base::OneShotTimer<DisplayConfiguratorAnimation> > timer_; + scoped_ptr<base::OneShotTimer> timer_; base::WeakPtrFactory<DisplayConfiguratorAnimation> weak_ptr_factory_; DISALLOW_COPY_AND_ASSIGN(DisplayConfiguratorAnimation); diff --git a/ash/display/resolution_notification_controller.cc b/ash/display/resolution_notification_controller.cc index 603d480..28e8d0d 100644 --- a/ash/display/resolution_notification_controller.cc +++ b/ash/display/resolution_notification_controller.cc @@ -121,7 +121,7 @@ struct ResolutionNotificationController::ResolutionChangeInfo { // The timer to invoke OnTimerTick() every second. This cannot be // OneShotTimer since the message contains text "automatically closed in xx // seconds..." which has to be updated every second. - base::RepeatingTimer<ResolutionNotificationController> timer; + base::RepeatingTimer timer; private: DISALLOW_COPY_AND_ASSIGN(ResolutionChangeInfo); diff --git a/ash/frame/caption_buttons/frame_size_button.h b/ash/frame/caption_buttons/frame_size_button.h index 949a94c..633ac49 100644 --- a/ash/frame/caption_buttons/frame_size_button.h +++ b/ash/frame/caption_buttons/frame_size_button.h @@ -97,7 +97,7 @@ class ASH_EXPORT FrameSizeButton : public FrameCaptionButton { // right. int set_buttons_to_snap_mode_delay_ms_; - base::OneShotTimer<FrameSizeButton> set_buttons_to_snap_mode_timer_; + base::OneShotTimer set_buttons_to_snap_mode_timer_; // Whether the buttons adjacent to the size button snap the window left and // right. diff --git a/ash/magnifier/magnification_controller.cc b/ash/magnifier/magnification_controller.cc index d07d5d2..cb77376 100644 --- a/ash/magnifier/magnification_controller.cc +++ b/ash/magnifier/magnification_controller.cc @@ -248,7 +248,7 @@ class MagnificationControllerImpl : public MagnificationController, ScrollDirection scroll_direction_; // Timer for moving magnifier window when it fires. - base::OneShotTimer<MagnificationControllerImpl> move_magnifier_timer_; + base::OneShotTimer move_magnifier_timer_; // Most recent caret position in |root_window_| coordinates. gfx::Point caret_point_; diff --git a/ash/metrics/user_metrics_recorder.h b/ash/metrics/user_metrics_recorder.h index bf69199..adce6dd 100644 --- a/ash/metrics/user_metrics_recorder.h +++ b/ash/metrics/user_metrics_recorder.h @@ -186,7 +186,7 @@ class ASH_EXPORT UserMetricsRecorder { void StartTimer(); // The periodic timer that triggers metrics to be recorded. - base::RepeatingTimer<UserMetricsRecorder> timer_; + base::RepeatingTimer timer_; TaskSwitchMetricsRecorder task_switch_metrics_recorder_; diff --git a/ash/shelf/shelf_layout_manager.h b/ash/shelf/shelf_layout_manager.h index 40e1355..80b06e1 100644 --- a/ash/shelf/shelf_layout_manager.h +++ b/ash/shelf/shelf_layout_manager.h @@ -365,7 +365,7 @@ class ASH_EXPORT ShelfLayoutManager // Do any windows overlap the shelf? This is maintained by WorkspaceManager. bool window_overlaps_shelf_; - base::OneShotTimer<ShelfLayoutManager> auto_hide_timer_; + base::OneShotTimer auto_hide_timer_; // Whether the mouse was over the shelf when the auto hide timer started. // False when neither the auto hide timer nor the timer task are running. diff --git a/ash/shelf/shelf_tooltip_manager.cc b/ash/shelf/shelf_tooltip_manager.cc index 17acba2..0f65ee6 100644 --- a/ash/shelf/shelf_tooltip_manager.cc +++ b/ash/shelf/shelf_tooltip_manager.cc @@ -363,8 +363,7 @@ void ShelfTooltipManager::CreateBubble(views::View* anchor, } void ShelfTooltipManager::CreateTimer(int delay_in_ms) { - base::OneShotTimer<ShelfTooltipManager>* new_timer = - new base::OneShotTimer<ShelfTooltipManager>(); + base::OneShotTimer* new_timer = new base::OneShotTimer(); new_timer->Start(FROM_HERE, base::TimeDelta::FromMilliseconds(delay_in_ms), this, diff --git a/ash/system/chromeos/network/tray_network_state_observer.h b/ash/system/chromeos/network/tray_network_state_observer.h index af9bed6..d5f572b 100644 --- a/ash/system/chromeos/network/tray_network_state_observer.h +++ b/ash/system/chromeos/network/tray_network_state_observer.h @@ -53,7 +53,7 @@ class TrayNetworkStateObserver : public chromeos::NetworkStateHandlerObserver { int update_frequency_; // Timer used to limit the frequency of NetworkStateChanged updates. - base::OneShotTimer<TrayNetworkStateObserver> timer_; + base::OneShotTimer timer_; DISALLOW_COPY_AND_ASSIGN(TrayNetworkStateObserver); }; diff --git a/ash/system/chromeos/session/logout_confirmation_dialog.h b/ash/system/chromeos/session/logout_confirmation_dialog.h index a245b46..b469c58 100644 --- a/ash/system/chromeos/session/logout_confirmation_dialog.h +++ b/ash/system/chromeos/session/logout_confirmation_dialog.h @@ -46,7 +46,7 @@ class LogoutConfirmationDialog : public views::DialogDelegateView { views::Label* label_; - base::RepeatingTimer<LogoutConfirmationDialog> update_timer_; + base::RepeatingTimer update_timer_; DISALLOW_COPY_AND_ASSIGN(LogoutConfirmationDialog); }; diff --git a/ash/system/chromeos/session/tray_session_length_limit.cc b/ash/system/chromeos/session/tray_session_length_limit.cc index e4beb90..980e7a5 100644 --- a/ash/system/chromeos/session/tray_session_length_limit.cc +++ b/ash/system/chromeos/session/tray_session_length_limit.cc @@ -101,7 +101,7 @@ void TraySessionLengthLimit::UpdateState() { limit_state_ = remaining_session_time_ <= expiring_soon_threshold ? LIMIT_EXPIRING_SOON : LIMIT_SET; if (!timer_) - timer_.reset(new base::RepeatingTimer<TraySessionLengthLimit>); + timer_.reset(new base::RepeatingTimer); if (!timer_->IsRunning()) { timer_->Start(FROM_HERE, base::TimeDelta::FromMilliseconds( diff --git a/ash/system/chromeos/session/tray_session_length_limit.h b/ash/system/chromeos/session/tray_session_length_limit.h index 8afe5aa..fcfe3c7 100644 --- a/ash/system/chromeos/session/tray_session_length_limit.h +++ b/ash/system/chromeos/session/tray_session_length_limit.h @@ -69,7 +69,7 @@ public: LimitState last_limit_state_; // State of last notification update. LabelTrayView* tray_bubble_view_; - scoped_ptr<base::RepeatingTimer<TraySessionLengthLimit> > timer_; + scoped_ptr<base::RepeatingTimer> timer_; DISALLOW_COPY_AND_ASSIGN(TraySessionLengthLimit); }; diff --git a/ash/system/date/date_view.h b/ash/system/date/date_view.h index 05d042c..b460a52 100644 --- a/ash/system/date/date_view.h +++ b/ash/system/date/date_view.h @@ -44,7 +44,7 @@ class ASH_EXPORT BaseDateTimeView : public ActionableView { void OnLocaleChanged() override; // Invokes UpdateText() when the displayed time should change. - base::OneShotTimer<BaseDateTimeView> timer_; + base::OneShotTimer timer_; DISALLOW_COPY_AND_ASSIGN(BaseDateTimeView); }; diff --git a/ash/system/tray/system_tray_bubble.h b/ash/system/tray/system_tray_bubble.h index ece879c..122a314 100644 --- a/ash/system/tray/system_tray_bubble.h +++ b/ash/system/tray/system_tray_bubble.h @@ -68,7 +68,7 @@ class SystemTrayBubble { BubbleType bubble_type_; int autoclose_delay_; - base::OneShotTimer<SystemTrayBubble> autoclose_; + base::OneShotTimer autoclose_; DISALLOW_COPY_AND_ASSIGN(SystemTrayBubble); }; diff --git a/ash/system/tray/tray_notification_view.h b/ash/system/tray/tray_notification_view.h index 784450e..5b3b6e2 100644 --- a/ash/system/tray/tray_notification_view.h +++ b/ash/system/tray/tray_notification_view.h @@ -80,7 +80,7 @@ class TrayNotificationView : public views::SlideOutView, views::ImageView* icon_; int autoclose_delay_; - base::OneShotTimer<TrayNotificationView> autoclose_; + base::OneShotTimer autoclose_; DISALLOW_COPY_AND_ASSIGN(TrayNotificationView); }; diff --git a/ash/system/tray_update.cc b/ash/system/tray_update.cc index d24a6e9..5b67bae 100644 --- a/ash/system/tray_update.cc +++ b/ash/system/tray_update.cc @@ -150,7 +150,7 @@ class UpdateNagger : public ui::LayerAnimationObserver { ui::LayerAnimationSequence* sequence) override {} SystemTrayItem* owner_; - base::OneShotTimer<UpdateNagger> timer_; + base::OneShotTimer timer_; DISALLOW_COPY_AND_ASSIGN(UpdateNagger); }; diff --git a/ash/wm/gestures/long_press_affordance_handler.h b/ash/wm/gestures/long_press_affordance_handler.h index a98834e..1ba1793 100644 --- a/ash/wm/gestures/long_press_affordance_handler.h +++ b/ash/wm/gestures/long_press_affordance_handler.h @@ -60,7 +60,7 @@ class LongPressAffordanceHandler : public gfx::LinearAnimation, scoped_ptr<LongPressAffordanceView> view_; gfx::Point tap_down_location_; - base::OneShotTimer<LongPressAffordanceHandler> timer_; + base::OneShotTimer timer_; aura::Window* tap_down_target_; LongPressAnimationType current_animation_type_; diff --git a/ash/wm/immersive_fullscreen_controller.h b/ash/wm/immersive_fullscreen_controller.h index 773c5ec..7352bf0 100644 --- a/ash/wm/immersive_fullscreen_controller.h +++ b/ash/wm/immersive_fullscreen_controller.h @@ -259,7 +259,7 @@ class ASH_EXPORT ImmersiveFullscreenController int revealed_lock_count_; // Timer to track cursor being held at the top edge of the screen. - base::OneShotTimer<ImmersiveFullscreenController> top_edge_hover_timer_; + base::OneShotTimer top_edge_hover_timer_; // The cursor x position in screen coordinates when the cursor first hit the // top edge of the screen. diff --git a/ash/wm/lock_state_controller.h b/ash/wm/lock_state_controller.h index 82e5e33..496c9e0 100644 --- a/ash/wm/lock_state_controller.h +++ b/ash/wm/lock_state_controller.h @@ -312,21 +312,21 @@ class ASH_EXPORT LockStateController : public aura::WindowTreeHostObserver, // Started when we request that the screen be locked. When it fires, we // assume that our request got dropped. - base::OneShotTimer<LockStateController> lock_fail_timer_; + base::OneShotTimer lock_fail_timer_; // Started when the screen is locked while the power button is held. Adds a // delay between the appearance of the lock screen and the beginning of the // pre-shutdown animation. - base::OneShotTimer<LockStateController> lock_to_shutdown_timer_; + base::OneShotTimer lock_to_shutdown_timer_; // Started when we begin displaying the pre-shutdown animation. When it // fires, we start the shutdown animation and get ready to request shutdown. - base::OneShotTimer<LockStateController> pre_shutdown_timer_; + base::OneShotTimer pre_shutdown_timer_; // Started when we display the shutdown animation. When it fires, we actually // request shutdown. Gives the animation time to complete before Chrome, X, // etc. are shut down. - base::OneShotTimer<LockStateController> real_shutdown_timer_; + base::OneShotTimer real_shutdown_timer_; base::Closure lock_screen_displayed_callback_; diff --git a/ash/wm/system_gesture_event_filter_unittest.cc b/ash/wm/system_gesture_event_filter_unittest.cc index 0cbb027..fc7934f 100644 --- a/ash/wm/system_gesture_event_filter_unittest.cc +++ b/ash/wm/system_gesture_event_filter_unittest.cc @@ -116,8 +116,7 @@ class SystemGestureEventFilterTest : public AshTestBase { long_press_affordance_.get(); } - base::OneShotTimer<LongPressAffordanceHandler>* - GetLongPressAffordanceTimer() { + base::OneShotTimer* GetLongPressAffordanceTimer() { return &GetLongPressAffordance()->timer_; } @@ -199,8 +198,7 @@ TEST_F(SystemGestureEventFilterTest, LongPressAffordanceStateOnCaptureLoss) { ASSERT_FALSE(details.dispatcher_destroyed); EXPECT_TRUE(window1->HasCapture()); - base::OneShotTimer<LongPressAffordanceHandler>* timer = - GetLongPressAffordanceTimer(); + base::OneShotTimer* timer = GetLongPressAffordanceTimer(); EXPECT_TRUE(timer->IsRunning()); EXPECT_EQ(window1, GetLongPressAffordanceTarget()); diff --git a/ash/wm/workspace/multi_window_resize_controller.h b/ash/wm/workspace/multi_window_resize_controller.h index 35a25a6..3a76f74 100644 --- a/ash/wm/workspace/multi_window_resize_controller.h +++ b/ash/wm/workspace/multi_window_resize_controller.h @@ -156,7 +156,7 @@ class ASH_EXPORT MultiWindowResizeController : ResizeWindows windows_; // Timer used before showing. - base::OneShotTimer<MultiWindowResizeController> show_timer_; + base::OneShotTimer show_timer_; scoped_ptr<views::Widget> resize_widget_; diff --git a/base/files/important_file_writer.h b/base/files/important_file_writer.h index 2c278c2..7c6160a 100644 --- a/base/files/important_file_writer.h +++ b/base/files/important_file_writer.h @@ -122,7 +122,7 @@ class BASE_EXPORT ImportantFileWriter : public NonThreadSafe { const scoped_refptr<SequencedTaskRunner> task_runner_; // Timer used to schedule commit after ScheduleWrite. - OneShotTimer<ImportantFileWriter> timer_; + OneShotTimer timer_; // Serializer which will provide the data to be saved. DataSerializer* serializer_; diff --git a/base/memory/memory_pressure_monitor_chromeos.h b/base/memory/memory_pressure_monitor_chromeos.h index ff8992a..a702447 100644 --- a/base/memory/memory_pressure_monitor_chromeos.h +++ b/base/memory/memory_pressure_monitor_chromeos.h @@ -95,7 +95,7 @@ class BASE_EXPORT MemoryPressureMonitor : public base::MemoryPressureMonitor { // A periodic timer to check for resource pressure changes. This will get // replaced by a kernel triggered event system (see crbug.com/381196). - base::RepeatingTimer<MemoryPressureMonitor> timer_; + base::RepeatingTimer timer_; // To slow down the amount of moderate pressure event calls, this counter // gets used to count the number of events since the last event occured. diff --git a/base/memory/memory_pressure_monitor_win.h b/base/memory/memory_pressure_monitor_win.h index 07f04eb..030b8b3 100644 --- a/base/memory/memory_pressure_monitor_win.h +++ b/base/memory/memory_pressure_monitor_win.h @@ -117,7 +117,7 @@ class BASE_EXPORT MemoryPressureMonitor : public base::MemoryPressureMonitor { int critical_threshold_mb_; // A periodic timer to check for memory pressure changes. - base::RepeatingTimer<MemoryPressureMonitor> timer_; + base::RepeatingTimer timer_; // The current memory pressure. MemoryPressureLevel current_memory_pressure_level_; diff --git a/base/power_monitor/power_monitor_device_source.h b/base/power_monitor/power_monitor_device_source.h index 29f17c2..fa0b039 100644 --- a/base/power_monitor/power_monitor_device_source.h +++ b/base/power_monitor/power_monitor_device_source.h @@ -102,7 +102,7 @@ class BASE_EXPORT PowerMonitorDeviceSource : public PowerMonitorSource { #endif #if defined(ENABLE_BATTERY_MONITORING) - base::OneShotTimer<PowerMonitorDeviceSource> delayed_battery_check_; + base::OneShotTimer delayed_battery_check_; #endif #if defined(OS_WIN) diff --git a/base/test/launcher/test_launcher.h b/base/test/launcher/test_launcher.h index ab8934c..96257a1 100644 --- a/base/test/launcher/test_launcher.h +++ b/base/test/launcher/test_launcher.h @@ -194,7 +194,7 @@ class TestLauncher { TestResultsTracker results_tracker_; // Watchdog timer to make sure we do not go without output for too long. - DelayTimer<TestLauncher> watchdog_timer_; + DelayTimer watchdog_timer_; // Number of jobs to run in parallel. size_t parallel_jobs_; diff --git a/base/timer/timer.h b/base/timer/timer.h index 1ef58a3..c5bd9ce 100644 --- a/base/timer/timer.h +++ b/base/timer/timer.h @@ -29,7 +29,7 @@ // // This method is called every second to do stuff. // ... // } -// base::RepeatingTimer<MyClass> timer_; +// base::RepeatingTimer timer_; // }; // // Both OneShotTimer and RepeatingTimer also support a Reset method, which @@ -200,11 +200,8 @@ class BASE_EXPORT Timer { //----------------------------------------------------------------------------- // This class is an implementation detail of OneShotTimer and RepeatingTimer. // Please do not use this class directly. -template <class Receiver, bool kIsRepeating> class BaseTimerMethodPointer : public Timer { public: - typedef void (Receiver::*ReceiverMethod)(); - // This is here to work around the fact that Timer::Start is "hidden" by the // Start definition below, rather than being overloaded. // TODO(tim): We should remove uses of BaseTimerMethodPointer::Start below @@ -212,15 +209,18 @@ class BaseTimerMethodPointer : public Timer { // see bug 148832. using Timer::Start; - BaseTimerMethodPointer() : Timer(kIsRepeating, kIsRepeating) {} + enum RepeatMode { ONE_SHOT, REPEATING }; + BaseTimerMethodPointer(RepeatMode mode) + : Timer(mode == REPEATING, mode == REPEATING) {} // Start the timer to run at the given |delay| from now. If the timer is // already running, it will be replaced to call a task formed from // |reviewer->*method|. - virtual void Start(const tracked_objects::Location& posted_from, - TimeDelta delay, - Receiver* receiver, - ReceiverMethod method) { + template <class Receiver> + void Start(const tracked_objects::Location& posted_from, + TimeDelta delay, + Receiver* receiver, + void (Receiver::*method)()) { Timer::Start(posted_from, delay, base::Bind(method, base::Unretained(receiver))); } @@ -228,13 +228,17 @@ class BaseTimerMethodPointer : public Timer { //----------------------------------------------------------------------------- // A simple, one-shot timer. See usage notes at the top of the file. -template <class Receiver> -class OneShotTimer : public BaseTimerMethodPointer<Receiver, false> {}; +class OneShotTimer : public BaseTimerMethodPointer { + public: + OneShotTimer() : BaseTimerMethodPointer(ONE_SHOT) {} +}; //----------------------------------------------------------------------------- // A simple, repeating timer. See usage notes at the top of the file. -template <class Receiver> -class RepeatingTimer : public BaseTimerMethodPointer<Receiver, true> {}; +class RepeatingTimer : public BaseTimerMethodPointer { + public: + RepeatingTimer() : BaseTimerMethodPointer(REPEATING) {} +}; //----------------------------------------------------------------------------- // A Delay timer is like The Button from Lost. Once started, you have to keep @@ -247,22 +251,29 @@ class RepeatingTimer : public BaseTimerMethodPointer<Receiver, true> {}; // // If destroyed, the timeout is canceled and will not occur even if already // inflight. -template <class Receiver> class DelayTimer : protected Timer { public: - typedef void (Receiver::*ReceiverMethod)(); - + template <class Receiver> DelayTimer(const tracked_objects::Location& posted_from, TimeDelta delay, Receiver* receiver, - ReceiverMethod method) - : Timer(posted_from, delay, + void (Receiver::*method)()) + : Timer(posted_from, + delay, base::Bind(method, base::Unretained(receiver)), false) {} - void Reset() override { Timer::Reset(); } + void Reset() override; }; +// This class has a templated method so it can not be exported without failing +// to link in MSVC. But clang-plugin does not allow inline definitions of +// virtual methods, so the inline definition lives in the header file here +// to satisfy both. +inline void DelayTimer::Reset() { + Timer::Reset(); +} + } // namespace base #endif // BASE_TIMER_TIMER_H_ diff --git a/base/timer/timer_unittest.cc b/base/timer/timer_unittest.cc index 7213b80..35e4315 100644 --- a/base/timer/timer_unittest.cc +++ b/base/timer/timer_unittest.cc @@ -51,17 +51,15 @@ class OneShotTimerTester { } bool* did_run_; - base::OneShotTimer<OneShotTimerTester> timer_; + base::OneShotTimer timer_; const unsigned delay_ms_; bool quit_message_loop_; }; class OneShotSelfDeletingTimerTester { public: - explicit OneShotSelfDeletingTimerTester(bool* did_run) : - did_run_(did_run), - timer_(new base::OneShotTimer<OneShotSelfDeletingTimerTester>()) { - } + explicit OneShotSelfDeletingTimerTester(bool* did_run) + : did_run_(did_run), timer_(new base::OneShotTimer()) {} void Start() { timer_->Start(FROM_HERE, TimeDelta::FromMilliseconds(10), this, @@ -76,7 +74,7 @@ class OneShotSelfDeletingTimerTester { } bool* did_run_; - scoped_ptr<base::OneShotTimer<OneShotSelfDeletingTimerTester> > timer_; + scoped_ptr<base::OneShotTimer> timer_; }; class RepeatingTimerTester { @@ -101,7 +99,7 @@ class RepeatingTimerTester { bool* did_run_; int counter_; TimeDelta delay_; - base::RepeatingTimer<RepeatingTimerTester> timer_; + base::RepeatingTimer timer_; }; void RunTest_OneShotTimer(base::MessageLoop::Type message_loop_type) { @@ -205,8 +203,8 @@ void RunTest_DelayTimer_NoCall(base::MessageLoop::Type message_loop_type) { // If Delay is never called, the timer shouldn't go off. DelayTimerTarget target; - base::DelayTimer<DelayTimerTarget> timer(FROM_HERE, - TimeDelta::FromMilliseconds(1), &target, &DelayTimerTarget::Signal); + base::DelayTimer timer(FROM_HERE, TimeDelta::FromMilliseconds(1), &target, + &DelayTimerTarget::Signal); bool did_run = false; OneShotTimerTester tester(&did_run); @@ -220,8 +218,8 @@ void RunTest_DelayTimer_OneCall(base::MessageLoop::Type message_loop_type) { base::MessageLoop loop(message_loop_type); DelayTimerTarget target; - base::DelayTimer<DelayTimerTarget> timer(FROM_HERE, - TimeDelta::FromMilliseconds(1), &target, &DelayTimerTarget::Signal); + base::DelayTimer timer(FROM_HERE, TimeDelta::FromMilliseconds(1), &target, + &DelayTimerTarget::Signal); timer.Reset(); bool did_run = false; @@ -233,11 +231,8 @@ void RunTest_DelayTimer_OneCall(base::MessageLoop::Type message_loop_type) { } struct ResetHelper { - ResetHelper(base::DelayTimer<DelayTimerTarget>* timer, - DelayTimerTarget* target) - : timer_(timer), - target_(target) { - } + ResetHelper(base::DelayTimer* timer, DelayTimerTarget* target) + : timer_(timer), target_(target) {} void Reset() { ASSERT_FALSE(target_->signaled()); @@ -245,8 +240,8 @@ struct ResetHelper { } private: - base::DelayTimer<DelayTimerTarget> *const timer_; - DelayTimerTarget *const target_; + base::DelayTimer* const timer_; + DelayTimerTarget* const target_; }; void RunTest_DelayTimer_Reset(base::MessageLoop::Type message_loop_type) { @@ -254,13 +249,13 @@ void RunTest_DelayTimer_Reset(base::MessageLoop::Type message_loop_type) { // If Delay is never called, the timer shouldn't go off. DelayTimerTarget target; - base::DelayTimer<DelayTimerTarget> timer(FROM_HERE, - TimeDelta::FromMilliseconds(50), &target, &DelayTimerTarget::Signal); + base::DelayTimer timer(FROM_HERE, TimeDelta::FromMilliseconds(50), &target, + &DelayTimerTarget::Signal); timer.Reset(); ResetHelper reset_helper(&timer, &target); - base::OneShotTimer<ResetHelper> timers[20]; + base::OneShotTimer timers[20]; for (size_t i = 0; i < arraysize(timers); ++i) { timers[i].Start(FROM_HERE, TimeDelta::FromMilliseconds(i * 10), &reset_helper, &ResetHelper::Reset); @@ -288,9 +283,8 @@ void RunTest_DelayTimer_Deleted(base::MessageLoop::Type message_loop_type) { DelayTimerFatalTarget target; { - base::DelayTimer<DelayTimerFatalTarget> timer( - FROM_HERE, TimeDelta::FromMilliseconds(50), &target, - &DelayTimerFatalTarget::Signal); + base::DelayTimer timer(FROM_HERE, TimeDelta::FromMilliseconds(50), &target, + &DelayTimerFatalTarget::Signal); timer.Reset(); } diff --git a/base/trace_event/memory_dump_manager.h b/base/trace_event/memory_dump_manager.h index b445cdb..0f352ed 100644 --- a/base/trace_event/memory_dump_manager.h +++ b/base/trace_event/memory_dump_manager.h @@ -218,7 +218,7 @@ class BASE_EXPORT MemoryDumpManager : public TraceLog::EnabledStateObserver { subtle::AtomicWord memory_tracing_enabled_; // For time-triggered periodic dumps. - RepeatingTimer<MemoryDumpManager> periodic_dump_timer_; + RepeatingTimer periodic_dump_timer_; // The unique id of the child process. This is created only for tracing and is // expected to be valid only when tracing is enabled. diff --git a/base/trace_event/trace_event_memory.h b/base/trace_event/trace_event_memory.h index 2e8fb5d..7088080 100644 --- a/base/trace_event/trace_event_memory.h +++ b/base/trace_event/trace_event_memory.h @@ -73,7 +73,7 @@ class BASE_EXPORT TraceMemoryController GetHeapProfileFunction get_heap_profile_function_; // Timer to schedule memory profile dumps. - RepeatingTimer<TraceMemoryController> dump_timer_; + RepeatingTimer dump_timer_; WeakPtrFactory<TraceMemoryController> weak_factory_; diff --git a/base/trace_event/trace_event_system_stats_monitor.h b/base/trace_event/trace_event_system_stats_monitor.h index f80968b..0ae1f48 100644 --- a/base/trace_event/trace_event_system_stats_monitor.h +++ b/base/trace_event/trace_event_system_stats_monitor.h @@ -56,7 +56,7 @@ class BASE_EXPORT TraceEventSystemStatsMonitor scoped_refptr<SingleThreadTaskRunner> task_runner_; // Timer to schedule system profile dumps. - RepeatingTimer<TraceEventSystemStatsMonitor> dump_timer_; + RepeatingTimer dump_timer_; WeakPtrFactory<TraceEventSystemStatsMonitor> weak_factory_; diff --git a/chrome/browser/android/feedback/connectivity_checker.cc b/chrome/browser/android/feedback/connectivity_checker.cc index 11d1037..5e70d34 100644 --- a/chrome/browser/android/feedback/connectivity_checker.cc +++ b/chrome/browser/android/feedback/connectivity_checker.cc @@ -100,7 +100,7 @@ class ConnectivityChecker : public net::URLFetcherDelegate { // has already happened, and no further action should be taken. bool is_being_destroyed_; - scoped_ptr<base::OneShotTimer<ConnectivityChecker>> expiration_timer_; + scoped_ptr<base::OneShotTimer> expiration_timer_; }; void ConnectivityChecker::OnURLFetchComplete(const net::URLFetcher* source) { @@ -147,7 +147,7 @@ void ConnectivityChecker::StartAsyncCheck() { net::LOAD_DO_NOT_SEND_COOKIES | net::LOAD_DO_NOT_SEND_AUTH_DATA); url_fetcher_->Start(); - expiration_timer_.reset(new base::OneShotTimer<ConnectivityChecker>()); + expiration_timer_.reset(new base::OneShotTimer()); expiration_timer_->Start(FROM_HERE, timeout_, this, &ConnectivityChecker::OnTimeout); } diff --git a/chrome/browser/android/omnibox/autocomplete_controller_android.cc b/chrome/browser/android/omnibox/autocomplete_controller_android.cc index d581f80..75657dd 100644 --- a/chrome/browser/android/omnibox/autocomplete_controller_android.cc +++ b/chrome/browser/android/omnibox/autocomplete_controller_android.cc @@ -80,7 +80,7 @@ class ZeroSuggestPrefetcher : public AutocompleteControllerDelegate { void OnResultChanged(bool default_match_changed) override; scoped_ptr<AutocompleteController> controller_; - base::OneShotTimer<ZeroSuggestPrefetcher> expire_timer_; + base::OneShotTimer expire_timer_; }; ZeroSuggestPrefetcher::ZeroSuggestPrefetcher(Profile* profile) diff --git a/chrome/browser/apps/drive/drive_app_provider_browsertest.cc b/chrome/browser/apps/drive/drive_app_provider_browsertest.cc index 9d5f323..a05faa3 100644 --- a/chrome/browser/apps/drive/drive_app_provider_browsertest.cc +++ b/chrome/browser/apps/drive/drive_app_provider_browsertest.cc @@ -213,8 +213,7 @@ class DriveAppProviderTest : public ExtensionBrowserTest, scoped_ptr<drive::DriveAppRegistry> apps_registry_; scoped_ptr<DriveAppProvider> provider_; - base::RepeatingTimer<DriveAppProviderTest> - pending_drive_app_converter_check_timer_; + base::RepeatingTimer pending_drive_app_converter_check_timer_; scoped_refptr<content::MessageLoopRunner> runner_; DISALLOW_COPY_AND_ASSIGN(DriveAppProviderTest); diff --git a/chrome/browser/apps/ephemeral_app_service.h b/chrome/browser/apps/ephemeral_app_service.h index 76a7213..b4c0de4 100644 --- a/chrome/browser/apps/ephemeral_app_service.h +++ b/chrome/browser/apps/ephemeral_app_service.h @@ -93,7 +93,7 @@ class EphemeralAppService : public KeyedService, ScopedObserver<apps::AppLifetimeMonitor, apps::AppLifetimeMonitor::Observer> app_lifetime_monitor_observer_; - base::OneShotTimer<EphemeralAppService> garbage_collect_apps_timer_; + base::OneShotTimer garbage_collect_apps_timer_; // The count of cached ephemeral apps. int ephemeral_app_count_; diff --git a/chrome/browser/browser_process_impl.h b/chrome/browser/browser_process_impl.h index baa46e6..ac45964 100644 --- a/chrome/browser/browser_process_impl.h +++ b/chrome/browser/browser_process_impl.h @@ -271,7 +271,7 @@ class BrowserProcessImpl : public BrowserProcess, scoped_ptr<web_resource::PromoResourceService> promo_resource_service_; #if (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) - base::RepeatingTimer<BrowserProcessImpl> autoupdate_timer_; + base::RepeatingTimer autoupdate_timer_; // Gets called by autoupdate timer to see if browser needs restart and can be // restarted, and if that's the case, restarts the browser. diff --git a/chrome/browser/captive_portal/captive_portal_service.h b/chrome/browser/captive_portal/captive_portal_service.h index dbe07de..278d825 100644 --- a/chrome/browser/captive_portal/captive_portal_service.h +++ b/chrome/browser/captive_portal/captive_portal_service.h @@ -190,7 +190,7 @@ class CaptivePortalService : public KeyedService, public base::NonThreadSafe { // the Link Doctor. BooleanPrefMember resolve_errors_with_web_service_; - base::OneShotTimer<CaptivePortalService> check_captive_portal_timer_; + base::OneShotTimer check_captive_portal_timer_; static TestingState testing_state_; diff --git a/chrome/browser/captive_portal/captive_portal_tab_reloader.h b/chrome/browser/captive_portal/captive_portal_tab_reloader.h index db6b122..2fe64a7 100644 --- a/chrome/browser/captive_portal/captive_portal_tab_reloader.h +++ b/chrome/browser/captive_portal/captive_portal_tab_reloader.h @@ -126,7 +126,7 @@ class CaptivePortalTabReloader { // STATE_TIMER_RUNNING. Stopped on any state change, including when a page // commits or there's an error. If the timer triggers, the state switches to // STATE_MAYBE_BROKEN_BY_PORTAL and |this| kicks off a captive portal check. - base::OneShotTimer<CaptivePortalTabReloader> slow_ssl_load_timer_; + base::OneShotTimer slow_ssl_load_timer_; private: friend class CaptivePortalBrowserTest; diff --git a/chrome/browser/chromeos/accessibility/magnification_controller_browsertest.cc b/chrome/browser/chromeos/accessibility/magnification_controller_browsertest.cc index 242ace5..45c457f 100644 --- a/chrome/browser/chromeos/accessibility/magnification_controller_browsertest.cc +++ b/chrome/browser/chromeos/accessibility/magnification_controller_browsertest.cc @@ -69,7 +69,7 @@ class MagnifierAnimationWaiter { : controller_(controller) {} void Wait() { - base::RepeatingTimer<MagnifierAnimationWaiter> check_timer; + base::RepeatingTimer check_timer; check_timer.Start(FROM_HERE, base::TimeDelta::FromMilliseconds(10), this, &MagnifierAnimationWaiter::OnTimer); runner_ = new content::MessageLoopRunner; diff --git a/chrome/browser/chromeos/app_mode/kiosk_app_update_service.h b/chrome/browser/chromeos/app_mode/kiosk_app_update_service.h index a61af71..013e4d1 100644 --- a/chrome/browser/chromeos/app_mode/kiosk_app_update_service.h +++ b/chrome/browser/chromeos/app_mode/kiosk_app_update_service.h @@ -68,7 +68,7 @@ class KioskAppUpdateService : public KeyedService, std::string app_id_; // After we detect an upgrade we start a one-short timer to force restart. - base::OneShotTimer<KioskAppUpdateService> restart_timer_; + base::OneShotTimer restart_timer_; system::AutomaticRebootManager* automatic_reboot_manager_; // Not owned. diff --git a/chrome/browser/chromeos/app_mode/kiosk_mode_idle_app_name_notification.h b/chrome/browser/chromeos/app_mode/kiosk_mode_idle_app_name_notification.h index 0b844dc..886f82a 100644 --- a/chrome/browser/chromeos/app_mode/kiosk_mode_idle_app_name_notification.h +++ b/chrome/browser/chromeos/app_mode/kiosk_mode_idle_app_name_notification.h @@ -45,7 +45,7 @@ class KioskModeIdleAppNameNotification : public ui::UserActivityObserver, // Invoked by |timer_| to display the application idle message. void OnTimeout(); - base::OneShotTimer<KioskModeIdleAppNameNotification> timer_; + base::OneShotTimer timer_; // If set the notification should get shown upon next user activity. bool show_notification_upon_next_user_activity_; diff --git a/chrome/browser/chromeos/camera_presence_notifier.h b/chrome/browser/chromeos/camera_presence_notifier.h index d9e9170..423247c 100644 --- a/chrome/browser/chromeos/camera_presence_notifier.h +++ b/chrome/browser/chromeos/camera_presence_notifier.h @@ -40,7 +40,7 @@ class CameraPresenceNotifier { bool camera_present_on_last_check_; // Timer for camera check cycle. - base::RepeatingTimer<CameraPresenceNotifier> camera_check_timer_; + base::RepeatingTimer camera_check_timer_; base::ObserverList<Observer> observers_; diff --git a/chrome/browser/chromeos/customization/customization_wallpaper_downloader.h b/chrome/browser/chromeos/customization/customization_wallpaper_downloader.h index 5218d1c..a3fa728 100644 --- a/chrome/browser/chromeos/customization/customization_wallpaper_downloader.h +++ b/chrome/browser/chromeos/customization/customization_wallpaper_downloader.h @@ -93,7 +93,7 @@ class CustomizationWallpaperDownloader : public net::URLFetcherDelegate { const base::FilePath wallpaper_temporary_file_; // Pending retry. - base::OneShotTimer<CustomizationWallpaperDownloader> request_scheduled_; + base::OneShotTimer request_scheduled_; // Number of download retries (first attempt is not counted as retry). size_t retries_; diff --git a/chrome/browser/chromeos/extensions/install_limiter.h b/chrome/browser/chromeos/extensions/install_limiter.h index 369032f..9a99cca 100644 --- a/chrome/browser/chromeos/extensions/install_limiter.h +++ b/chrome/browser/chromeos/extensions/install_limiter.h @@ -78,7 +78,7 @@ class InstallLimiter : public KeyedService, CrxInstallerSet running_installers_; // A timer to wait before running deferred big app install. - base::OneShotTimer<InstallLimiter> wait_timer_; + base::OneShotTimer wait_timer_; bool disabled_for_test_; diff --git a/chrome/browser/chromeos/file_system_provider/request_manager.h b/chrome/browser/chromeos/file_system_provider/request_manager.h index 83cd002..68ab0be 100644 --- a/chrome/browser/chromeos/file_system_provider/request_manager.h +++ b/chrome/browser/chromeos/file_system_provider/request_manager.h @@ -149,7 +149,7 @@ class RequestManager { ~Request(); // Timer for discarding the request during a timeout. - base::OneShotTimer<RequestManager> timeout_timer; + base::OneShotTimer timeout_timer; // Handler tied to this request. scoped_ptr<HandlerInterface> handler; diff --git a/chrome/browser/chromeos/first_run/drive_first_run_controller.h b/chrome/browser/chromeos/first_run/drive_first_run_controller.h index e062694..3375b90 100644 --- a/chrome/browser/chromeos/first_run/drive_first_run_controller.h +++ b/chrome/browser/chromeos/first_run/drive_first_run_controller.h @@ -78,8 +78,8 @@ class DriveFirstRunController { Profile* profile_; scoped_ptr<DriveWebContentsManager> web_contents_manager_; - base::OneShotTimer<DriveFirstRunController> web_contents_timer_; - base::OneShotTimer<DriveFirstRunController> initial_delay_timer_; + base::OneShotTimer web_contents_timer_; + base::OneShotTimer initial_delay_timer_; bool started_; base::ObserverList<Observer> observer_list_; diff --git a/chrome/browser/chromeos/idle_detector.h b/chrome/browser/chromeos/idle_detector.h index fc3e45d..7d13fb8 100644 --- a/chrome/browser/chromeos/idle_detector.h +++ b/chrome/browser/chromeos/idle_detector.h @@ -28,7 +28,7 @@ class IdleDetector : public ui::UserActivityObserver { // Resets |timer_| to fire when we reach our idle timeout. void ResetTimer(); - base::OneShotTimer<IdleDetector> timer_; + base::OneShotTimer timer_; base::Closure idle_callback_; diff --git a/chrome/browser/chromeos/login/app_launch_controller.h b/chrome/browser/chromeos/login/app_launch_controller.h index b1b669c..1c9f34f 100644 --- a/chrome/browser/chromeos/login/app_launch_controller.h +++ b/chrome/browser/chromeos/login/app_launch_controller.h @@ -128,9 +128,9 @@ class AppLaunchController bool launcher_ready_; // A timer to ensure the app splash is shown for a minimum amount of time. - base::OneShotTimer<AppLaunchController> splash_wait_timer_; + base::OneShotTimer splash_wait_timer_; - base::OneShotTimer<AppLaunchController> network_wait_timer_; + base::OneShotTimer network_wait_timer_; bool waiting_for_network_; bool network_wait_timedout_; bool showing_network_dialog_; diff --git a/chrome/browser/chromeos/login/chrome_restart_request.cc b/chrome/browser/chromeos/login/chrome_restart_request.cc index 73bea6e..9222573 100644 --- a/chrome/browser/chromeos/login/chrome_restart_request.cc +++ b/chrome/browser/chromeos/login/chrome_restart_request.cc @@ -259,7 +259,7 @@ class ChromeRestartRequest void RestartJob(); const std::vector<std::string> argv_; - base::OneShotTimer<ChromeRestartRequest> timer_; + base::OneShotTimer timer_; DISALLOW_COPY_AND_ASSIGN(ChromeRestartRequest); }; diff --git a/chrome/browser/chromeos/login/existing_user_controller.cc b/chrome/browser/chromeos/login/existing_user_controller.cc index 3db4024..97baaa0 100644 --- a/chrome/browser/chromeos/login/existing_user_controller.cc +++ b/chrome/browser/chromeos/login/existing_user_controller.cc @@ -901,7 +901,7 @@ void ExistingUserController::StartPublicSessionAutoLoginTimer() { // Start the auto-login timer. if (!auto_login_timer_) - auto_login_timer_.reset(new base::OneShotTimer<ExistingUserController>); + auto_login_timer_.reset(new base::OneShotTimer); auto_login_timer_->Start( FROM_HERE, diff --git a/chrome/browser/chromeos/login/existing_user_controller.h b/chrome/browser/chromeos/login/existing_user_controller.h index 0df5d28..ee963b2 100644 --- a/chrome/browser/chromeos/login/existing_user_controller.h +++ b/chrome/browser/chromeos/login/existing_user_controller.h @@ -240,7 +240,7 @@ class ExistingUserController : public LoginDisplay::Delegate, void OnOAuth2TokensFetched(bool success, const UserContext& user_context); // Public session auto-login timer. - scoped_ptr<base::OneShotTimer<ExistingUserController> > auto_login_timer_; + scoped_ptr<base::OneShotTimer> auto_login_timer_; // Public session auto-login timeout, in milliseconds. int public_session_auto_login_delay_; @@ -302,7 +302,7 @@ class ExistingUserController : public LoginDisplay::Delegate, base::Time time_init_; // Timer for the interval to wait for the reboot after TPM error UI was shown. - base::OneShotTimer<ExistingUserController> reboot_timer_; + base::OneShotTimer reboot_timer_; scoped_ptr<login::NetworkStateHelper> network_state_helper_; diff --git a/chrome/browser/chromeos/login/existing_user_controller_auto_login_unittest.cc b/chrome/browser/chromeos/login/existing_user_controller_auto_login_unittest.cc index f59b399..0725453 100644 --- a/chrome/browser/chromeos/login/existing_user_controller_auto_login_unittest.cc +++ b/chrome/browser/chromeos/login/existing_user_controller_auto_login_unittest.cc @@ -104,7 +104,7 @@ class ExistingUserControllerAutoLoginTest : public ::testing::Test { } // ExistingUserController private member accessors. - base::OneShotTimer<ExistingUserController>* auto_login_timer() { + base::OneShotTimer* auto_login_timer() { return existing_user_controller()->auto_login_timer_.get(); } diff --git a/chrome/browser/chromeos/login/existing_user_controller_browsertest.cc b/chrome/browser/chromeos/login/existing_user_controller_browsertest.cc index 0402be7..6192072 100644 --- a/chrome/browser/chromeos/login/existing_user_controller_browsertest.cc +++ b/chrome/browser/chromeos/login/existing_user_controller_browsertest.cc @@ -192,7 +192,7 @@ class ExistingUserControllerTest : public policy::DevicePolicyCrosBrowserTest { } // ExistingUserController private member accessors. - base::OneShotTimer<ExistingUserController>* auto_login_timer() { + base::OneShotTimer* auto_login_timer() { return existing_user_controller()->auto_login_timer_.get(); } @@ -559,7 +559,7 @@ IN_PROC_BROWSER_TEST_F(ExistingUserControllerPublicSessionTest, // Wait for the timer to fire. base::RunLoop runner; - base::OneShotTimer<base::RunLoop> timer; + base::OneShotTimer timer; timer.Start(FROM_HERE, base::TimeDelta::FromMilliseconds(kAutoLoginShortDelay + 1), runner.QuitClosure()); diff --git a/chrome/browser/chromeos/login/kiosk_browsertest.cc b/chrome/browser/chromeos/login/kiosk_browsertest.cc index e8b1dc7e..9079645 100644 --- a/chrome/browser/chromeos/login/kiosk_browsertest.cc +++ b/chrome/browser/chromeos/login/kiosk_browsertest.cc @@ -260,7 +260,7 @@ class JsConditionWaiter { if (CheckJs()) return; - base::RepeatingTimer<JsConditionWaiter> check_timer; + base::RepeatingTimer check_timer; check_timer.Start( FROM_HERE, base::TimeDelta::FromMilliseconds(10), diff --git a/chrome/browser/chromeos/login/saml/saml_offline_signin_limiter.cc b/chrome/browser/chromeos/login/saml/saml_offline_signin_limiter.cc index 42ee55c..826aa1c 100644 --- a/chrome/browser/chromeos/login/saml/saml_offline_signin_limiter.cc +++ b/chrome/browser/chromeos/login/saml/saml_offline_signin_limiter.cc @@ -127,8 +127,7 @@ void SAMLOfflineSigninLimiter::UpdateLimit() { // Arm |offline_signin_limit_timer_| so that it sets the flag enforcing online // login when the limit expires. - offline_signin_limit_timer_.reset( - new base::OneShotTimer<SAMLOfflineSigninLimiter>); + offline_signin_limit_timer_.reset(new base::OneShotTimer); offline_signin_limit_timer_->Start( FROM_HERE, offline_signin_time_limit - time_since_last_gaia_signin, diff --git a/chrome/browser/chromeos/login/saml/saml_offline_signin_limiter.h b/chrome/browser/chromeos/login/saml/saml_offline_signin_limiter.h index dca8d61..e6cdd2b 100644 --- a/chrome/browser/chromeos/login/saml/saml_offline_signin_limiter.h +++ b/chrome/browser/chromeos/login/saml/saml_offline_signin_limiter.h @@ -66,8 +66,7 @@ class SAMLOfflineSigninLimiter : public KeyedService { PrefChangeRegistrar pref_change_registrar_; - scoped_ptr<base::OneShotTimer<SAMLOfflineSigninLimiter> > - offline_signin_limit_timer_; + scoped_ptr<base::OneShotTimer> offline_signin_limit_timer_; DISALLOW_COPY_AND_ASSIGN(SAMLOfflineSigninLimiter); }; diff --git a/chrome/browser/chromeos/login/screens/network_screen.h b/chrome/browser/chromeos/login/screens/network_screen.h index d5c96bc..9746a39 100644 --- a/chrome/browser/chromeos/login/screens/network_screen.h +++ b/chrome/browser/chromeos/login/screens/network_screen.h @@ -162,7 +162,7 @@ class NetworkScreen : public NetworkModel, bool continue_pressed_; // Timer for connection timeout. - base::OneShotTimer<NetworkScreen> connection_timer_; + base::OneShotTimer connection_timer_; scoped_ptr<CrosSettings::ObserverSubscription> timezone_subscription_; diff --git a/chrome/browser/chromeos/login/screens/terms_of_service_screen.h b/chrome/browser/chromeos/login/screens/terms_of_service_screen.h index 8d19eb8..1d8aa1d 100644 --- a/chrome/browser/chromeos/login/screens/terms_of_service_screen.h +++ b/chrome/browser/chromeos/login/screens/terms_of_service_screen.h @@ -60,7 +60,7 @@ class TermsOfServiceScreen : public BaseScreen, // Timer that enforces a custom (shorter) timeout on the attempt to download // the Terms of Service. - base::OneShotTimer<TermsOfServiceScreen> download_timer_; + base::OneShotTimer download_timer_; DISALLOW_COPY_AND_ASSIGN(TermsOfServiceScreen); }; diff --git a/chrome/browser/chromeos/login/screens/update_screen.cc b/chrome/browser/chromeos/login/screens/update_screen.cc index 995b9a8..f7d0c99 100644 --- a/chrome/browser/chromeos/login/screens/update_screen.cc +++ b/chrome/browser/chromeos/login/screens/update_screen.cc @@ -593,8 +593,7 @@ void UpdateScreen::DelayErrorMessage() { &UpdateScreen::ShowErrorMessage); } -base::OneShotTimer<UpdateScreen>& -UpdateScreen::GetErrorMessageTimerForTesting() { +base::OneShotTimer& UpdateScreen::GetErrorMessageTimerForTesting() { return error_message_timer_; } diff --git a/chrome/browser/chromeos/login/screens/update_screen.h b/chrome/browser/chromeos/login/screens/update_screen.h index 44de547..cdc1d7a 100644 --- a/chrome/browser/chromeos/login/screens/update_screen.h +++ b/chrome/browser/chromeos/login/screens/update_screen.h @@ -77,7 +77,7 @@ class UpdateScreen : public UpdateModel, // Skip update UI, usually used only in debug builds/tests. void CancelUpdate(); - base::OneShotTimer<UpdateScreen>& GetErrorMessageTimerForTesting(); + base::OneShotTimer& GetErrorMessageTimerForTesting(); private: FRIEND_TEST_ALL_PREFIXES(UpdateScreenTest, TestBasic); @@ -126,7 +126,7 @@ class UpdateScreen : public UpdateModel, // Timer for the interval to wait for the reboot. // If reboot didn't happen - ask user to reboot manually. - base::OneShotTimer<UpdateScreen> reboot_timer_; + base::OneShotTimer reboot_timer_; // Returns a static InstanceSet. typedef std::set<UpdateScreen*> InstanceSet; @@ -181,7 +181,7 @@ class UpdateScreen : public UpdateModel, // Timer for the captive portal detector to show portal login page. // If redirect did not happen during this delay, error message is shown // instead. - base::OneShotTimer<UpdateScreen> error_message_timer_; + base::OneShotTimer error_message_timer_; ErrorScreen::ConnectRequestCallbackSubscription connect_request_subscription_; diff --git a/chrome/browser/chromeos/login/screens/user_selection_screen.h b/chrome/browser/chromeos/login/screens/user_selection_screen.h index 7b9c684..54fdd68 100644 --- a/chrome/browser/chromeos/login/screens/user_selection_screen.h +++ b/chrome/browser/chromeos/login/screens/user_selection_screen.h @@ -141,7 +141,7 @@ class UserSelectionScreen user_auth_type_map_; // Timer for measuring idle state duration before password clear. - base::OneShotTimer<UserSelectionScreen> password_clear_timer_; + base::OneShotTimer password_clear_timer_; // Token handler util for checking user OAuth token status. scoped_ptr<TokenHandleUtil> token_handle_util_; diff --git a/chrome/browser/chromeos/login/screenshot_testing/screenshot_testing_mixin.h b/chrome/browser/chromeos/login/screenshot_testing/screenshot_testing_mixin.h index 5d1c0c2..b8cdd8b 100644 --- a/chrome/browser/chromeos/login/screenshot_testing/screenshot_testing_mixin.h +++ b/chrome/browser/chromeos/login/screenshot_testing/screenshot_testing_mixin.h @@ -50,7 +50,7 @@ class ScreenshotTestingMixin : public MixinBasedBrowserTest::Mixin { // Required for current implementation of // SynchronizeAnimationLoadWithCompositor() - base::OneShotTimer<ScreenshotTestingMixin> timer_; + base::OneShotTimer timer_; base::Closure animation_waiter_quitter_; // Is true if testing with screenshots is turned on with all proper switches. diff --git a/chrome/browser/chromeos/login/supervised/supervised_user_creation_controller_new.h b/chrome/browser/chromeos/login/supervised/supervised_user_creation_controller_new.h index 6e0c6ac..597fab0 100644 --- a/chrome/browser/chromeos/login/supervised/supervised_user_creation_controller_new.h +++ b/chrome/browser/chromeos/login/supervised/supervised_user_creation_controller_new.h @@ -179,7 +179,7 @@ class SupervisedUserCreationControllerNew scoped_ptr<UserCreationContext> creation_context_; // Timer for showing warning if creation process takes too long. - base::OneShotTimer<SupervisedUserCreationControllerNew> timeout_timer_; + base::OneShotTimer timeout_timer_; // Factory of callbacks. base::WeakPtrFactory<SupervisedUserCreationControllerNew> weak_factory_; diff --git a/chrome/browser/chromeos/login/users/avatar/user_image_manager_impl.h b/chrome/browser/chromeos/login/users/avatar/user_image_manager_impl.h index 8a0875f..5b42bcc 100644 --- a/chrome/browser/chromeos/login/users/avatar/user_image_manager_impl.h +++ b/chrome/browser/chromeos/login/users/avatar/user_image_manager_impl.h @@ -199,11 +199,11 @@ class UserImageManagerImpl // Timer used to start a profile data download shortly after login and to // restart the download after network errors. - base::OneShotTimer<UserImageManagerImpl> profile_download_one_shot_timer_; + base::OneShotTimer profile_download_one_shot_timer_; // Timer used to periodically start a profile data, ensuring the profile data // stays up to date. - base::RepeatingTimer<UserImageManagerImpl> profile_download_periodic_timer_; + base::RepeatingTimer profile_download_periodic_timer_; // Sync observer for the currently logged-in user. scoped_ptr<UserImageSyncObserver> user_image_sync_observer_; diff --git a/chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager.cc b/chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager.cc index c62a490..8a58aba 100644 --- a/chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager.cc +++ b/chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager.cc @@ -265,7 +265,7 @@ class WallpaperManager::PendingWallpaper : // This is "on destroy" callback that will call OnWallpaperSet() when // image will be loaded. wallpaper::MovableOnDestroyCallbackHolder on_finish_; - base::OneShotTimer<WallpaperManager::PendingWallpaper> timer; + base::OneShotTimer timer; // Load start time to calculate duration. base::Time started_load_at_; diff --git a/chrome/browser/chromeos/login/wizard_controller.h b/chrome/browser/chromeos/login/wizard_controller.h index 2a84f43..eaae940 100644 --- a/chrome/browser/chromeos/login/wizard_controller.h +++ b/chrome/browser/chromeos/login/wizard_controller.h @@ -353,7 +353,7 @@ class WizardController : public BaseScreenDelegate, // Default WizardController. static WizardController* default_controller_; - base::OneShotTimer<WizardController> smooth_show_timer_; + base::OneShotTimer smooth_show_timer_; OobeDisplay* oobe_display_; diff --git a/chrome/browser/chromeos/mobile/mobile_activator.h b/chrome/browser/chromeos/mobile/mobile_activator.h index 2c51419..ae80d11 100644 --- a/chrome/browser/chromeos/mobile/mobile_activator.h +++ b/chrome/browser/chromeos/mobile/mobile_activator.h @@ -307,14 +307,14 @@ class MobileActivator // Payment portal reload/reconnect attempt count. int payment_reconnect_count_; // Timer that monitors how long we spend in error-prone states. - base::RepeatingTimer<MobileActivator> state_duration_timer_; + base::RepeatingTimer state_duration_timer_; // State we will return to if we are disconnected. PlanActivationState post_reconnect_state_; // Called to continue the reconnect attempt. - base::RepeatingTimer<MobileActivator> continue_reconnect_timer_; + base::RepeatingTimer continue_reconnect_timer_; // Called when the reconnect attempt times out. - base::OneShotTimer<MobileActivator> reconnect_timeout_timer_; + base::OneShotTimer reconnect_timeout_timer_; // Cellular plan payment time. base::Time cellular_plan_payment_time_; diff --git a/chrome/browser/chromeos/policy/device_status_collector.h b/chrome/browser/chromeos/policy/device_status_collector.h index bc10701..c0c97d8 100644 --- a/chrome/browser/chromeos/policy/device_status_collector.h +++ b/chrome/browser/chromeos/policy/device_status_collector.h @@ -215,9 +215,9 @@ class DeviceStatusCollector { // Whether a geolocation update is currently in progress. bool geolocation_update_in_progress_; - base::RepeatingTimer<DeviceStatusCollector> idle_poll_timer_; - base::RepeatingTimer<DeviceStatusCollector> hardware_status_sampling_timer_; - base::OneShotTimer<DeviceStatusCollector> geolocation_update_timer_; + base::RepeatingTimer idle_poll_timer_; + base::RepeatingTimer hardware_status_sampling_timer_; + base::OneShotTimer geolocation_update_timer_; std::string os_version_; std::string firmware_version_; diff --git a/chrome/browser/chromeos/policy/recommendation_restorer.h b/chrome/browser/chromeos/policy/recommendation_restorer.h index 7063754..d357794 100644 --- a/chrome/browser/chromeos/policy/recommendation_restorer.h +++ b/chrome/browser/chromeos/policy/recommendation_restorer.h @@ -64,7 +64,7 @@ class RecommendationRestorer : public KeyedService, bool logged_in_; - base::OneShotTimer<RecommendationRestorer> restore_timer_; + base::OneShotTimer restore_timer_; DISALLOW_COPY_AND_ASSIGN(RecommendationRestorer); }; diff --git a/chrome/browser/chromeos/policy/remote_commands/device_command_reboot_job.h b/chrome/browser/chromeos/policy/remote_commands/device_command_reboot_job.h index 711ec3d..a3b78dc 100644 --- a/chrome/browser/chromeos/policy/remote_commands/device_command_reboot_job.h +++ b/chrome/browser/chromeos/policy/remote_commands/device_command_reboot_job.h @@ -39,7 +39,7 @@ class DeviceCommandRebootJob : public RemoteCommandJob { chromeos::PowerManagerClient* power_manager_client_; - base::OneShotTimer<DeviceCommandRebootJob> reboot_timer_; + base::OneShotTimer reboot_timer_; base::WeakPtrFactory<DeviceCommandRebootJob> weak_ptr_factory_; diff --git a/chrome/browser/chromeos/power/cpu_data_collector.h b/chrome/browser/chromeos/power/cpu_data_collector.h index d0734c6..59ad804 100644 --- a/chrome/browser/chromeos/power/cpu_data_collector.h +++ b/chrome/browser/chromeos/power/cpu_data_collector.h @@ -84,7 +84,7 @@ class CpuDataCollector { const std::vector<std::string>* cpu_freq_state_names, const std::vector<StateOccupancySample>* freq_samples); - base::RepeatingTimer<CpuDataCollector> timer_; + base::RepeatingTimer timer_; // Names of the idle states. std::vector<std::string> cpu_idle_state_names_; diff --git a/chrome/browser/chromeos/power/idle_action_warning_dialog_view.h b/chrome/browser/chromeos/power/idle_action_warning_dialog_view.h index 793a057..52e2daf 100644 --- a/chrome/browser/chromeos/power/idle_action_warning_dialog_view.h +++ b/chrome/browser/chromeos/power/idle_action_warning_dialog_view.h @@ -42,7 +42,7 @@ class IdleActionWarningDialogView : public views::DialogDelegateView { views::Label* label_; - base::RepeatingTimer<IdleActionWarningDialogView> update_timer_; + base::RepeatingTimer update_timer_; DISALLOW_COPY_AND_ASSIGN(IdleActionWarningDialogView); }; diff --git a/chrome/browser/chromeos/session_length_limiter.cc b/chrome/browser/chromeos/session_length_limiter.cc index f26cf448..7bc17ad 100644 --- a/chrome/browser/chromeos/session_length_limiter.cc +++ b/chrome/browser/chromeos/session_length_limiter.cc @@ -204,7 +204,7 @@ void SessionLengthLimiter::UpdateLimit() { } // Set a timer to log out the user when the session length limit is reached. - timer_.reset(new base::OneShotTimer<SessionLengthLimiter::Delegate>); + timer_.reset(new base::OneShotTimer); timer_->Start(FROM_HERE, remaining, delegate_.get(), &SessionLengthLimiter::Delegate::StopSession); } diff --git a/chrome/browser/chromeos/session_length_limiter.h b/chrome/browser/chromeos/session_length_limiter.h index 16c34f8..46a2765 100644 --- a/chrome/browser/chromeos/session_length_limiter.h +++ b/chrome/browser/chromeos/session_length_limiter.h @@ -63,7 +63,7 @@ class SessionLengthLimiter : public ui::UserActivityObserver { scoped_ptr<Delegate> delegate_; PrefChangeRegistrar pref_change_registrar_; - scoped_ptr<base::OneShotTimer<SessionLengthLimiter::Delegate> > timer_; + scoped_ptr<base::OneShotTimer> timer_; base::TimeTicks session_start_time_; bool user_activity_seen_; diff --git a/chrome/browser/chromeos/system/automatic_reboot_manager.cc b/chrome/browser/chromeos/system/automatic_reboot_manager.cc index a15e3a7..050b767 100644 --- a/chrome/browser/chromeos/system/automatic_reboot_manager.cc +++ b/chrome/browser/chromeos/system/automatic_reboot_manager.cc @@ -178,8 +178,7 @@ AutomaticRebootManager::AutomaticRebootManager( ui::UserActivityDetector::Get()->AddObserver(this); notification_registrar_.Add(this, chrome::NOTIFICATION_LOGIN_USER_CHANGED, content::NotificationService::AllSources()); - login_screen_idle_timer_.reset( - new base::OneShotTimer<AutomaticRebootManager>); + login_screen_idle_timer_.reset(new base::OneShotTimer); OnUserActivity(NULL); } @@ -252,8 +251,7 @@ void AutomaticRebootManager::OnUserActivity(const ui::Event* event) { // Destroying and re-creating the timer ensures that Start() posts a fresh // task with a delay of exactly |kLoginManagerIdleTimeoutMs|, ensuring that // the timer fires predictably in tests. - login_screen_idle_timer_.reset( - new base::OneShotTimer<AutomaticRebootManager>); + login_screen_idle_timer_.reset(new base::OneShotTimer); login_screen_idle_timer_->Start( FROM_HERE, base::TimeDelta::FromMilliseconds(kLoginManagerIdleTimeoutMs), @@ -363,7 +361,7 @@ void AutomaticRebootManager::Reschedule() { // Set up a timer for the start of the grace period. If the grace period // started in the past, the timer is still used with its delay set to zero. if (!grace_start_timer_) - grace_start_timer_.reset(new base::OneShotTimer<AutomaticRebootManager>); + grace_start_timer_.reset(new base::OneShotTimer); grace_start_timer_->Start(FROM_HERE, std::max(grace_start_time - now, kZeroTimeDelta), base::Bind(&AutomaticRebootManager::RequestReboot, @@ -374,7 +372,7 @@ void AutomaticRebootManager::Reschedule() { // Set up a timer for the end of the grace period. If the grace period ended // in the past, the timer is still used with its delay set to zero. if (!grace_end_timer_) - grace_end_timer_.reset(new base::OneShotTimer<AutomaticRebootManager>); + grace_end_timer_.reset(new base::OneShotTimer); grace_end_timer_->Start(FROM_HERE, std::max(grace_end_time - now, kZeroTimeDelta), base::Bind(&AutomaticRebootManager::Reboot, diff --git a/chrome/browser/chromeos/system/automatic_reboot_manager.h b/chrome/browser/chromeos/system/automatic_reboot_manager.h index 2dbc98e..6f03913 100644 --- a/chrome/browser/chromeos/system/automatic_reboot_manager.h +++ b/chrome/browser/chromeos/system/automatic_reboot_manager.h @@ -148,8 +148,7 @@ class AutomaticRebootManager : public PowerManagerClient::Observer, // Fires when the user has been idle on the login screen for a set amount of // time. - scoped_ptr<base::OneShotTimer<AutomaticRebootManager> > - login_screen_idle_timer_; + scoped_ptr<base::OneShotTimer> login_screen_idle_timer_; // The time at which the device was booted, in |clock_| ticks. bool have_boot_time_; @@ -167,8 +166,8 @@ class AutomaticRebootManager : public PowerManagerClient::Observer, bool reboot_requested_; // Timers that start and end the grace period. - scoped_ptr<base::OneShotTimer<AutomaticRebootManager> > grace_start_timer_; - scoped_ptr<base::OneShotTimer<AutomaticRebootManager> > grace_end_timer_; + scoped_ptr<base::OneShotTimer> grace_start_timer_; + scoped_ptr<base::OneShotTimer> grace_end_timer_; base::ObserverList<AutomaticRebootManagerObserver, true> observers_; diff --git a/chrome/browser/chromeos/system/automatic_reboot_manager_unittest.cc b/chrome/browser/chromeos/system/automatic_reboot_manager_unittest.cc index a6ac983..3fe61fb 100644 --- a/chrome/browser/chromeos/system/automatic_reboot_manager_unittest.cc +++ b/chrome/browser/chromeos/system/automatic_reboot_manager_unittest.cc @@ -134,8 +134,6 @@ class MockAutomaticRebootManagerObserver class AutomaticRebootManagerBasicTest : public testing::Test { protected: - typedef base::OneShotTimer<AutomaticRebootManager> Timer; - AutomaticRebootManagerBasicTest(); ~AutomaticRebootManagerBasicTest() override; @@ -190,8 +188,8 @@ class AutomaticRebootManagerBasicTest : public testing::Test { scoped_ptr<AutomaticRebootManager> automatic_reboot_manager_; private: - void VerifyTimerIsStopped(const Timer* timer) const; - void VerifyTimerIsRunning(const Timer* timer, + void VerifyTimerIsStopped(const base::OneShotTimer* timer) const; + void VerifyTimerIsRunning(const base::OneShotTimer* timer, const base::TimeDelta& delay) const; void VerifyLoginScreenIdleTimerIsRunning() const; @@ -542,13 +540,13 @@ void AutomaticRebootManagerBasicTest::SetUpdateStatusNeedReboot() { } void AutomaticRebootManagerBasicTest::VerifyTimerIsStopped( - const Timer* timer) const { + const base::OneShotTimer* timer) const { if (timer) EXPECT_FALSE(timer->IsRunning()); } void AutomaticRebootManagerBasicTest::VerifyTimerIsRunning( - const Timer* timer, + const base::OneShotTimer* timer, const base::TimeDelta& delay) const { ASSERT_TRUE(timer); EXPECT_TRUE(timer->IsRunning()); diff --git a/chrome/browser/chromeos/ui/idle_app_name_notification_view.cc b/chrome/browser/chromeos/ui/idle_app_name_notification_view.cc index 73b8f65..c9114f0 100644 --- a/chrome/browser/chromeos/ui/idle_app_name_notification_view.cc +++ b/chrome/browser/chromeos/ui/idle_app_name_notification_view.cc @@ -199,7 +199,7 @@ class IdleAppNameNotificationDelegateView } // A timer which calls us to remove the message from the screen. - base::OneShotTimer<IdleAppNameNotificationDelegateView> hide_timer_; + base::OneShotTimer hide_timer_; // The owner of this message which needs to get notified when the message // closes. diff --git a/chrome/browser/chromeos/upgrade_detector_chromeos.h b/chrome/browser/chromeos/upgrade_detector_chromeos.h index 467c15b..d92b4d9 100644 --- a/chrome/browser/chromeos/upgrade_detector_chromeos.h +++ b/chrome/browser/chromeos/upgrade_detector_chromeos.h @@ -51,7 +51,7 @@ class UpgradeDetectorChromeos : public UpgradeDetector, // After we detect an upgrade we start a recurring timer to see if enough time // has passed and we should start notifying the user. - base::RepeatingTimer<UpgradeDetectorChromeos> upgrade_notification_timer_; + base::RepeatingTimer upgrade_notification_timer_; bool initialized_; base::Time upgrade_detected_time_; diff --git a/chrome/browser/devtools/devtools_network_interceptor.h b/chrome/browser/devtools/devtools_network_interceptor.h index 971f585..01ba377 100644 --- a/chrome/browser/devtools/devtools_network_interceptor.h +++ b/chrome/browser/devtools/devtools_network_interceptor.h @@ -67,7 +67,7 @@ class DevToolsNetworkInterceptor { // Transactions waiting certain amount of transfer to be "accounted". std::vector<DevToolsNetworkTransaction*> throttled_transactions_; - base::OneShotTimer<DevToolsNetworkInterceptor> timer_; + base::OneShotTimer timer_; base::TimeTicks offset_; base::TimeDelta tick_length_; base::TimeDelta latency_length_; diff --git a/chrome/browser/enumerate_modules_model_win.h b/chrome/browser/enumerate_modules_model_win.h index b8920e6..adca0fb 100644 --- a/chrome/browser/enumerate_modules_model_win.h +++ b/chrome/browser/enumerate_modules_model_win.h @@ -333,7 +333,7 @@ class EnumerateModulesModel { // When this singleton object is constructed we go and fire off this timer to // start scanning for modules after a certain amount of time has passed. - base::OneShotTimer<EnumerateModulesModel> check_modules_timer_; + base::OneShotTimer check_modules_timer_; // While normally |false|, this mode can be set to indicate that the scanning // process should not rely on certain services normally available to Chrome, diff --git a/chrome/browser/extensions/activity_log/activity_database.h b/chrome/browser/extensions/activity_log/activity_database.h index 9479f0d..2011f0f 100644 --- a/chrome/browser/extensions/activity_log/activity_database.h +++ b/chrome/browser/extensions/activity_log/activity_database.h @@ -188,7 +188,7 @@ class ActivityDatabase { bool valid_db_; bool batch_mode_; base::TimeDelta batching_period_; - base::RepeatingTimer<ActivityDatabase> timer_; + base::RepeatingTimer timer_; bool already_closed_; bool did_init_; diff --git a/chrome/browser/extensions/api/audio_modem/audio_modem_api.cc b/chrome/browser/extensions/api/audio_modem/audio_modem_api.cc index 572979c..290544f 100644 --- a/chrome/browser/extensions/api/audio_modem/audio_modem_api.cc +++ b/chrome/browser/extensions/api/audio_modem/audio_modem_api.cc @@ -178,7 +178,7 @@ void AudioModemAPI::StartReceive(const std::string& app_id, modem_->StartRecording(audio_type); if (receive_timers_[audio_type].count(app_id) == 0) - receive_timers_[audio_type][app_id] = new base::OneShotTimer<AudioModemAPI>; + receive_timers_[audio_type][app_id] = new base::OneShotTimer; DCHECK(receive_timers_[audio_type][app_id]); receive_timers_[audio_type][app_id]->Start( FROM_HERE, diff --git a/chrome/browser/extensions/api/audio_modem/audio_modem_api.h b/chrome/browser/extensions/api/audio_modem/audio_modem_api.h index dcccbfe..77034b5 100644 --- a/chrome/browser/extensions/api/audio_modem/audio_modem_api.h +++ b/chrome/browser/extensions/api/audio_modem/audio_modem_api.h @@ -73,11 +73,11 @@ class AudioModemAPI final : public BrowserContextKeyedAPI { std::string transmitters_[2]; // Timeouts for the currently active transmits, indexed by AudioType. - base::OneShotTimer<AudioModemAPI> transmit_timers_[2]; + base::OneShotTimer transmit_timers_[2]; // Maps of currently receiving app ID => timeouts. Indexed by AudioType. // We own all of these pointers. Do not remove them without calling delete. - std::map<std::string, base::OneShotTimer<AudioModemAPI>*> receive_timers_[2]; + std::map<std::string, base::OneShotTimer*> receive_timers_[2]; // BrowserContextKeyedAPI implementation. static const bool kServiceIsCreatedWithBrowserContext = false; diff --git a/chrome/browser/extensions/api/dial/dial_registry.h b/chrome/browser/extensions/api/dial/dial_registry.h index 83caa38..613fcd4 100644 --- a/chrome/browser/extensions/api/dial/dial_registry.h +++ b/chrome/browser/extensions/api/dial/dial_registry.h @@ -166,7 +166,7 @@ class DialRegistry : public DialService::Observer, DeviceByLabelMap device_by_label_map_; // Timer used to manage periodic discovery requests. - base::RepeatingTimer<DialRegistry> repeating_timer_; + base::RepeatingTimer repeating_timer_; // Interface from which the DIAL API is notified of DIAL device events. the // DIAL API owns this DIAL registry. diff --git a/chrome/browser/extensions/api/dial/dial_service.h b/chrome/browser/extensions/api/dial/dial_service.h index 23ef579..6f1e7e9 100644 --- a/chrome/browser/extensions/api/dial/dial_service.h +++ b/chrome/browser/extensions/api/dial/dial_service.h @@ -268,14 +268,14 @@ class DialServiceImpl : public DialService, int max_requests_; // Timer for finishing discovery. - base::OneShotTimer<DialServiceImpl> finish_timer_; + base::OneShotTimer finish_timer_; // The delay for |finish_timer_|; how long to wait for discovery to finish. // Setting this to zero disables the timer. base::TimeDelta finish_delay_; // Timer for sending multiple requests at fixed intervals. - base::RepeatingTimer<DialServiceImpl> request_timer_; + base::RepeatingTimer request_timer_; // The delay for |request_timer_|; how long to wait between successive // requests. diff --git a/chrome/browser/extensions/api/easy_unlock_private/easy_unlock_private_api.cc b/chrome/browser/extensions/api/easy_unlock_private/easy_unlock_private_api.cc index 6fde8c4..2b92734 100644 --- a/chrome/browser/extensions/api/easy_unlock_private/easy_unlock_private_api.cc +++ b/chrome/browser/extensions/api/easy_unlock_private/easy_unlock_private_api.cc @@ -1077,8 +1077,7 @@ bool EasyUnlockPrivateFindSetupConnectionFunction::RunAsync() { connection_finder_->Find(base::Bind( &EasyUnlockPrivateFindSetupConnectionFunction::OnConnectionFound, this)); - timer_.reset( - new base::OneShotTimer<EasyUnlockPrivateFindSetupConnectionFunction>()); + timer_.reset(new base::OneShotTimer()); timer_->Start(FROM_HERE, base::TimeDelta::FromSeconds(params->time_out), base::Bind(&EasyUnlockPrivateFindSetupConnectionFunction:: OnConnectionFinderTimedOut, diff --git a/chrome/browser/extensions/updater/extension_updater.h b/chrome/browser/extensions/updater/extension_updater.h index e2999bb..75dd877 100644 --- a/chrome/browser/extensions/updater/extension_updater.h +++ b/chrome/browser/extensions/updater/extension_updater.h @@ -254,7 +254,7 @@ class ExtensionUpdater : public ExtensionDownloaderDelegate, // Fetches the crx files for the extensions that have an available update. scoped_ptr<ExtensionDownloader> downloader_; - base::OneShotTimer<ExtensionUpdater> timer_; + base::OneShotTimer timer_; int frequency_seconds_; bool will_check_soon_; diff --git a/chrome/browser/extensions/webstore_installer.h b/chrome/browser/extensions/webstore_installer.h index 58e76fa..4bddaf5 100644 --- a/chrome/browser/extensions/webstore_installer.h +++ b/chrome/browser/extensions/webstore_installer.h @@ -276,7 +276,7 @@ class WebstoreInstaller : public content::NotificationObserver, // Used to periodically update the extension's download status. This will // trigger at least every second, though sometimes more frequently (depending // on number of modules, etc). - base::OneShotTimer<WebstoreInstaller> download_progress_timer_; + base::OneShotTimer download_progress_timer_; scoped_ptr<Approval> approval_; GURL download_url_; scoped_refptr<CrxInstaller> crx_installer_; diff --git a/chrome/browser/image_decoder.cc b/chrome/browser/image_decoder.cc index 7d26e80..bd5ec1eb 100644 --- a/chrome/browser/image_decoder.cc +++ b/chrome/browser/image_decoder.cc @@ -125,10 +125,8 @@ void ImageDecoder::DecodeImageInSandbox( if (!batch_mode_timer_) { // Created here so it will call StopBatchMode() on the right thread. - batch_mode_timer_.reset(new base::DelayTimer<ImageDecoder>( - FROM_HERE, - base::TimeDelta::FromSeconds(kBatchModeTimeoutSeconds), - this, + batch_mode_timer_.reset(new base::DelayTimer( + FROM_HERE, base::TimeDelta::FromSeconds(kBatchModeTimeoutSeconds), this, &ImageDecoder::StopBatchMode)); } batch_mode_timer_->Reset(); diff --git a/chrome/browser/image_decoder.h b/chrome/browser/image_decoder.h index 9e0b3ed..13d903d 100644 --- a/chrome/browser/image_decoder.h +++ b/chrome/browser/image_decoder.h @@ -150,7 +150,7 @@ class ImageDecoder : public content::UtilityProcessHostClient { // Calls StopBatchMode() after |kBatchModeTimeoutSeconds| have elapsed, // unless a new decoding request resets the timer. - scoped_ptr<base::DelayTimer<ImageDecoder>> batch_mode_timer_; + scoped_ptr<base::DelayTimer> batch_mode_timer_; DISALLOW_COPY_AND_ASSIGN(ImageDecoder); }; diff --git a/chrome/browser/jumplist_win.h b/chrome/browser/jumplist_win.h index 28f751c..5033d270 100644 --- a/chrome/browser/jumplist_win.h +++ b/chrome/browser/jumplist_win.h @@ -170,7 +170,7 @@ class JumpList : public sessions::TabRestoreServiceObserver, ShellLinkItemList recently_closed_pages_; // Timer for requesting delayed updates of the jumplist. - base::OneShotTimer<JumpList> timer_; + base::OneShotTimer timer_; // A list of URLs we need to retrieve their favicons, // protected by the list_lock_. diff --git a/chrome/browser/media/android/remote/remote_media_player_bridge.h b/chrome/browser/media/android/remote/remote_media_player_bridge.h index f1f506c..ce36079 100644 --- a/chrome/browser/media/android/remote/remote_media_player_bridge.h +++ b/chrome/browser/media/android/remote/remote_media_player_bridge.h @@ -117,7 +117,7 @@ class RemoteMediaPlayerBridge : public media::MediaPlayerAndroid { bool pending_play_; int width_; int height_; - base::RepeatingTimer<RemoteMediaPlayerBridge> time_update_timer_; + base::RepeatingTimer time_update_timer_; base::TimeDelta duration_; bool should_seek_on_prepare_; base::TimeDelta pending_seek_; diff --git a/chrome/browser/memory/oom_priority_manager.h b/chrome/browser/memory/oom_priority_manager.h index 1b50a33..5a13d2b 100644 --- a/chrome/browser/memory/oom_priority_manager.h +++ b/chrome/browser/memory/oom_priority_manager.h @@ -129,11 +129,11 @@ class OomPriorityManager { static bool CompareTabStats(TabStats first, TabStats second); // Timer to periodically update the stats of the renderers. - base::RepeatingTimer<OomPriorityManager> update_timer_; + base::RepeatingTimer update_timer_; // Timer to periodically report whether a tab has been discarded since the // last time the timer has fired. - base::RepeatingTimer<OomPriorityManager> recent_tab_discard_timer_; + base::RepeatingTimer recent_tab_discard_timer_; // A listener to global memory pressure events. scoped_ptr<base::MemoryPressureListener> memory_pressure_listener_; diff --git a/chrome/browser/memory/oom_priority_manager_delegate_chromeos.h b/chrome/browser/memory/oom_priority_manager_delegate_chromeos.h index a9824b4..b8ce1fc 100644 --- a/chrome/browser/memory/oom_priority_manager_delegate_chromeos.h +++ b/chrome/browser/memory/oom_priority_manager_delegate_chromeos.h @@ -65,7 +65,7 @@ class OomPriorityManagerDelegate : public content::NotificationObserver { // Registrar to receive renderer notifications. content::NotificationRegistrar registrar_; // Timer to guarantee that the tab is focused for a certain amount of time. - base::OneShotTimer<OomPriorityManagerDelegate> focus_tab_score_adjust_timer_; + base::OneShotTimer focus_tab_score_adjust_timer_; // This lock is for |oom_score_map_| and |focused_tab_process_info_|. base::Lock oom_score_lock_; // Map maintaining the child process host id - oom_score mapping. diff --git a/chrome/browser/metrics/perf/perf_provider_chromeos.h b/chrome/browser/metrics/perf/perf_provider_chromeos.h index 147d09c..64b28d2 100644 --- a/chrome/browser/metrics/perf/perf_provider_chromeos.h +++ b/chrome/browser/metrics/perf/perf_provider_chromeos.h @@ -115,7 +115,7 @@ class PerfProvider : public base::NonThreadSafe, std::vector<SampledProfile> cached_perf_data_; // For scheduling collection of perf data. - base::OneShotTimer<PerfProvider> timer_; + base::OneShotTimer timer_; // For detecting when changes to the login state. LoginObserver login_observer_; diff --git a/chrome/browser/metrics/variations/variations_registry_syncer_win.h b/chrome/browser/metrics/variations/variations_registry_syncer_win.h index 32487c4..11dc3ab 100644 --- a/chrome/browser/metrics/variations/variations_registry_syncer_win.h +++ b/chrome/browser/metrics/variations/variations_registry_syncer_win.h @@ -31,7 +31,7 @@ class VariationsRegistrySyncer { // after initial batch of field trials are created, and also to avoid blocking // the UI thread. The timer effectively allows this class to batch together // update requests, to avoid reading and writing from the registry too much. - base::OneShotTimer<VariationsRegistrySyncer> timer_; + base::OneShotTimer timer_; DISALLOW_COPY_AND_ASSIGN(VariationsRegistrySyncer); }; diff --git a/chrome/browser/net/predictor_unittest.cc b/chrome/browser/net/predictor_unittest.cc index 8a2d9d0..132f95c 100644 --- a/chrome/browser/net/predictor_unittest.cc +++ b/chrome/browser/net/predictor_unittest.cc @@ -39,17 +39,16 @@ namespace chrome_browser_net { class WaitForResolutionHelper; -typedef base::RepeatingTimer<WaitForResolutionHelper> HelperTimer; - class WaitForResolutionHelper { public: - WaitForResolutionHelper(Predictor* predictor, const UrlList& hosts, - HelperTimer* timer, int checks_until_quit) + WaitForResolutionHelper(Predictor* predictor, + const UrlList& hosts, + base::RepeatingTimer* timer, + int checks_until_quit) : predictor_(predictor), hosts_(hosts), timer_(timer), - checks_until_quit_(checks_until_quit) { - } + checks_until_quit_(checks_until_quit) {} void CheckIfResolutionsDone() { if (--checks_until_quit_ > 0) { @@ -70,7 +69,7 @@ class WaitForResolutionHelper { private: Predictor* predictor_; const UrlList hosts_; - HelperTimer* timer_; + base::RepeatingTimer* timer_; int checks_until_quit_; }; @@ -102,7 +101,7 @@ class PredictorTest : public testing::Test { } void WaitForResolution(Predictor* predictor, const UrlList& hosts) { - HelperTimer* timer = new HelperTimer(); + base::RepeatingTimer* timer = new base::RepeatingTimer(); // By default allow the loop to run for a minute -- 600 iterations. timer->Start(FROM_HERE, TimeDelta::FromMilliseconds(100), new WaitForResolutionHelper(predictor, hosts, timer, 600), @@ -112,7 +111,7 @@ class PredictorTest : public testing::Test { void WaitForResolutionWithLimit( Predictor* predictor, const UrlList& hosts, int limit) { - HelperTimer* timer = new HelperTimer(); + base::RepeatingTimer* timer = new base::RepeatingTimer(); timer->Start(FROM_HERE, TimeDelta::FromMilliseconds(100), new WaitForResolutionHelper(predictor, hosts, timer, limit), &WaitForResolutionHelper::CheckIfResolutionsDone); diff --git a/chrome/browser/net/utility_process_mojo_proxy_resolver_factory.h b/chrome/browser/net/utility_process_mojo_proxy_resolver_factory.h index 6bbc1ca..a14f652 100644 --- a/chrome/browser/net/utility_process_mojo_proxy_resolver_factory.h +++ b/chrome/browser/net/utility_process_mojo_proxy_resolver_factory.h @@ -59,7 +59,7 @@ class UtilityProcessMojoProxyResolverFactory base::WeakPtr<content::UtilityProcessHost> weak_utility_process_host_; size_t num_proxy_resolvers_ = 0; - base::OneShotTimer<UtilityProcessMojoProxyResolverFactory> idle_timer_; + base::OneShotTimer idle_timer_; base::ThreadChecker thread_checker_; diff --git a/chrome/browser/notifications/extension_welcome_notification.cc b/chrome/browser/notifications/extension_welcome_notification.cc index 383107f..b34bf3d 100644 --- a/chrome/browser/notifications/extension_welcome_notification.cc +++ b/chrome/browser/notifications/extension_welcome_notification.cc @@ -308,8 +308,7 @@ void ExtensionWelcomeNotification::StartExpirationTimer() { expiration_timestamp = GetExpirationTimestamp(); DCHECK(!expiration_timestamp.is_null()); } - expiration_timer_.reset( - new base::OneShotTimer<ExtensionWelcomeNotification>()); + expiration_timer_.reset(new base::OneShotTimer()); expiration_timer_->Start( FROM_HERE, expiration_timestamp - delegate_->GetCurrentTime(), diff --git a/chrome/browser/notifications/extension_welcome_notification.h b/chrome/browser/notifications/extension_welcome_notification.h index 728a1b9..3e26c50 100644 --- a/chrome/browser/notifications/extension_welcome_notification.h +++ b/chrome/browser/notifications/extension_welcome_notification.h @@ -152,8 +152,7 @@ class ExtensionWelcomeNotification // If the welcome notification is shown, this timer tracks when to hide the // welcome notification. - scoped_ptr<base::OneShotTimer<ExtensionWelcomeNotification> > - expiration_timer_; + scoped_ptr<base::OneShotTimer> expiration_timer_; // Delegate for Chrome global calls like base::Time::GetTime() for // testability. diff --git a/chrome/browser/notifications/screen_lock_notification_blocker.h b/chrome/browser/notifications/screen_lock_notification_blocker.h index 698ba28..4aff911 100644 --- a/chrome/browser/notifications/screen_lock_notification_blocker.h +++ b/chrome/browser/notifications/screen_lock_notification_blocker.h @@ -28,7 +28,7 @@ class ScreenLockNotificationBlocker private: bool is_locked_; - base::OneShotTimer<ScreenLockNotificationBlocker> timer_; + base::OneShotTimer timer_; DISALLOW_COPY_AND_ASSIGN(ScreenLockNotificationBlocker); }; diff --git a/chrome/browser/performance_monitor/performance_monitor.h b/chrome/browser/performance_monitor/performance_monitor.h index 7e1b20f..d06af4d 100644 --- a/chrome/browser/performance_monitor/performance_monitor.h +++ b/chrome/browser/performance_monitor/performance_monitor.h @@ -67,7 +67,7 @@ class PerformanceMonitor { MetricsMap metrics_map_; // The timer to signal PerformanceMonitor to perform its timed collections. - base::OneShotTimer<PerformanceMonitor> repeating_timer_; + base::OneShotTimer repeating_timer_; DISALLOW_COPY_AND_ASSIGN(PerformanceMonitor); }; diff --git a/chrome/browser/power/process_power_collector.h b/chrome/browser/power/process_power_collector.h index 7976e83..533a575 100644 --- a/chrome/browser/power/process_power_collector.h +++ b/chrome/browser/power/process_power_collector.h @@ -135,7 +135,7 @@ class ProcessPowerCollector const GURL& origin); ProcessMetricsMap metrics_map_; - base::RepeatingTimer<ProcessPowerCollector> timer_; + base::RepeatingTimer timer_; // Callback to use to get CPU usage if set. CpuUsageCallback cpu_usage_callback_; diff --git a/chrome/browser/prerender/prerender_manager.h b/chrome/browser/prerender/prerender_manager.h index 2ba76b4..8969e19 100644 --- a/chrome/browser/prerender/prerender_manager.h +++ b/chrome/browser/prerender/prerender_manager.h @@ -509,7 +509,7 @@ class PrerenderManager : public base::SupportsWeakPtr<PrerenderManager>, // RepeatingTimer to perform periodic cleanups of pending prerendered // pages. - base::RepeatingTimer<PrerenderManager> repeating_timer_; + base::RepeatingTimer repeating_timer_; // Track time of last prerender to limit prerender spam. base::TimeTicks last_prerender_start_time_; diff --git a/chrome/browser/printing/print_view_manager_base.cc b/chrome/browser/printing/print_view_manager_base.cc index 8ca2486d..6515b03 100644 --- a/chrome/browser/printing/print_view_manager_base.cc +++ b/chrome/browser/printing/print_view_manager_base.cc @@ -450,7 +450,7 @@ bool PrintViewManagerBase::RunInnerMessageLoop() { // be CPU bound, the page overly complex/large or the system just // memory-bound. static const int kPrinterSettingsTimeout = 60000; - base::OneShotTimer<base::MessageLoop> quit_timer; + base::OneShotTimer quit_timer; quit_timer.Start(FROM_HERE, TimeDelta::FromMilliseconds(kPrinterSettingsTimeout), base::MessageLoop::current(), &base::MessageLoop::Quit); diff --git a/chrome/browser/process_singleton_posix.cc b/chrome/browser/process_singleton_posix.cc index 5e2635e..81a5c5f 100644 --- a/chrome/browser/process_singleton_posix.cc +++ b/chrome/browser/process_singleton_posix.cc @@ -516,7 +516,7 @@ class ProcessSingleton::LinuxWatcher // reads. size_t bytes_read_; - base::OneShotTimer<SocketReader> timer_; + base::OneShotTimer timer_; DISALLOW_COPY_AND_ASSIGN(SocketReader); }; diff --git a/chrome/browser/profile_resetter/brandcode_config_fetcher.h b/chrome/browser/profile_resetter/brandcode_config_fetcher.h index 4495454..d0bc537 100644 --- a/chrome/browser/profile_resetter/brandcode_config_fetcher.h +++ b/chrome/browser/profile_resetter/brandcode_config_fetcher.h @@ -41,7 +41,7 @@ class BrandcodeConfigFetcher : public net::URLFetcherDelegate { // Timer that enforces a timeout on the attempt to download the // config file. - base::OneShotTimer<BrandcodeConfigFetcher> download_timer_; + base::OneShotTimer download_timer_; // |fetch_callback_| called when fetching succeeded or failed. FetchCallback fetch_callback_; diff --git a/chrome/browser/profiles/gaia_info_update_service.h b/chrome/browser/profiles/gaia_info_update_service.h index c2f77cc..17cab93 100644 --- a/chrome/browser/profiles/gaia_info_update_service.h +++ b/chrome/browser/profiles/gaia_info_update_service.h @@ -62,7 +62,7 @@ class GAIAInfoUpdateService : public KeyedService, Profile* profile_; scoped_ptr<ProfileDownloader> profile_image_downloader_; base::Time last_updated_; - base::OneShotTimer<GAIAInfoUpdateService> timer_; + base::OneShotTimer timer_; DISALLOW_COPY_AND_ASSIGN(GAIAInfoUpdateService); }; diff --git a/chrome/browser/profiles/profile_impl.h b/chrome/browser/profiles/profile_impl.h index 8bbf7e1..89b98ab 100644 --- a/chrome/browser/profiles/profile_impl.h +++ b/chrome/browser/profiles/profile_impl.h @@ -243,7 +243,7 @@ class ProfileImpl : public Profile { ExitType last_session_exit_type_; #if defined(ENABLE_SESSION_SERVICE) - base::OneShotTimer<ProfileImpl> create_session_service_timer_; + base::OneShotTimer create_session_service_timer_; #endif scoped_ptr<Profile> off_the_record_profile_; diff --git a/chrome/browser/renderer_context_menu/spelling_menu_observer.h b/chrome/browser/renderer_context_menu/spelling_menu_observer.h index a29965d..adfead7 100644 --- a/chrome/browser/renderer_context_menu/spelling_menu_observer.h +++ b/chrome/browser/renderer_context_menu/spelling_menu_observer.h @@ -59,8 +59,8 @@ class SpellingMenuObserver : public RenderViewContextMenuObserver { const std::vector<SpellCheckResult>& results); private: - // The callback function for base::RepeatingTimer<SpellingMenuClient>. This - // function updates the "loading..." animation in the context-menu item. + // The callback function for base::RepeatingTimer. This function updates the + // "loading..." animation in the context-menu item. void OnAnimationTimerExpired(); // The interface to add a context-menu item and update it. This class uses @@ -104,7 +104,7 @@ class SpellingMenuObserver : public RenderViewContextMenuObserver { scoped_ptr<SpellingServiceClient> client_; // A timer used for loading animation. - base::RepeatingTimer<SpellingMenuObserver> animation_timer_; + base::RepeatingTimer animation_timer_; // Flag indicating whether online spelling correction service is enabled. When // this variable is true and we right-click a misspelled word, we send a diff --git a/chrome/browser/renderer_host/safe_browsing_resource_throttle.h b/chrome/browser/renderer_host/safe_browsing_resource_throttle.h index a7b5d2f..14c6ac9 100644 --- a/chrome/browser/renderer_host/safe_browsing_resource_throttle.h +++ b/chrome/browser/renderer_host/safe_browsing_resource_throttle.h @@ -164,7 +164,7 @@ class SafeBrowsingResourceThrottle base::TimeTicks defer_start_time_; // Timer to abort the safe browsing check if it takes too long. - base::OneShotTimer<SafeBrowsingResourceThrottle> timer_; + base::OneShotTimer timer_; // The redirect chain for this resource std::vector<GURL> redirect_urls_; diff --git a/chrome/browser/safe_browsing/incident_reporting/delayed_callback_runner.h b/chrome/browser/safe_browsing/incident_reporting/delayed_callback_runner.h index 3bea1a4..19e3f6c 100644 --- a/chrome/browser/safe_browsing/incident_reporting/delayed_callback_runner.h +++ b/chrome/browser/safe_browsing/incident_reporting/delayed_callback_runner.h @@ -56,7 +56,7 @@ class DelayedCallbackRunner { CallbackList::iterator next_callback_; // A timer upon the firing of which the next callback will be run. - base::DelayTimer<DelayedCallbackRunner> timer_; + base::DelayTimer timer_; DISALLOW_COPY_AND_ASSIGN(DelayedCallbackRunner); }; diff --git a/chrome/browser/safe_browsing/incident_reporting/incident_reporting_service.h b/chrome/browser/safe_browsing/incident_reporting/incident_reporting_service.h index e638da6..4c6e5fa 100644 --- a/chrome/browser/safe_browsing/incident_reporting/incident_reporting_service.h +++ b/chrome/browser/safe_browsing/incident_reporting/incident_reporting_service.h @@ -285,7 +285,7 @@ class IncidentReportingService : public content::NotificationObserver { // A timer upon the firing of which the service will report received // incidents. - base::DelayTimer<IncidentReportingService> collation_timer_; + base::DelayTimer collation_timer_; // The report currently being assembled. This becomes non-NULL when an initial // incident is reported, and returns to NULL when the report is sent for diff --git a/chrome/browser/safe_browsing/protocol_manager.h b/chrome/browser/safe_browsing/protocol_manager.h index bb6857ec..e8bb43f 100644 --- a/chrome/browser/safe_browsing/protocol_manager.h +++ b/chrome/browser/safe_browsing/protocol_manager.h @@ -321,11 +321,11 @@ class SafeBrowsingProtocolManager : public net::URLFetcherDelegate, // For managing the next earliest time to query the SafeBrowsing servers for // updates. base::TimeDelta next_update_interval_; - base::OneShotTimer<SafeBrowsingProtocolManager> update_timer_; + base::OneShotTimer update_timer_; // timeout_timer_ is used to interrupt update requests which are taking // too long. - base::OneShotTimer<SafeBrowsingProtocolManager> timeout_timer_; + base::OneShotTimer timeout_timer_; // All chunk requests that need to be made. std::deque<ChunkUrl> chunk_request_urls_; diff --git a/chrome/browser/safe_browsing/safe_browsing_test.cc b/chrome/browser/safe_browsing/safe_browsing_test.cc index 807a2c2..9e0d347 100644 --- a/chrome/browser/safe_browsing/safe_browsing_test.cc +++ b/chrome/browser/safe_browsing/safe_browsing_test.cc @@ -486,7 +486,7 @@ class SafeBrowsingServerTestHelper return response_status_; } - base::OneShotTimer<SafeBrowsingServerTestHelper> check_update_timer_; + base::OneShotTimer check_update_timer_; SafeBrowsingServerTest* safe_browsing_test_; scoped_ptr<net::URLFetcher> url_fetcher_; std::string response_data_; diff --git a/chrome/browser/sessions/tab_loader.h b/chrome/browser/sessions/tab_loader.h index d21bd77..11c7dbd 100644 --- a/chrome/browser/sessions/tab_loader.h +++ b/chrome/browser/sessions/tab_loader.h @@ -129,7 +129,7 @@ class TabLoader : public content::NotificationObserver, // The tabs we need to load. TabsToLoad tabs_to_load_; - base::OneShotTimer<TabLoader> force_load_timer_; + base::OneShotTimer force_load_timer_; // The time the restore process started. base::TimeTicks restore_started_; diff --git a/chrome/browser/signin/cross_device_promo.h b/chrome/browser/signin/cross_device_promo.h index 5b1f5c5..d577e4b 100644 --- a/chrome/browser/signin/cross_device_promo.h +++ b/chrome/browser/signin/cross_device_promo.h @@ -229,7 +229,7 @@ class CrossDevicePromo : public KeyedService, // Used to delay the check of device activity. See // OnFetchDeviceActivitySuccess() or MaybeBrowsingSessionStarted(), as well as // |delay_until_next_device_activity_fetch_|, for details. - base::OneShotTimer<CrossDevicePromo> device_activity_timer_; + base::OneShotTimer device_activity_timer_; DISALLOW_COPY_AND_ASSIGN(CrossDevicePromo); }; diff --git a/chrome/browser/spellchecker/feedback_sender.h b/chrome/browser/spellchecker/feedback_sender.h index 80b23dd..ec97558 100644 --- a/chrome/browser/spellchecker/feedback_sender.h +++ b/chrome/browser/spellchecker/feedback_sender.h @@ -162,7 +162,7 @@ class FeedbackSender : public base::SupportsWeakPtr<FeedbackSender>, // all of the renderers. The timer starts in StartFeedbackCollection() and // stops in StopFeedbackCollection(). The timer stops and abandons its tasks // on destruction. - base::RepeatingTimer<FeedbackSender> timer_; + base::RepeatingTimer timer_; // Feedback senders that need to stay alive for the duration of sending data. // If a sender is destroyed before it finishes, then sending feedback will be diff --git a/chrome/browser/spellchecker/spellcheck_host_metrics.h b/chrome/browser/spellchecker/spellcheck_host_metrics.h index 60e61d9..d28b09a 100644 --- a/chrome/browser/spellchecker/spellcheck_host_metrics.h +++ b/chrome/browser/spellchecker/spellcheck_host_metrics.h @@ -88,7 +88,7 @@ class SpellCheckHostMetrics { base::TimeTicks start_time_; // Set of checked words in the hashed form. base::hash_set<std::string> checked_word_hashes_; - base::RepeatingTimer<SpellCheckHostMetrics> recording_timer_; + base::RepeatingTimer recording_timer_; }; #endif // CHROME_BROWSER_SPELLCHECKER_SPELLCHECK_HOST_METRICS_H_ diff --git a/chrome/browser/ssl/ssl_error_handler.h b/chrome/browser/ssl/ssl_error_handler.h index 30dfb4f..403b544 100644 --- a/chrome/browser/ssl/ssl_error_handler.h +++ b/chrome/browser/ssl/ssl_error_handler.h @@ -86,9 +86,7 @@ class SSLErrorHandler : public content::WebContentsUserData<SSLErrorHandler>, // check and fires a one shot timer to wait for a "captive portal detected" // result to arrive. void StartHandlingError(); - const base::OneShotTimer<SSLErrorHandler>& get_timer() const { - return timer_; - } + const base::OneShotTimer& get_timer() const { return timer_; } // These are virtual for tests: virtual void CheckForCaptivePortal(); @@ -136,7 +134,7 @@ class SSLErrorHandler : public content::WebContentsUserData<SSLErrorHandler>, Profile* const profile_; content::NotificationRegistrar registrar_; - base::OneShotTimer<SSLErrorHandler> timer_; + base::OneShotTimer timer_; scoped_ptr<CommonNameMismatchHandler> common_name_mismatch_handler_; diff --git a/chrome/browser/supervised_user/child_accounts/child_account_service.h b/chrome/browser/supervised_user/child_accounts/child_account_service.h index ddd8303..bb0d5aa 100644 --- a/chrome/browser/supervised_user/child_accounts/child_account_service.h +++ b/chrome/browser/supervised_user/child_accounts/child_account_service.h @@ -96,7 +96,7 @@ class ChildAccountService : public KeyedService, scoped_ptr<FamilyInfoFetcher> family_fetcher_; // If fetching the family info fails, retry with exponential backoff. - base::OneShotTimer<ChildAccountService> family_fetch_timer_; + base::OneShotTimer family_fetch_timer_; net::BackoffEntry family_fetch_backoff_; // Callbacks to run when the user status becomes known. diff --git a/chrome/browser/sync/glue/browser_thread_model_worker_unittest.cc b/chrome/browser/sync/glue/browser_thread_model_worker_unittest.cc index 1b165ea..9d6891ca 100644 --- a/chrome/browser/sync/glue/browser_thread_model_worker_unittest.cc +++ b/chrome/browser/sync/glue/browser_thread_model_worker_unittest.cc @@ -18,7 +18,6 @@ #include "content/public/test/test_browser_thread_bundle.h" #include "testing/gtest/include/gtest/gtest.h" -using base::OneShotTimer; using base::Thread; using base::TimeDelta; using content::BrowserThread; @@ -37,7 +36,7 @@ class SyncBrowserThreadModelWorkerTest : public testing::Test { bool did_do_work() { return did_do_work_; } BrowserThreadModelWorker* worker() { return worker_.get(); } - OneShotTimer<SyncBrowserThreadModelWorkerTest>* timer() { return &timer_; } + base::OneShotTimer* timer() { return &timer_; } base::WeakPtrFactory<SyncBrowserThreadModelWorkerTest>* factory() { return &weak_factory_; } @@ -89,7 +88,7 @@ class SyncBrowserThreadModelWorkerTest : public testing::Test { private: bool did_do_work_; scoped_refptr<BrowserThreadModelWorker> worker_; - OneShotTimer<SyncBrowserThreadModelWorkerTest> timer_; + base::OneShotTimer timer_; content::TestBrowserThreadBundle thread_bundle_; diff --git a/chrome/browser/sync/glue/sync_backend_host_core.cc b/chrome/browser/sync/glue/sync_backend_host_core.cc index 4f5cd45..8c527a6 100644 --- a/chrome/browser/sync/glue/sync_backend_host_core.cc +++ b/chrome/browser/sync/glue/sync_backend_host_core.cc @@ -760,7 +760,7 @@ void SyncBackendHostCore::StartSavingChanges() { return; DCHECK_EQ(base::MessageLoop::current(), sync_loop_); DCHECK(!save_changes_timer_.get()); - save_changes_timer_.reset(new base::RepeatingTimer<SyncBackendHostCore>()); + save_changes_timer_.reset(new base::RepeatingTimer()); save_changes_timer_->Start(FROM_HERE, base::TimeDelta::FromSeconds(kSaveChangesIntervalSeconds), this, &SyncBackendHostCore::SaveChanges); diff --git a/chrome/browser/sync/glue/sync_backend_host_core.h b/chrome/browser/sync/glue/sync_backend_host_core.h index 489f1af..2229eed 100644 --- a/chrome/browser/sync/glue/sync_backend_host_core.h +++ b/chrome/browser/sync/glue/sync_backend_host_core.h @@ -284,7 +284,7 @@ class SyncBackendHostCore SyncBackendRegistrar* registrar_; // The timer used to periodically call SaveChanges. - scoped_ptr<base::RepeatingTimer<SyncBackendHostCore> > save_changes_timer_; + scoped_ptr<base::RepeatingTimer> save_changes_timer_; // Our encryptor, which uses Chrome's encryption functions. sync_driver::SystemEncryptor encryptor_; diff --git a/chrome/browser/sync/profile_sync_service.h b/chrome/browser/sync/profile_sync_service.h index 04980df..f02217c 100644 --- a/chrome/browser/sync/profile_sync_service.h +++ b/chrome/browser/sync/profile_sync_service.h @@ -916,7 +916,7 @@ class ProfileSyncService : public sync_driver::SyncService, // If RequestAccessToken fails with transient error then retry requesting // access token with exponential backoff. - base::OneShotTimer<ProfileSyncService> request_access_token_retry_timer_; + base::OneShotTimer request_access_token_retry_timer_; net::BackoffEntry request_access_token_backoff_; // States related to sync token and connection. diff --git a/chrome/browser/sync/test/integration/status_change_checker.cc b/chrome/browser/sync/test/integration/status_change_checker.cc index 7ad6d6b8..4ebefa0 100644 --- a/chrome/browser/sync/test/integration/status_change_checker.cc +++ b/chrome/browser/sync/test/integration/status_change_checker.cc @@ -22,7 +22,7 @@ base::TimeDelta StatusChangeChecker::GetTimeoutDuration() { } void StatusChangeChecker::StartBlockingWait() { - base::OneShotTimer<StatusChangeChecker> timer; + base::OneShotTimer timer; timer.Start(FROM_HERE, GetTimeoutDuration(), base::Bind(&StatusChangeChecker::OnTimeout, diff --git a/chrome/browser/sync_file_system/local/local_file_sync_context.cc b/chrome/browser/sync_file_system/local/local_file_sync_context.cc index 0aafc6d..571ceab 100644 --- a/chrome/browser/sync_file_system/local/local_file_sync_context.cc +++ b/chrome/browser/sync_file_system/local/local_file_sync_context.cc @@ -678,7 +678,7 @@ void LocalFileSyncContext::InitializeFileSystemContextOnIOThread( DCHECK(!sync_status_); DCHECK(!timer_on_io_); sync_status_.reset(new LocalFileSyncStatus); - timer_on_io_.reset(new base::OneShotTimer<LocalFileSyncContext>); + timer_on_io_.reset(new base::OneShotTimer); operation_runner_.reset(new SyncableFileOperationRunner( kMaxConcurrentSyncableOperation, sync_status_.get())); diff --git a/chrome/browser/sync_file_system/local/local_file_sync_context.h b/chrome/browser/sync_file_system/local/local_file_sync_context.h index 96a0ba44..1cfc04d 100644 --- a/chrome/browser/sync_file_system/local/local_file_sync_context.h +++ b/chrome/browser/sync_file_system/local/local_file_sync_context.h @@ -360,7 +360,7 @@ class LocalFileSyncContext // Used only on IO thread for available changes notifications. base::Time last_notified_changes_; - scoped_ptr<base::OneShotTimer<LocalFileSyncContext> > timer_on_io_; + scoped_ptr<base::OneShotTimer> timer_on_io_; std::vector<base::Closure> pending_completion_callbacks_; std::set<GURL> origins_with_pending_changes_; diff --git a/chrome/browser/sync_file_system/sync_process_runner.cc b/chrome/browser/sync_file_system/sync_process_runner.cc index 748d21a..619a6bd 100644 --- a/chrome/browser/sync_file_system/sync_process_runner.cc +++ b/chrome/browser/sync_file_system/sync_process_runner.cc @@ -39,7 +39,7 @@ class BaseTimerHelper : public SyncProcessRunner::TimerHelper { ~BaseTimerHelper() override {} private: - base::OneShotTimer<SyncProcessRunner> timer_; + base::OneShotTimer timer_; DISALLOW_COPY_AND_ASSIGN(BaseTimerHelper); }; diff --git a/chrome/browser/task_manager/task_manager_browsertest_util.cc b/chrome/browser/task_manager/task_manager_browsertest_util.cc index a003f0f..edeccd0 100644 --- a/chrome/browser/task_manager/task_manager_browsertest_util.cc +++ b/chrome/browser/task_manager/task_manager_browsertest_util.cc @@ -174,7 +174,7 @@ class ResourceChangeObserver : public TaskManagerModelObserver { const ColumnSpecifier column_specifier_; const size_t min_column_value_; base::RunLoop run_loop_; - base::OneShotTimer<ResourceChangeObserver> timer_; + base::OneShotTimer timer_; }; } // namespace diff --git a/chrome/browser/ui/app_list/search/common/webservice_search_provider.h b/chrome/browser/ui/app_list/search/common/webservice_search_provider.h index 61aaf22..f332f60 100644 --- a/chrome/browser/ui/app_list/search/common/webservice_search_provider.h +++ b/chrome/browser/ui/app_list/search/common/webservice_search_provider.h @@ -43,7 +43,7 @@ class WebserviceSearchProvider : public SearchProvider { base::Time last_keytyped_; // The timer to throttle QPS. - base::OneShotTimer<WebserviceSearchProvider> query_throttler_; + base::OneShotTimer query_throttler_; // The flag for tests. It prevents the throttling If set to false. bool use_throttling_; diff --git a/chrome/browser/ui/app_list/search/launcher_search/launcher_search_provider.h b/chrome/browser/ui/app_list/search/launcher_search/launcher_search_provider.h index fa6fe3d..768c6c3 100644 --- a/chrome/browser/ui/app_list/search/launcher_search/launcher_search_provider.h +++ b/chrome/browser/ui/app_list/search/launcher_search/launcher_search_provider.h @@ -45,7 +45,7 @@ class LauncherSearchProvider : public SearchProvider { extension_results_; // A timer to delay query. - base::OneShotTimer<LauncherSearchProvider> query_timer_; + base::OneShotTimer query_timer_; // The timestamp of the last query. base::Time last_query_time_; diff --git a/chrome/browser/ui/ash/app_sync_ui_state.h b/chrome/browser/ui/ash/app_sync_ui_state.h index e130826..6604031 100644 --- a/chrome/browser/ui/ash/app_sync_ui_state.h +++ b/chrome/browser/ui/ash/app_sync_ui_state.h @@ -78,7 +78,7 @@ class AppSyncUIState : public KeyedService, ProfileSyncService* sync_service_; // Timer to limit how much time STATUS_SYNCING is allowed. - base::OneShotTimer<AppSyncUIState> max_syncing_status_timer_; + base::OneShotTimer max_syncing_status_timer_; Status status_; base::ObserverList<AppSyncUIStateObserver> observers_; diff --git a/chrome/browser/ui/autofill/autofill_dialog_controller_impl.h b/chrome/browser/ui/autofill/autofill_dialog_controller_impl.h index 563404a..58bc886 100644 --- a/chrome/browser/ui/autofill/autofill_dialog_controller_impl.h +++ b/chrome/browser/ui/autofill/autofill_dialog_controller_impl.h @@ -579,7 +579,7 @@ class AutofillDialogControllerImpl // The timer that delays enabling submit button for a short period of time on // startup. - base::OneShotTimer<AutofillDialogControllerImpl> submit_button_delay_timer_; + base::OneShotTimer submit_button_delay_timer_; base::WeakPtrFactory<AutofillDialogControllerImpl> weak_ptr_factory_; diff --git a/chrome/browser/ui/exclusive_access/exclusive_access_bubble.h b/chrome/browser/ui/exclusive_access/exclusive_access_bubble.h index 63bbc48..b93fd75 100644 --- a/chrome/browser/ui/exclusive_access/exclusive_access_bubble.h +++ b/chrome/browser/ui/exclusive_access/exclusive_access_bubble.h @@ -110,22 +110,22 @@ class ExclusiveAccessBubble : public gfx::AnimationDelegate { // When this timer is active, prevent the bubble from hiding. This ensures it // will be displayed for a minimum amount of time (which can be extended by // the user moving the mouse to the top of the screen and holding it there). - base::OneShotTimer<ExclusiveAccessBubble> hide_timeout_; + base::OneShotTimer hide_timeout_; // Timer to see how long the mouse has been idle. - base::OneShotTimer<ExclusiveAccessBubble> idle_timeout_; + base::OneShotTimer idle_timeout_; // When this timer has elapsed, on the next mouse input, we will notify the // user about any currently active exclusive access. This is used to enact // both the initial debounce period, and the snooze period before re-notifying // the user (see notification display design note above). - base::OneShotTimer<ExclusiveAccessBubble> suppress_notify_timeout_; + base::OneShotTimer suppress_notify_timeout_; // Timer to poll the current mouse position. We can't just listen for mouse // events without putting a non-empty HWND onscreen (or hooking Windows, which // has other problems), so instead we run a low-frequency poller to see if the // user has moved in or out of our show/hide regions. - base::RepeatingTimer<ExclusiveAccessBubble> mouse_position_checker_; + base::RepeatingTimer mouse_position_checker_; // The most recently seen mouse position, in screen coordinates. Used to see // if the mouse has moved since our last check. diff --git a/chrome/browser/ui/panels/display_settings_provider.h b/chrome/browser/ui/panels/display_settings_provider.h index 3a708ae..8923d13 100644 --- a/chrome/browser/ui/panels/display_settings_provider.h +++ b/chrome/browser/ui/panels/display_settings_provider.h @@ -149,7 +149,7 @@ class DisplaySettingsProvider { bool is_full_screen_; // Timer used to detect full-screen mode change. - base::RepeatingTimer<DisplaySettingsProvider> full_screen_mode_timer_; + base::RepeatingTimer full_screen_mode_timer_; DISALLOW_COPY_AND_ASSIGN(DisplaySettingsProvider); }; diff --git a/chrome/browser/ui/panels/panel_mouse_watcher_timer.cc b/chrome/browser/ui/panels/panel_mouse_watcher_timer.cc index 774fb60..6d786fc 100644 --- a/chrome/browser/ui/panels/panel_mouse_watcher_timer.cc +++ b/chrome/browser/ui/panels/panel_mouse_watcher_timer.cc @@ -25,13 +25,13 @@ class PanelMouseWatcherTimer : public PanelMouseWatcher { // Timer callback function. void DoWork(); - friend class base::RepeatingTimer<PanelMouseWatcherTimer>; + friend class base::RepeatingTimer; // Timer used to track mouse movements. Some OSes do not provide an easy way // of tracking mouse movements across applications. So we use a timer to // accomplish the same. This could also be more efficient as you end up // getting a lot of notifications when tracking mouse movements. - base::RepeatingTimer<PanelMouseWatcherTimer> timer_; + base::RepeatingTimer timer_; DISALLOW_COPY_AND_ASSIGN(PanelMouseWatcherTimer); }; diff --git a/chrome/browser/ui/views/app_list/win/activation_tracker_win.h b/chrome/browser/ui/views/app_list/win/activation_tracker_win.h index 6c619b4..fa97670 100644 --- a/chrome/browser/ui/views/app_list/win/activation_tracker_win.h +++ b/chrome/browser/ui/views/app_list/win/activation_tracker_win.h @@ -45,7 +45,7 @@ class ActivationTrackerWin : public app_list::AppListViewObserver { // Timer used to check if the taskbar or app list is active. Using a timer // means we don't need to hook Windows, which is apparently not possible // since Vista (and is not nice at any time). - base::RepeatingTimer<ActivationTrackerWin> timer_; + base::RepeatingTimer timer_; DISALLOW_COPY_AND_ASSIGN(ActivationTrackerWin); }; diff --git a/chrome/browser/ui/views/autofill/tooltip_icon.h b/chrome/browser/ui/views/autofill/tooltip_icon.h index c16c4ad..709dd83 100644 --- a/chrome/browser/ui/views/autofill/tooltip_icon.h +++ b/chrome/browser/ui/views/autofill/tooltip_icon.h @@ -71,7 +71,7 @@ class TooltipIcon : public views::ImageView, views::BubbleBorder::Arrow bubble_arrow_; // A timer to delay showing |bubble_|. - base::OneShotTimer<TooltipIcon> show_timer_; + base::OneShotTimer show_timer_; // A watcher that keeps |bubble_| open if the user's mouse enters it. scoped_ptr<views::MouseWatcher> mouse_watcher_; diff --git a/chrome/browser/ui/views/critical_notification_bubble_view.h b/chrome/browser/ui/views/critical_notification_bubble_view.h index 8b769cf..e7b8474 100644 --- a/chrome/browser/ui/views/critical_notification_bubble_view.h +++ b/chrome/browser/ui/views/critical_notification_bubble_view.h @@ -57,7 +57,7 @@ class CriticalNotificationBubbleView : public views::BubbleDelegateView, views::LabelButton* dismiss_button_; // A timer to refresh the bubble to show new countdown value. - base::RepeatingTimer<CriticalNotificationBubbleView> refresh_timer_; + base::RepeatingTimer refresh_timer_; // When the bubble was created. base::Time bubble_created_; diff --git a/chrome/browser/ui/views/download/download_item_view.cc b/chrome/browser/ui/views/download/download_item_view.cc index 6974244..da76670 100644 --- a/chrome/browser/ui/views/download/download_item_view.cc +++ b/chrome/browser/ui/views/download/download_item_view.cc @@ -237,9 +237,10 @@ void DownloadItemView::StartDownloadProgress() { if (progress_timer_.IsRunning()) return; progress_start_time_ = base::TimeTicks::Now(); - progress_timer_.Start(FROM_HERE, base::TimeDelta::FromMilliseconds( - DownloadShelf::kProgressRateMs), - this, &DownloadItemView::SchedulePaint); + progress_timer_.Start( + FROM_HERE, + base::TimeDelta::FromMilliseconds(DownloadShelf::kProgressRateMs), + base::Bind(&DownloadItemView::SchedulePaint, base::Unretained(this))); } void DownloadItemView::StopDownloadProgress() { diff --git a/chrome/browser/ui/views/download/download_item_view.h b/chrome/browser/ui/views/download/download_item_view.h index 87a2946..7504ce9 100644 --- a/chrome/browser/ui/views/download/download_item_view.h +++ b/chrome/browser/ui/views/download/download_item_view.h @@ -308,7 +308,7 @@ class DownloadItemView : public views::ButtonListener, scoped_ptr<gfx::SlideAnimation> complete_animation_; // Progress animation - base::RepeatingTimer<DownloadItemView> progress_timer_; + base::RepeatingTimer progress_timer_; // Dangerous mode buttons. views::LabelButton* save_button_; diff --git a/chrome/browser/ui/views/download/download_item_view_md.cc b/chrome/browser/ui/views/download/download_item_view_md.cc index 5e16453..5f22ae6 100644 --- a/chrome/browser/ui/views/download/download_item_view_md.cc +++ b/chrome/browser/ui/views/download/download_item_view_md.cc @@ -242,9 +242,10 @@ void DownloadItemViewMd::StartDownloadProgress() { if (progress_timer_.IsRunning()) return; progress_start_time_ = base::TimeTicks::Now(); - progress_timer_.Start(FROM_HERE, base::TimeDelta::FromMilliseconds( - DownloadShelf::kProgressRateMs), - this, &DownloadItemViewMd::SchedulePaint); + progress_timer_.Start( + FROM_HERE, + base::TimeDelta::FromMilliseconds(DownloadShelf::kProgressRateMs), + base::Bind(&DownloadItemViewMd::SchedulePaint, base::Unretained(this))); } void DownloadItemViewMd::StopDownloadProgress() { diff --git a/chrome/browser/ui/views/download/download_item_view_md.h b/chrome/browser/ui/views/download/download_item_view_md.h index 3c624d6..787132c 100644 --- a/chrome/browser/ui/views/download/download_item_view_md.h +++ b/chrome/browser/ui/views/download/download_item_view_md.h @@ -288,7 +288,7 @@ class DownloadItemViewMd : public views::ButtonListener, scoped_ptr<gfx::SlideAnimation> complete_animation_; // Progress animation - base::RepeatingTimer<DownloadItemViewMd> progress_timer_; + base::RepeatingTimer progress_timer_; // Dangerous mode buttons. views::LabelButton* save_button_; diff --git a/chrome/browser/ui/views/frame/browser_view.h b/chrome/browser/ui/views/frame/browser_view.h index a18f748..0fb79f7 100644 --- a/chrome/browser/ui/views/frame/browser_view.h +++ b/chrome/browser/ui/views/frame/browser_view.h @@ -687,7 +687,7 @@ class BrowserView : public BrowserWindow, #endif // The timer used to update frames for the Loading Animation. - base::RepeatingTimer<BrowserView> loading_animation_timer_; + base::RepeatingTimer loading_animation_timer_; views::UnhandledKeyboardEventHandler unhandled_keyboard_event_handler_; diff --git a/chrome/browser/ui/views/frame/web_contents_close_handler.h b/chrome/browser/ui/views/frame/web_contents_close_handler.h index 9afa372..2beccbf 100644 --- a/chrome/browser/ui/views/frame/web_contents_close_handler.h +++ b/chrome/browser/ui/views/frame/web_contents_close_handler.h @@ -47,7 +47,7 @@ class WebContentsCloseHandler { // was invoked following a WillCloseAllTabs()). bool tab_changed_after_clone_; - base::OneShotTimer<WebContentsCloseHandler> timer_; + base::OneShotTimer timer_; DISALLOW_COPY_AND_ASSIGN(WebContentsCloseHandler); }; diff --git a/chrome/browser/ui/views/location_bar/zoom_bubble_view.h b/chrome/browser/ui/views/location_bar/zoom_bubble_view.h index 83bb3f3..17debce 100644 --- a/chrome/browser/ui/views/location_bar/zoom_bubble_view.h +++ b/chrome/browser/ui/views/location_bar/zoom_bubble_view.h @@ -116,7 +116,7 @@ class ZoomBubbleView : public ManagedFullScreenBubbleDelegateView, static ZoomBubbleView* zoom_bubble_; // Timer used to close the bubble when |auto_close_| is true. - base::OneShotTimer<ZoomBubbleView> timer_; + base::OneShotTimer timer_; // Image button in the zoom bubble that will show the |extension_icon_| image // if an extension initiated the zoom change, and links to that extension at diff --git a/chrome/browser/ui/views/passwords/manage_passwords_bubble_view.cc b/chrome/browser/ui/views/passwords/manage_passwords_bubble_view.cc index b1391a2..c2a5b2a 100644 --- a/chrome/browser/ui/views/passwords/manage_passwords_bubble_view.cc +++ b/chrome/browser/ui/views/passwords/manage_passwords_bubble_view.cc @@ -300,7 +300,7 @@ class ManagePasswordsBubbleView::AutoSigninView ManagePasswordsBubbleView::auto_signin_toast_timeout_); } - base::OneShotTimer<AutoSigninView> timer_; + base::OneShotTimer timer_; ManagePasswordsBubbleView* parent_; ScopedObserver<views::Widget, views::WidgetObserver> observed_browser_; diff --git a/chrome/browser/ui/views/tabs/tab_drag_controller.h b/chrome/browser/ui/views/tabs/tab_drag_controller.h index bb2412a..1173ef0 100644 --- a/chrome/browser/ui/views/tabs/tab_drag_controller.h +++ b/chrome/browser/ui/views/tabs/tab_drag_controller.h @@ -510,11 +510,11 @@ class TabDragController : public content::NotificationObserver, // Timer used to bring the window under the cursor to front. If the user // stops moving the mouse for a brief time over a browser window, it is // brought to front. - base::OneShotTimer<TabDragController> bring_to_front_timer_; + base::OneShotTimer bring_to_front_timer_; // Timer used to move the stacked tabs. See comment aboue // StartMoveStackedTimerIfNecessary(). - base::OneShotTimer<TabDragController> move_stacked_timer_; + base::OneShotTimer move_stacked_timer_; // Did the mouse move enough that we started a drag? bool started_drag_; diff --git a/chrome/browser/ui/views/tabs/tab_strip.h b/chrome/browser/ui/views/tabs/tab_strip.h index a8153da..c33cba7 100644 --- a/chrome/browser/ui/views/tabs/tab_strip.h +++ b/chrome/browser/ui/views/tabs/tab_strip.h @@ -664,7 +664,7 @@ class TabStrip : public views::View, // Timer used when a tab is closed and we need to relayout. Only used when a // tab close comes from a touch device. - base::OneShotTimer<TabStrip> resize_layout_timer_; + base::OneShotTimer resize_layout_timer_; // True if tabs are painted as rectangular light-bars. bool immersive_style_; diff --git a/chrome/browser/ui/views/toolbar/reload_button.h b/chrome/browser/ui/views/toolbar/reload_button.h index 7c9fd18..7d113ef 100644 --- a/chrome/browser/ui/views/toolbar/reload_button.h +++ b/chrome/browser/ui/views/toolbar/reload_button.h @@ -78,8 +78,8 @@ class ReloadButton : public ToolbarButton, void OnDoubleClickTimer(); void OnStopToReloadTimer(); - base::OneShotTimer<ReloadButton> double_click_timer_; - base::OneShotTimer<ReloadButton> stop_to_reload_timer_; + base::OneShotTimer double_click_timer_; + base::OneShotTimer stop_to_reload_timer_; // This may be NULL when testing. CommandUpdater* command_updater_; diff --git a/chrome/browser/ui/webui/about_ui.cc b/chrome/browser/ui/webui/about_ui.cc index 248d5f4..ba784a1 100644 --- a/chrome/browser/ui/webui/about_ui.cc +++ b/chrome/browser/ui/webui/about_ui.cc @@ -204,7 +204,7 @@ class ChromeOSOnlineTermsHandler : public net::URLFetcherDelegate { // Timer that enforces a timeout on the attempt to download the // ChromeOS Terms. - base::OneShotTimer<ChromeOSOnlineTermsHandler> download_timer_; + base::OneShotTimer download_timer_; // |fetch_callback_| called when fetching succeeded or failed. FetchCallback fetch_callback_; diff --git a/chrome/browser/ui/webui/chromeos/login/demo_mode_detector.h b/chrome/browser/ui/webui/chromeos/login/demo_mode_detector.h index 8c27c0e..eb77be0 100644 --- a/chrome/browser/ui/webui/chromeos/login/demo_mode_detector.h +++ b/chrome/browser/ui/webui/chromeos/login/demo_mode_detector.h @@ -42,7 +42,7 @@ class DemoModeDetector { scoped_ptr<IdleDetector> idle_detector_; - base::RepeatingTimer<DemoModeDetector> oobe_timer_; + base::RepeatingTimer oobe_timer_; // Timeout to detect if the machine is in a derelict state. base::TimeDelta derelict_detection_timeout_; diff --git a/chrome/browser/ui/webui/chromeos/login/network_dropdown.h b/chrome/browser/ui/webui/chromeos/login/network_dropdown.h index e4e60c5..194db47 100644 --- a/chrome/browser/ui/webui/chromeos/login/network_dropdown.h +++ b/chrome/browser/ui/webui/chromeos/login/network_dropdown.h @@ -75,7 +75,7 @@ class NetworkDropdown : public NetworkMenu::Delegate, bool oobe_; // Timer used to periodically force network scan. - base::RepeatingTimer<NetworkDropdown> network_scan_timer_; + base::RepeatingTimer network_scan_timer_; DISALLOW_COPY_AND_ASSIGN(NetworkDropdown); }; diff --git a/chrome/browser/ui/webui/flash_ui.cc b/chrome/browser/ui/webui/flash_ui.cc index df176c9..f702443 100644 --- a/chrome/browser/ui/webui/flash_ui.cc +++ b/chrome/browser/ui/webui/flash_ui.cc @@ -113,7 +113,7 @@ class FlashDOMHandler : public WebUIMessageHandler, void OnTimeout(); // A timer to keep track of when the data fetching times out. - base::OneShotTimer<FlashDOMHandler> timeout_; + base::OneShotTimer timeout_; // Crash list. scoped_refptr<CrashUploadList> upload_list_; diff --git a/chrome/browser/ui/webui/history_ui.h b/chrome/browser/ui/webui/history_ui.h index 10d1abc..3d5dcb2 100644 --- a/chrome/browser/ui/webui/history_ui.h +++ b/chrome/browser/ui/webui/history_ui.h @@ -207,7 +207,7 @@ class BrowsingHistoryHandler : public content::WebUIMessageHandler, std::vector<HistoryEntry> web_history_query_results_; // Timer used to implement a timeout on a Web History response. - base::OneShotTimer<BrowsingHistoryHandler> web_history_timer_; + base::OneShotTimer web_history_timer_; ScopedObserver<history::HistoryService, history::HistoryServiceObserver> history_service_observer_; diff --git a/chrome/browser/ui/webui/ntp/new_tab_ui.h b/chrome/browser/ui/webui/ntp/new_tab_ui.h index 79899a3..0073925 100644 --- a/chrome/browser/ui/webui/ntp/new_tab_ui.h +++ b/chrome/browser/ui/webui/ntp/new_tab_ui.h @@ -131,7 +131,7 @@ class NewTabUI : public content::WebUIController, // The last time we got a paint notification. base::TimeTicks last_paint_; // Scoping so we can be sure our timeouts don't outlive us. - base::OneShotTimer<NewTabUI> timer_; + base::OneShotTimer timer_; // The preference version. This used for migrating prefs of the NTP. static const int current_pref_version_ = 3; diff --git a/chrome/browser/ui/webui/options/sync_setup_handler.cc b/chrome/browser/ui/webui/options/sync_setup_handler.cc index a2f8469..bbaa360 100644 --- a/chrome/browser/ui/webui/options/sync_setup_handler.cc +++ b/chrome/browser/ui/webui/options/sync_setup_handler.cc @@ -418,7 +418,7 @@ void SyncSetupHandler::DisplaySpinner() { const int kTimeoutSec = 30; DCHECK(!backend_start_timer_); - backend_start_timer_.reset(new base::OneShotTimer<SyncSetupHandler>()); + backend_start_timer_.reset(new base::OneShotTimer()); backend_start_timer_->Start(FROM_HERE, base::TimeDelta::FromSeconds(kTimeoutSec), this, &SyncSetupHandler::DisplayTimeout); diff --git a/chrome/browser/ui/webui/options/sync_setup_handler.h b/chrome/browser/ui/webui/options/sync_setup_handler.h index 4ed025a..0065ecc 100644 --- a/chrome/browser/ui/webui/options/sync_setup_handler.h +++ b/chrome/browser/ui/webui/options/sync_setup_handler.h @@ -152,7 +152,7 @@ class SyncSetupHandler : public options::OptionsPageUIHandler, // The OneShotTimer object used to timeout of starting the sync backend // service. - scoped_ptr<base::OneShotTimer<SyncSetupHandler> > backend_start_timer_; + scoped_ptr<base::OneShotTimer> backend_start_timer_; DISALLOW_COPY_AND_ASSIGN(SyncSetupHandler); }; diff --git a/chrome/browser/upgrade_detector.h b/chrome/browser/upgrade_detector.h index e117a67..8cb4885 100644 --- a/chrome/browser/upgrade_detector.h +++ b/chrome/browser/upgrade_detector.h @@ -163,7 +163,7 @@ class UpgradeDetector { // A timer to check to see if we've been idle for long enough to show the // critical warning. Should only be set if |upgrade_available_| is // UPGRADE_AVAILABLE_CRITICAL. - base::RepeatingTimer<UpgradeDetector> idle_check_timer_; + base::RepeatingTimer idle_check_timer_; // The stage at which the annoyance level for upgrade notifications is at. UpgradeNotificationAnnoyanceLevel upgrade_notification_stage_; diff --git a/chrome/browser/upgrade_detector_impl.h b/chrome/browser/upgrade_detector_impl.h index f5a5a1c2..7beaf31 100644 --- a/chrome/browser/upgrade_detector_impl.h +++ b/chrome/browser/upgrade_detector_impl.h @@ -74,11 +74,11 @@ class UpgradeDetectorImpl : public UpgradeDetector, base::WeakPtr<UpgradeDetectorImpl> upgrade_detector); // We periodically check to see if Chrome has been upgraded. - base::RepeatingTimer<UpgradeDetectorImpl> detect_upgrade_timer_; + base::RepeatingTimer detect_upgrade_timer_; // After we detect an upgrade we start a recurring timer to see if enough time // has passed and we should start notifying the user. - base::RepeatingTimer<UpgradeDetectorImpl> upgrade_notification_timer_; + base::RepeatingTimer upgrade_notification_timer_; // True if this build is a dev or canary channel build. bool is_unstable_channel_; diff --git a/chrome/test/base/tracing.cc b/chrome/test/base/tracing.cc index 83cbbcc..050b53f 100644 --- a/chrome/test/base/tracing.cc +++ b/chrome/test/base/tracing.cc @@ -151,7 +151,7 @@ class InProcessTraceController { scoped_refptr<content::MessageLoopRunner> message_loop_runner_; - base::OneShotTimer<InProcessTraceController> timer_; + base::OneShotTimer timer_; bool is_waiting_on_watch_; int watch_notification_count_; diff --git a/chrome/test/remoting/waiter.h b/chrome/test/remoting/waiter.h index 9201d77..ba5183d 100644 --- a/chrome/test/remoting/waiter.h +++ b/chrome/test/remoting/waiter.h @@ -33,7 +33,7 @@ class TimeoutWaiter { // Callback used to cancel the TimeoutWaiter::Wait. void CancelWaitCallback(); - base::OneShotTimer<TimeoutWaiter> timeout_timer_; + base::OneShotTimer timeout_timer_; base::TimeDelta timeout_; scoped_refptr<content::MessageLoopRunner> message_loop_runner_; @@ -63,7 +63,7 @@ class ConditionalTimeoutWaiter : public TimeoutWaiter { base::TimeDelta interval_; Predicate callback_; - base::RepeatingTimer<ConditionalTimeoutWaiter> condition_timer_; + base::RepeatingTimer condition_timer_; bool success_; DISALLOW_COPY_AND_ASSIGN(ConditionalTimeoutWaiter); 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_; diff --git a/components/autofill/content/browser/risk/fingerprint.cc b/components/autofill/content/browser/risk/fingerprint.cc index dfee9b5..0007965 100644 --- a/components/autofill/content/browser/risk/fingerprint.cc +++ b/components/autofill/content/browser/risk/fingerprint.cc @@ -237,7 +237,7 @@ class FingerprintDataLoader : public content::GpuDataManagerObserver { // Timer to enforce a maximum timeout before the |callback_| is called, even // if not all asynchronous data has been loaded. - base::OneShotTimer<FingerprintDataLoader> timeout_timer_; + base::OneShotTimer timeout_timer_; // The callback that will be called once all the data is available. base::Callback<void(scoped_ptr<Fingerprint>)> callback_; diff --git a/components/copresence/copresence_manager_impl.cc b/components/copresence/copresence_manager_impl.cc index 25b8a5c..e02211c 100644 --- a/components/copresence/copresence_manager_impl.cc +++ b/components/copresence/copresence_manager_impl.cc @@ -50,10 +50,10 @@ bool SupportedTokenMedium(const TokenObservation& token) { CopresenceManagerImpl::CopresenceManagerImpl(CopresenceDelegate* delegate) : delegate_(delegate), - whispernet_init_callback_(base::Bind( - &CopresenceManagerImpl::WhispernetInitComplete, - // This callback gets cancelled when we are destroyed. - base::Unretained(this))), + whispernet_init_callback_( + base::Bind(&CopresenceManagerImpl::WhispernetInitComplete, + // This callback gets cancelled when we are destroyed. + base::Unretained(this))), init_failed_(false), state_(new CopresenceStateImpl), directive_handler_(new DirectiveHandlerImpl( @@ -61,8 +61,8 @@ CopresenceManagerImpl::CopresenceManagerImpl(CopresenceDelegate* delegate) // will be destructed before the CopresenceState instance. base::Bind(&CopresenceStateImpl::UpdateDirectives, base::Unretained(state_.get())))), - poll_timer_(new base::RepeatingTimer<CopresenceManagerImpl>), - audio_check_timer_(new base::RepeatingTimer<CopresenceManagerImpl>), + poll_timer_(new base::RepeatingTimer), + audio_check_timer_(new base::RepeatingTimer), queued_messages_by_token_( base::TimeDelta::FromSeconds(kQueuedMessageTimeout), kMaxQueuedMessages) { diff --git a/components/copresence/handlers/audio/audio_directive_handler_impl.cc b/components/copresence/handlers/audio/audio_directive_handler_impl.cc index 9b41629..2ae6314 100644 --- a/components/copresence/handlers/audio/audio_directive_handler_impl.cc +++ b/components/copresence/handlers/audio/audio_directive_handler_impl.cc @@ -55,7 +55,7 @@ AudioDirectiveHandlerImpl::AudioDirectiveHandlerImpl( const DirectivesCallback& update_directives_callback) : update_directives_callback_(update_directives_callback), audio_modem_(audio_modem::Modem::Create()), - audio_event_timer_(new base::OneShotTimer<AudioDirectiveHandler>), + audio_event_timer_(new base::OneShotTimer), clock_(new TickClockRefCounted(new base::DefaultTickClock)) {} AudioDirectiveHandlerImpl::AudioDirectiveHandlerImpl( diff --git a/components/copresence/timed_map.h b/components/copresence/timed_map.h index bcd7149..f6c5859 100644 --- a/components/copresence/timed_map.h +++ b/components/copresence/timed_map.h @@ -96,7 +96,7 @@ class TimedMap { const ValueType kEmptyValue; scoped_ptr<base::TickClock> clock_; - base::RepeatingTimer<TimedMap> timer_; + base::RepeatingTimer timer_; const base::TimeDelta lifetime_; const size_t max_elements_; std::map<KeyType, ValueType> map_; diff --git a/components/data_reduction_proxy/core/browser/data_reduction_proxy_compression_stats.h b/components/data_reduction_proxy/core/browser/data_reduction_proxy_compression_stats.h index 7c0fe7f..127dad5 100644 --- a/components/data_reduction_proxy/core/browser/data_reduction_proxy_compression_stats.h +++ b/components/data_reduction_proxy/core/browser/data_reduction_proxy_compression_stats.h @@ -256,7 +256,7 @@ class DataReductionProxyCompressionStats // Tracks state of loading data usage from storage. CurrentDataUsageLoadStatus current_data_usage_load_status_; - base::OneShotTimer<DataReductionProxyCompressionStats> pref_writer_timer_; + base::OneShotTimer pref_writer_timer_; base::ThreadChecker thread_checker_; base::WeakPtrFactory<DataReductionProxyCompressionStats> weak_factory_; diff --git a/components/data_reduction_proxy/core/browser/data_reduction_proxy_config_service_client.h b/components/data_reduction_proxy/core/browser/data_reduction_proxy_config_service_client.h index ba508f8..0cf2d67 100644 --- a/components/data_reduction_proxy/core/browser/data_reduction_proxy_config_service_client.h +++ b/components/data_reduction_proxy/core/browser/data_reduction_proxy_config_service_client.h @@ -192,8 +192,7 @@ class DataReductionProxyConfigServiceClient // An event that fires when it is time to refresh the Data Reduction Proxy // configuration. - base::OneShotTimer<DataReductionProxyConfigServiceClient> - config_refresh_timer_; + base::OneShotTimer config_refresh_timer_; // A |net::URLFetcher| to retrieve the Data Reduction Proxy configuration. scoped_ptr<net::URLFetcher> fetcher_; diff --git a/components/data_reduction_proxy/core/browser/data_reduction_proxy_experiments_stats.h b/components/data_reduction_proxy/core/browser/data_reduction_proxy_experiments_stats.h index 1806d51..97e6548 100644 --- a/components/data_reduction_proxy/core/browser/data_reduction_proxy_experiments_stats.h +++ b/components/data_reduction_proxy/core/browser/data_reduction_proxy_experiments_stats.h @@ -64,7 +64,7 @@ class DataReductionProxyExperimentsStats { // If set, periodically updates the simulated expiration of the Data Reduction // Proxy configuration. - base::RepeatingTimer<DataReductionProxyExperimentsStats> config_refresh_time_; + base::RepeatingTimer config_refresh_time_; // Enforce initialization order. bool initialized_; diff --git a/components/feedback/feedback_uploader.h b/components/feedback/feedback_uploader.h index 9eebbd5..814376e 100644 --- a/components/feedback/feedback_uploader.h +++ b/components/feedback/feedback_uploader.h @@ -67,7 +67,7 @@ class FeedbackUploader : public base::SupportsWeakPtr<FeedbackUploader> { base::FilePath report_path_; // Timer to upload the next report at. - base::OneShotTimer<FeedbackUploader> upload_timer_; + base::OneShotTimer upload_timer_; // Priority queue of reports prioritized by the time the report is supposed // to be uploaded at. std::priority_queue<scoped_refptr<FeedbackReport>, diff --git a/components/history/core/browser/top_sites_impl.h b/components/history/core/browser/top_sites_impl.h index dab8392..0d4999e 100644 --- a/components/history/core/browser/top_sites_impl.h +++ b/components/history/core/browser/top_sites_impl.h @@ -271,7 +271,7 @@ class TopSitesImpl : public TopSites, public HistoryServiceObserver { // Timer that asks history for the top sites. This is used to make sure our // data stays in sync with history. - base::OneShotTimer<TopSitesImpl> timer_; + base::OneShotTimer timer_; // The time we started |timer_| at. Only valid if |timer_| is running. base::TimeTicks timer_start_time_; diff --git a/components/invalidation/impl/registration_manager.h b/components/invalidation/impl/registration_manager.h index b48c07f..3e6913f 100644 --- a/components/invalidation/impl/registration_manager.h +++ b/components/invalidation/impl/registration_manager.h @@ -144,7 +144,7 @@ class INVALIDATION_EXPORT_PRIVATE RegistrationManager // Increased after each consecutive failure. base::TimeDelta next_delay; // The actual timer for registration. - base::OneShotTimer<RegistrationStatus> registration_timer; + base::OneShotTimer registration_timer; DISALLOW_COPY_AND_ASSIGN(RegistrationStatus); }; diff --git a/components/invalidation/impl/ticl_invalidation_service.h b/components/invalidation/impl/ticl_invalidation_service.h index 3ab3f33..ea408aa 100644 --- a/components/invalidation/impl/ticl_invalidation_service.h +++ b/components/invalidation/impl/ticl_invalidation_service.h @@ -144,7 +144,7 @@ class TiclInvalidationService : public base::NonThreadSafe, // TiclInvalidationService needs to hold reference to access_token_request_ // for the duration of request in order to receive callbacks. scoped_ptr<OAuth2TokenService::Request> access_token_request_; - base::OneShotTimer<TiclInvalidationService> request_access_token_retry_timer_; + base::OneShotTimer request_access_token_retry_timer_; net::BackoffEntry request_access_token_backoff_; InvalidationNetworkChannel network_channel_type_; diff --git a/components/metrics/metrics_reporting_scheduler.h b/components/metrics/metrics_reporting_scheduler.h index 4d6102a..1b7190c 100644 --- a/components/metrics/metrics_reporting_scheduler.h +++ b/components/metrics/metrics_reporting_scheduler.h @@ -64,7 +64,7 @@ class MetricsReportingScheduler { // The MetricsService method to call when uploading should happen. const base::Closure upload_callback_; - base::OneShotTimer<MetricsReportingScheduler> upload_timer_; + base::OneShotTimer upload_timer_; // The interval between being told an upload is done and starting the next // upload. diff --git a/components/omnibox/browser/autocomplete_controller.h b/components/omnibox/browser/autocomplete_controller.h index bcdfc18..b585cec 100644 --- a/components/omnibox/browser/autocomplete_controller.h +++ b/components/omnibox/browser/autocomplete_controller.h @@ -232,10 +232,10 @@ class AutocompleteController : public AutocompleteProviderListener { // Timer used to remove any matches copied from the last result. When run // invokes |ExpireCopiedEntries|. - base::OneShotTimer<AutocompleteController> expire_timer_; + base::OneShotTimer expire_timer_; // Timer used to tell the providers to Stop() searching for matches. - base::OneShotTimer<AutocompleteController> stop_timer_; + base::OneShotTimer stop_timer_; // Amount of time (in ms) between when the user stops typing and // when we send Stop() to every provider. This is intended to avoid diff --git a/components/omnibox/browser/search_provider.h b/components/omnibox/browser/search_provider.h index 51f5e6c..b0af655 100644 --- a/components/omnibox/browser/search_provider.h +++ b/components/omnibox/browser/search_provider.h @@ -378,7 +378,7 @@ class SearchProvider : public BaseSearchProvider, // A timer to start a query to the suggest server after the user has stopped // typing for long enough. - base::OneShotTimer<SearchProvider> timer_; + base::OneShotTimer timer_; // The time at which we sent a query to the suggest server. base::TimeTicks time_suggest_request_sent_; diff --git a/components/page_load_metrics/renderer/metrics_render_frame_observer.cc b/components/page_load_metrics/renderer/metrics_render_frame_observer.cc index d875557..9419648 100644 --- a/components/page_load_metrics/renderer/metrics_render_frame_observer.cc +++ b/components/page_load_metrics/renderer/metrics_render_frame_observer.cc @@ -115,8 +115,7 @@ PageLoadTiming MetricsRenderFrameObserver::GetTiming() const { } scoped_ptr<base::Timer> MetricsRenderFrameObserver::CreateTimer() const { - return scoped_ptr<base::Timer>( - new base::OneShotTimer<PageTimingMetricsSender>()); + return make_scoped_ptr(new base::OneShotTimer); } } // namespace page_load_metrics diff --git a/components/password_manager/core/browser/affiliated_match_helper.h b/components/password_manager/core/browser/affiliated_match_helper.h index 6f7b909..18cb0d5 100644 --- a/components/password_manager/core/browser/affiliated_match_helper.h +++ b/components/password_manager/core/browser/affiliated_match_helper.h @@ -171,8 +171,8 @@ class AffiliatedMatchHelper : public PasswordStore::Observer, scoped_ptr<AffiliationService> affiliation_service_; // Timers used to schedule VerifyAffiliationsPrefetchedForDummyFacets(). - base::OneShotTimer<AffiliatedMatchHelper> on_startup_verification_timer_; - base::RepeatingTimer<AffiliatedMatchHelper> repeated_verification_timer_; + base::OneShotTimer on_startup_verification_timer_; + base::RepeatingTimer repeated_verification_timer_; base::WeakPtrFactory<AffiliatedMatchHelper> weak_ptr_factory_; diff --git a/components/plugins/renderer/loadable_plugin_placeholder.h b/components/plugins/renderer/loadable_plugin_placeholder.h index 2a89137..feed47c 100644 --- a/components/plugins/renderer/loadable_plugin_placeholder.h +++ b/components/plugins/renderer/loadable_plugin_placeholder.h @@ -121,7 +121,7 @@ class LoadablePluginPlaceholder : public PluginPlaceholderBase { // Used to prevent re-entrancy during the size recheck for throttled plugins. bool in_size_recheck_; gfx::Rect unobscured_rect_; - base::OneShotTimer<LoadablePluginPlaceholder> size_update_timer_; + base::OneShotTimer size_update_timer_; base::WeakPtrFactory<LoadablePluginPlaceholder> weak_factory_; diff --git a/components/policy/core/common/remote_commands/remote_commands_queue.h b/components/policy/core/common/remote_commands/remote_commands_queue.h index fb03e18..a919a21 100644 --- a/components/policy/core/common/remote_commands/remote_commands_queue.h +++ b/components/policy/core/common/remote_commands/remote_commands_queue.h @@ -77,7 +77,7 @@ class POLICY_EXPORT RemoteCommandsQueue { scoped_ptr<RemoteCommandJob> running_command_; scoped_ptr<base::TickClock> clock_; - base::OneShotTimer<RemoteCommandsQueue> execution_timeout_timer_; + base::OneShotTimer execution_timeout_timer_; base::ObserverList<Observer, true> observer_list_; diff --git a/components/proximity_auth/ble/proximity_auth_ble_system.h b/components/proximity_auth/ble/proximity_auth_ble_system.h index f3b6498..2eb1760 100644 --- a/components/proximity_auth/ble/proximity_auth_ble_system.h +++ b/components/proximity_auth/ble/proximity_auth_ble_system.h @@ -134,7 +134,7 @@ class ProximityAuthBleSystem : public ScreenlockBridge::Observer, // The timer controlling the time the spinner for the user pod icon is shown // right after the screen is locked. - base::OneShotTimer<ProximityAuthBleSystem> spinner_timer_; + base::OneShotTimer spinner_timer_; // The different UI states that the lock screen can be in. enum class ScreenlockUIState { diff --git a/components/proximity_auth/device_to_device_authenticator.cc b/components/proximity_auth/device_to_device_authenticator.cc index cf023b1..ccc3fd1 100644 --- a/components/proximity_auth/device_to_device_authenticator.cc +++ b/components/proximity_auth/device_to_device_authenticator.cc @@ -89,7 +89,7 @@ void DeviceToDeviceAuthenticator::OnKeyPairGenerated( } scoped_ptr<base::Timer> DeviceToDeviceAuthenticator::CreateTimer() { - return make_scoped_ptr(new base::OneShotTimer<DeviceToDeviceAuthenticator>()); + return make_scoped_ptr(new base::OneShotTimer()); } void DeviceToDeviceAuthenticator::OnHelloMessageCreated( diff --git a/components/proximity_auth/remote_device_life_cycle_impl.h b/components/proximity_auth/remote_device_life_cycle_impl.h index de062f1..4a2912b 100644 --- a/components/proximity_auth/remote_device_life_cycle_impl.h +++ b/components/proximity_auth/remote_device_life_cycle_impl.h @@ -108,7 +108,7 @@ class RemoteDeviceLifeCycleImpl : public RemoteDeviceLifeCycle, // After authentication fails, this timer waits for a period of time before // retrying the connection. - base::OneShotTimer<RemoteDeviceLifeCycleImpl> authentication_recovery_timer_; + base::OneShotTimer authentication_recovery_timer_; base::WeakPtrFactory<RemoteDeviceLifeCycleImpl> weak_ptr_factory_; diff --git a/components/rappor/log_uploader.h b/components/rappor/log_uploader.h index 8037b95..e1eba5b3 100644 --- a/components/rappor/log_uploader.h +++ b/components/rappor/log_uploader.h @@ -96,7 +96,7 @@ class LogUploader : public net::URLFetcherDelegate, std::queue<std::string> queued_logs_; // A timer used to delay before attempting another upload. - base::OneShotTimer<LogUploader> upload_timer_; + base::OneShotTimer upload_timer_; // Indicates that the last triggered upload hasn't resolved yet. bool has_callback_pending_; diff --git a/components/rappor/rappor_service.h b/components/rappor/rappor_service.h index 286d7ce..d34d502 100644 --- a/components/rappor/rappor_service.h +++ b/components/rappor/rappor_service.h @@ -157,7 +157,7 @@ class RapporService { int32_t cohort_; // Timer which schedules calls to OnLogInterval(). - base::OneShotTimer<RapporService> log_rotation_timer_; + base::OneShotTimer log_rotation_timer_; // A daily event for collecting metrics once a day. metrics::DailyEvent daily_event_; diff --git a/components/signin/core/browser/account_fetcher_service.h b/components/signin/core/browser/account_fetcher_service.h index 0443d68..f0d6386 100644 --- a/components/signin/core/browser/account_fetcher_service.h +++ b/components/signin/core/browser/account_fetcher_service.h @@ -115,7 +115,7 @@ class AccountFetcherService : public KeyedService, bool network_fetches_enabled_; std::list<std::string> pending_user_info_fetches_; base::Time last_updated_; - base::OneShotTimer<AccountFetcherService> timer_; + base::OneShotTimer timer_; bool shutdown_called_; std::string child_request_account_id_; diff --git a/components/signin/core/browser/child_account_info_fetcher_impl.h b/components/signin/core/browser/child_account_info_fetcher_impl.h index 25cfeb2..e5a85bea 100644 --- a/components/signin/core/browser/child_account_info_fetcher_impl.h +++ b/components/signin/core/browser/child_account_info_fetcher_impl.h @@ -58,7 +58,7 @@ class ChildAccountInfoFetcherImpl : public ChildAccountInfoFetcher, const std::string account_id_; // If fetching fails, retry with exponential backoff. - base::OneShotTimer<ChildAccountInfoFetcherImpl> timer_; + base::OneShotTimer timer_; net::BackoffEntry backoff_; scoped_ptr<OAuth2TokenService::Request> login_token_request_; diff --git a/components/signin/core/browser/device_activity_fetcher.h b/components/signin/core/browser/device_activity_fetcher.h index cd7bb81..d8d768d 100644 --- a/components/signin/core/browser/device_activity_fetcher.h +++ b/components/signin/core/browser/device_activity_fetcher.h @@ -65,7 +65,7 @@ class DeviceActivityFetcher : public GaiaAuthConsumer, // If either fetcher fails, retry with exponential backoff. net::BackoffEntry fetcher_backoff_; - base::OneShotTimer<DeviceActivityFetcher> fetcher_timer_; + base::OneShotTimer fetcher_timer_; int fetcher_retries_; std::string access_token_; diff --git a/components/signin/core/browser/gaia_cookie_manager_service.h b/components/signin/core/browser/gaia_cookie_manager_service.h index 4844937..566b0e2 100644 --- a/components/signin/core/browser/gaia_cookie_manager_service.h +++ b/components/signin/core/browser/gaia_cookie_manager_service.h @@ -141,12 +141,12 @@ class GaiaCookieManagerService : public KeyedService, void GetCheckConnectionInfoCompleted(bool succeeded); GaiaCookieManagerService* helper_; - base::OneShotTimer<ExternalCcResultFetcher> timer_; + base::OneShotTimer timer_; URLToTokenAndFetcher fetchers_; ResultMap results_; base::Time m_external_cc_result_start_time_; - base::OneShotTimer<ExternalCcResultFetcher> gaia_auth_fetcher_timer_; + base::OneShotTimer gaia_auth_fetcher_timer_; DISALLOW_COPY_AND_ASSIGN(ExternalCcResultFetcher); }; @@ -246,9 +246,7 @@ class GaiaCookieManagerService : public KeyedService, // If the GaiaAuthFetcher or URLFetcher fails, retry with exponential backoff // and network delay. net::BackoffEntry fetcher_backoff_; - // We can safely depend on the SigninClient here because there is an explicit - // dependency, as noted in the GaiaCookieManagerServiceFactory. - base::OneShotTimer<SigninClient> fetcher_timer_; + base::OneShotTimer fetcher_timer_; int fetcher_retries_; // The last fetched ubertoken, for use in MergeSession retries. diff --git a/components/sync_driver/model_association_manager.cc b/components/sync_driver/model_association_manager.cc index 7602385..b732006 100644 --- a/components/sync_driver/model_association_manager.cc +++ b/components/sync_driver/model_association_manager.cc @@ -419,8 +419,7 @@ void ModelAssociationManager::ModelAssociationDone(State new_state) { delegate_->OnModelAssociationDone(result); } -base::OneShotTimer<ModelAssociationManager>* - ModelAssociationManager::GetTimerForTesting() { +base::OneShotTimer* ModelAssociationManager::GetTimerForTesting() { return &timer_; } diff --git a/components/sync_driver/model_association_manager.h b/components/sync_driver/model_association_manager.h index 56d291f..b1491d8 100644 --- a/components/sync_driver/model_association_manager.h +++ b/components/sync_driver/model_association_manager.h @@ -84,7 +84,7 @@ class ModelAssociationManager { // and modify the timer. // TODO(sync) : This would go away if we made this class be able to do // Dependency injection. crbug.com/129212. - base::OneShotTimer<ModelAssociationManager>* GetTimerForTesting(); + base::OneShotTimer* GetTimerForTesting(); State state() const { return state_; } @@ -149,7 +149,7 @@ class ModelAssociationManager { ModelAssociationManagerDelegate* delegate_; // Timer to track and limit how long a datatype takes to model associate. - base::OneShotTimer<ModelAssociationManager> timer_; + base::OneShotTimer timer_; DataTypeManager::ConfigureStatus configure_status_; diff --git a/components/sync_driver/sync_stopped_reporter.h b/components/sync_driver/sync_stopped_reporter.h index c4bd8cf..6ae1d2b 100644 --- a/components/sync_driver/sync_stopped_reporter.h +++ b/components/sync_driver/sync_stopped_reporter.h @@ -54,7 +54,7 @@ class SyncStoppedReporter : public net::URLFetcherDelegate { void OnTimeout(); // Handles timing out requests. - base::OneShotTimer<SyncStoppedReporter> timer_; + base::OneShotTimer timer_; // The URL for the sync server's event RPC. const GURL sync_event_url_; diff --git a/components/update_client/background_downloader_win.cc b/components/update_client/background_downloader_win.cc index 870a299..262824a 100644 --- a/components/update_client/background_downloader_win.cc +++ b/components/update_client/background_downloader_win.cc @@ -442,7 +442,7 @@ void BackgroundDownloader::BeginDownload(const GURL& url) { // A repeating timer retains the user task. This timer can be stopped and // reset multiple times. - timer_.reset(new base::RepeatingTimer<BackgroundDownloader>); + timer_.reset(new base::RepeatingTimer); timer_->Start(FROM_HERE, base::TimeDelta::FromSeconds(kJobPollingIntervalSec), this, &BackgroundDownloader::OnDownloading); } diff --git a/components/update_client/background_downloader_win.h b/components/update_client/background_downloader_win.h index 59113f4..459e677 100644 --- a/components/update_client/background_downloader_win.h +++ b/components/update_client/background_downloader_win.h @@ -93,7 +93,7 @@ class BackgroundDownloader : public CrxDownloader { // The timer and the BITS interface pointers have thread affinity. These // members are initialized on the task runner and they must be destroyed // on the task runner. - scoped_ptr<base::RepeatingTimer<BackgroundDownloader>> timer_; + scoped_ptr<base::RepeatingTimer> timer_; base::win::ScopedComPtr<IBackgroundCopyManager> bits_manager_; base::win::ScopedComPtr<IBackgroundCopyJob> job_; diff --git a/components/variations/variations_request_scheduler.h b/components/variations/variations_request_scheduler.h index e564375..c364010 100644 --- a/components/variations/variations_request_scheduler.h +++ b/components/variations/variations_request_scheduler.h @@ -57,10 +57,10 @@ class VariationsRequestScheduler { // The timer used to repeatedly ping the server. Keep this as an instance // member so if VariationsRequestScheduler goes out of scope, the timer is // automatically canceled. - base::RepeatingTimer<VariationsRequestScheduler> timer_; + base::RepeatingTimer timer_; // A one-shot timer used for scheduling out-of-band fetches. - base::OneShotTimer<VariationsRequestScheduler> one_shot_timer_; + base::OneShotTimer one_shot_timer_; DISALLOW_COPY_AND_ASSIGN(VariationsRequestScheduler); }; diff --git a/components/variations/variations_request_scheduler_mobile.h b/components/variations/variations_request_scheduler_mobile.h index 527f70e..96983d5 100644 --- a/components/variations/variations_request_scheduler_mobile.h +++ b/components/variations/variations_request_scheduler_mobile.h @@ -39,7 +39,7 @@ class VariationsRequestSchedulerMobile : public VariationsRequestScheduler { PrefService* local_state_; // Timer used for triggering a delayed fetch for ScheduleFetch(). - base::OneShotTimer<VariationsRequestSchedulerMobile> schedule_fetch_timer_; + base::OneShotTimer schedule_fetch_timer_; // The time the last seed request was initiated. base::Time last_request_time_; diff --git a/components/visitedlink/browser/visitedlink_event_listener.h b/components/visitedlink/browser/visitedlink_event_listener.h index 2b6aa72..f211fce 100644 --- a/components/visitedlink/browser/visitedlink_event_listener.h +++ b/components/visitedlink/browser/visitedlink_event_listener.h @@ -47,7 +47,7 @@ class VisitedLinkEventListener : public VisitedLinkMaster::Listener, const content::NotificationSource& source, const content::NotificationDetails& details) override; - base::OneShotTimer<VisitedLinkEventListener> coalesce_timer_; + base::OneShotTimer coalesce_timer_; VisitedLinkCommon::Fingerprints pending_visited_links_; content::NotificationRegistrar registrar_; diff --git a/content/browser/appcache/appcache_service_impl.h b/content/browser/appcache/appcache_service_impl.h index 8ec839e..9686666 100644 --- a/content/browser/appcache/appcache_service_impl.h +++ b/content/browser/appcache/appcache_service_impl.h @@ -215,7 +215,7 @@ class CONTENT_EXPORT AppCacheServiceImpl bool force_keep_session_state_; base::Time last_reinit_time_; base::TimeDelta next_reinit_delay_; - base::OneShotTimer<AppCacheServiceImpl> reinit_timer_; + base::OneShotTimer reinit_timer_; base::ObserverList<Observer> observers_; private: diff --git a/content/browser/appcache/appcache_storage_impl.h b/content/browser/appcache/appcache_storage_impl.h index 3d9b0a8..2d1162e 100644 --- a/content/browser/appcache/appcache_storage_impl.h +++ b/content/browser/appcache/appcache_storage_impl.h @@ -176,7 +176,7 @@ class AppCacheStorageImpl : public AppCacheStorage { bool is_disabled_; scoped_ptr<AppCacheDiskCache> disk_cache_; - base::OneShotTimer<AppCacheStorageImpl> lazy_commit_timer_; + base::OneShotTimer lazy_commit_timer_; // Used to short-circuit certain operations without having to schedule // any tasks on the background database thread. diff --git a/content/browser/browser_main_loop.h b/content/browser/browser_main_loop.h index 822589e7..4650c27 100644 --- a/content/browser/browser_main_loop.h +++ b/content/browser/browser_main_loop.h @@ -212,7 +212,7 @@ class CONTENT_EXPORT BrowserMainLoop { base::FilePath startup_trace_file_; // This timer initiates trace file saving. - base::OneShotTimer<BrowserMainLoop> startup_trace_timer_; + base::OneShotTimer startup_trace_timer_; // Members initialized in |Init()| ------------------------------------------- // Destroy |parts_| before |main_message_loop_| (required) and before other diff --git a/content/browser/device_sensors/data_fetcher_shared_memory_base.cc b/content/browser/device_sensors/data_fetcher_shared_memory_base.cc index ac86c6f..13c2135 100644 --- a/content/browser/device_sensors/data_fetcher_shared_memory_base.cc +++ b/content/browser/device_sensors/data_fetcher_shared_memory_base.cc @@ -51,7 +51,7 @@ class DataFetcherSharedMemoryBase::PollingThread : public base::Thread { unsigned consumers_bitmask_; DataFetcherSharedMemoryBase* fetcher_; - scoped_ptr<base::RepeatingTimer<PollingThread> > timer_; + scoped_ptr<base::RepeatingTimer> timer_; DISALLOW_COPY_AND_ASSIGN(PollingThread); }; @@ -77,7 +77,7 @@ void DataFetcherSharedMemoryBase::PollingThread::AddConsumer( consumers_bitmask_ |= consumer_type; if (!timer_ && fetcher_->GetType() == FETCHER_TYPE_POLLING_CALLBACK) { - timer_.reset(new base::RepeatingTimer<PollingThread>()); + timer_.reset(new base::RepeatingTimer()); timer_->Start(FROM_HERE, fetcher_->GetInterval(), this, &PollingThread::DoPoll); diff --git a/content/browser/download/download_file_impl.cc b/content/browser/download/download_file_impl.cc index 3436722..c5bed54 100644 --- a/content/browser/download/download_file_impl.cc +++ b/content/browser/download/download_file_impl.cc @@ -66,7 +66,7 @@ DownloadFileImpl::~DownloadFileImpl() { void DownloadFileImpl::Initialize(const InitializeCallback& callback) { DCHECK_CURRENTLY_ON(BrowserThread::FILE); - update_timer_.reset(new base::RepeatingTimer<DownloadFileImpl>()); + update_timer_.reset(new base::RepeatingTimer()); DownloadInterruptReason result = file_.Initialize(default_download_directory_); if (result != DOWNLOAD_INTERRUPT_REASON_NONE) { diff --git a/content/browser/download/download_file_impl.h b/content/browser/download/download_file_impl.h index 4fef3fe..2a8edb3 100644 --- a/content/browser/download/download_file_impl.h +++ b/content/browser/download/download_file_impl.h @@ -116,7 +116,7 @@ class CONTENT_EXPORT DownloadFileImpl : public DownloadFile { scoped_ptr<ByteStreamReader> stream_reader_; // Used to trigger progress updates. - scoped_ptr<base::RepeatingTimer<DownloadFileImpl> > update_timer_; + scoped_ptr<base::RepeatingTimer> update_timer_; // Statistics size_t bytes_seen_; diff --git a/content/browser/indexed_db/indexed_db_backing_store.h b/content/browser/indexed_db/indexed_db_backing_store.h index c1f1b2a..52344e1 100644 --- a/content/browser/indexed_db/indexed_db_backing_store.h +++ b/content/browser/indexed_db/indexed_db_backing_store.h @@ -358,9 +358,7 @@ class CONTENT_EXPORT IndexedDBBackingStore const GURL& origin_url() const { return origin_url_; } IndexedDBFactory* factory() const { return indexed_db_factory_; } base::SequencedTaskRunner* task_runner() const { return task_runner_.get(); } - base::OneShotTimer<IndexedDBBackingStore>* close_timer() { - return &close_timer_; - } + base::OneShotTimer* close_timer() { return &close_timer_; } IndexedDBActiveBlobRegistry* active_blob_registry() { return &active_blob_registry_; } @@ -653,14 +651,14 @@ class CONTENT_EXPORT IndexedDBBackingStore scoped_refptr<base::SequencedTaskRunner> task_runner_; std::set<int> child_process_ids_granted_; BlobChangeMap incognito_blob_map_; - base::OneShotTimer<IndexedDBBackingStore> journal_cleaning_timer_; + base::OneShotTimer journal_cleaning_timer_; scoped_ptr<LevelDBDatabase> db_; scoped_ptr<LevelDBComparator> comparator_; // Whenever blobs are registered in active_blob_registry_, indexed_db_factory_ // will hold a reference to this backing store. IndexedDBActiveBlobRegistry active_blob_registry_; - base::OneShotTimer<IndexedDBBackingStore> close_timer_; + base::OneShotTimer close_timer_; // Incremented whenever a transaction starts committing, decremented when // complete. While > 0, temporary journal entries may exist so out-of-band diff --git a/content/browser/indexed_db/indexed_db_transaction.h b/content/browser/indexed_db/indexed_db_transaction.h index 5bec07b..5da7800 100644 --- a/content/browser/indexed_db/indexed_db_transaction.h +++ b/content/browser/indexed_db/indexed_db_transaction.h @@ -175,7 +175,7 @@ class CONTENT_EXPORT IndexedDBTransaction // This timer is started after requests have been processed. If no subsequent // requests are processed before the timer fires, assume the script is // unresponsive and abort to unblock the transaction queue. - base::OneShotTimer<IndexedDBTransaction> timeout_timer_; + base::OneShotTimer timeout_timer_; Diagnostics diagnostics_; }; diff --git a/content/browser/loader/async_resource_handler.h b/content/browser/loader/async_resource_handler.h index 464be2f..9d46096 100644 --- a/content/browser/loader/async_resource_handler.h +++ b/content/browser/loader/async_resource_handler.h @@ -81,7 +81,7 @@ class AsyncResourceHandler : public ResourceHandler, uint64 last_upload_position_; bool waiting_for_upload_progress_ack_; base::TimeTicks last_upload_ticks_; - base::RepeatingTimer<AsyncResourceHandler> progress_timer_; + base::RepeatingTimer progress_timer_; int64_t reported_transfer_size_; diff --git a/content/browser/loader/detachable_resource_handler.cc b/content/browser/loader/detachable_resource_handler.cc index 139a629..df9c357 100644 --- a/content/browser/loader/detachable_resource_handler.cc +++ b/content/browser/loader/detachable_resource_handler.cc @@ -63,7 +63,7 @@ void DetachableResourceHandler::Detach() { next_handler_.reset(); // Time the request out if it takes too long. - detached_timer_.reset(new base::OneShotTimer<DetachableResourceHandler>()); + detached_timer_.reset(new base::OneShotTimer()); detached_timer_->Start( FROM_HERE, cancel_delay_, this, &DetachableResourceHandler::Cancel); diff --git a/content/browser/loader/detachable_resource_handler.h b/content/browser/loader/detachable_resource_handler.h index f50fdf1..4bb1763 100644 --- a/content/browser/loader/detachable_resource_handler.h +++ b/content/browser/loader/detachable_resource_handler.h @@ -73,7 +73,7 @@ class DetachableResourceHandler : public ResourceHandler, scoped_ptr<ResourceHandler> next_handler_; scoped_refptr<net::IOBuffer> read_buffer_; - scoped_ptr<base::OneShotTimer<DetachableResourceHandler> > detached_timer_; + scoped_ptr<base::OneShotTimer> detached_timer_; base::TimeDelta cancel_delay_; bool is_deferred_; diff --git a/content/browser/loader/power_save_block_resource_throttle.h b/content/browser/loader/power_save_block_resource_throttle.h index a09293f..0d0c080 100644 --- a/content/browser/loader/power_save_block_resource_throttle.h +++ b/content/browser/loader/power_save_block_resource_throttle.h @@ -29,7 +29,7 @@ class PowerSaveBlockResourceThrottle : public ResourceThrottle { private: void ActivatePowerSaveBlocker(); - base::OneShotTimer<PowerSaveBlockResourceThrottle> timer_; + base::OneShotTimer timer_; scoped_ptr<PowerSaveBlocker> power_save_blocker_; DISALLOW_COPY_AND_ASSIGN(PowerSaveBlockResourceThrottle); diff --git a/content/browser/loader/resource_dispatcher_host_impl.cc b/content/browser/loader/resource_dispatcher_host_impl.cc index c5c6796..c069469 100644 --- a/content/browser/loader/resource_dispatcher_host_impl.cc +++ b/content/browser/loader/resource_dispatcher_host_impl.cc @@ -471,8 +471,7 @@ ResourceDispatcherHostImpl::ResourceDispatcherHostImpl() base::Bind(&ResourceDispatcherHostImpl::OnInit, base::Unretained(this))); - update_load_states_timer_.reset( - new base::RepeatingTimer<ResourceDispatcherHostImpl>()); + update_load_states_timer_.reset(new base::RepeatingTimer()); } ResourceDispatcherHostImpl::~ResourceDispatcherHostImpl() { diff --git a/content/browser/loader/resource_dispatcher_host_impl.h b/content/browser/loader/resource_dispatcher_host_impl.h index 1d78c34..dc65e5a 100644 --- a/content/browser/loader/resource_dispatcher_host_impl.h +++ b/content/browser/loader/resource_dispatcher_host_impl.h @@ -522,8 +522,7 @@ class CONTENT_EXPORT ResourceDispatcherHostImpl // A timer that periodically calls UpdateLoadInfo while pending_loaders_ is // not empty and at least one RenderViewHost is loading. - scoped_ptr<base::RepeatingTimer<ResourceDispatcherHostImpl> > - update_load_states_timer_; + scoped_ptr<base::RepeatingTimer> update_load_states_timer_; // We own the save file manager. scoped_refptr<SaveFileManager> save_file_manager_; diff --git a/content/browser/loader/resource_dispatcher_host_unittest.cc b/content/browser/loader/resource_dispatcher_host_unittest.cc index 5904559..da62f4a 100644 --- a/content/browser/loader/resource_dispatcher_host_unittest.cc +++ b/content/browser/loader/resource_dispatcher_host_unittest.cc @@ -1356,7 +1356,7 @@ TEST_F(ResourceDispatcherHostTest, DetachedResourceTimesOut) { // Wait until after the delay timer times out before we start processing any // messages. - base::OneShotTimer<base::MessageLoop> timer; + base::OneShotTimer timer; timer.Start(FROM_HERE, base::TimeDelta::FromMilliseconds(210), base::MessageLoop::current(), &base::MessageLoop::QuitWhenIdle); base::MessageLoop::current()->Run(); @@ -1759,7 +1759,7 @@ TEST_F(ResourceDispatcherHostTest, TestProcessCancelDetachedTimesOut) { // Wait until after the delay timer times out before we start processing any // messages. - base::OneShotTimer<base::MessageLoop> timer; + base::OneShotTimer timer; timer.Start(FROM_HERE, base::TimeDelta::FromMilliseconds(210), base::MessageLoop::current(), &base::MessageLoop::QuitWhenIdle); base::MessageLoop::current()->Run(); diff --git a/content/browser/media/audio_stream_monitor.h b/content/browser/media/audio_stream_monitor.h index bf5de68..7756d3e 100644 --- a/content/browser/media/audio_stream_monitor.h +++ b/content/browser/media/audio_stream_monitor.h @@ -139,11 +139,11 @@ class CONTENT_EXPORT AudioStreamMonitor { bool was_recently_audible_; // Calls Poll() at regular intervals while |poll_callbacks_| is non-empty. - base::RepeatingTimer<AudioStreamMonitor> poll_timer_; + base::RepeatingTimer poll_timer_; // Started only when an indicator is toggled on, to turn it off again in the // future. - base::OneShotTimer<AudioStreamMonitor> off_timer_; + base::OneShotTimer off_timer_; DISALLOW_COPY_AND_ASSIGN(AudioStreamMonitor); }; diff --git a/content/browser/media/capture/desktop_capture_device.cc b/content/browser/media/capture/desktop_capture_device.cc index cb8579b..6cc4839 100644 --- a/content/browser/media/capture/desktop_capture_device.cc +++ b/content/browser/media/capture/desktop_capture_device.cc @@ -108,7 +108,7 @@ class DesktopCaptureDevice::Core : public webrtc::DesktopCapturer::Callback { scoped_ptr<webrtc::DesktopFrame> output_frame_; // Timer used to capture the frame. - base::OneShotTimer<Core> capture_timer_; + base::OneShotTimer capture_timer_; // True when waiting for |desktop_capturer_| to capture current frame. bool capture_in_progress_; diff --git a/content/browser/power_profiler/power_profiler_service.h b/content/browser/power_profiler/power_profiler_service.h index c1610eb..c6f2ca6 100644 --- a/content/browser/power_profiler/power_profiler_service.h +++ b/content/browser/power_profiler/power_profiler_service.h @@ -59,7 +59,7 @@ class CONTENT_EXPORT PowerProfilerService { // Executes on the UI thread. void Notify(const PowerEventVector&); - base::RepeatingTimer<PowerProfilerService> query_power_timer_; + base::RepeatingTimer query_power_timer_; scoped_refptr<base::TaskRunner> task_runner_; Status status_; diff --git a/content/browser/renderer_host/compositor_impl_android.h b/content/browser/renderer_host/compositor_impl_android.h index fc57228..4f06753 100644 --- a/content/browser/renderer_host/compositor_impl_android.h +++ b/content/browser/renderer_host/compositor_impl_android.h @@ -205,7 +205,7 @@ class CONTENT_EXPORT CompositorImpl base::TimeDelta vsync_period_; base::TimeTicks last_vsync_; - base::OneShotTimer<CompositorImpl> establish_gpu_channel_timeout_; + base::OneShotTimer establish_gpu_channel_timeout_; // Whether there is an OutputSurface request pending from the current // |host_|. Becomes |true| if RequestNewOutputSurface is called, and |false| diff --git a/content/browser/renderer_host/input/gesture_event_queue.h b/content/browser/renderer_host/input/gesture_event_queue.h index 208b2de..2a4b452 100644 --- a/content/browser/renderer_host/input/gesture_event_queue.h +++ b/content/browser/renderer_host/input/gesture_event_queue.h @@ -192,7 +192,7 @@ class CONTENT_EXPORT GestureEventQueue { GestureQueue coalesced_gesture_events_; // Timer to release a previously deferred gesture event. - base::OneShotTimer<GestureEventQueue> debounce_deferring_timer_; + base::OneShotTimer debounce_deferring_timer_; // Queue of events that have been deferred for debounce. GestureQueue debouncing_deferral_queue_; diff --git a/content/browser/renderer_host/input/tap_suppression_controller.h b/content/browser/renderer_host/input/tap_suppression_controller.h index 93977f9..bec962a 100644 --- a/content/browser/renderer_host/input/tap_suppression_controller.h +++ b/content/browser/renderer_host/input/tap_suppression_controller.h @@ -72,7 +72,7 @@ class CONTENT_EXPORT TapSuppressionController { }; TapSuppressionControllerClient* client_; - base::OneShotTimer<TapSuppressionController> tap_down_timer_; + base::OneShotTimer tap_down_timer_; State state_; base::TimeDelta max_cancel_to_down_time_; diff --git a/content/browser/renderer_host/input/timeout_monitor.h b/content/browser/renderer_host/input/timeout_monitor.h index 9c0729f..4cccbec 100644 --- a/content/browser/renderer_host/input/timeout_monitor.h +++ b/content/browser/renderer_host/input/timeout_monitor.h @@ -41,7 +41,7 @@ class CONTENT_EXPORT TimeoutMonitor { base::TimeTicks time_when_considered_timed_out_; // This timer runs to check if |time_when_considered_timed_out_| has past. - base::OneShotTimer<TimeoutMonitor> timeout_timer_; + base::OneShotTimer timeout_timer_; DISALLOW_COPY_AND_ASSIGN(TimeoutMonitor); }; diff --git a/content/browser/renderer_host/render_widget_host_view_base.h b/content/browser/renderer_host/render_widget_host_view_base.h index 22f5bd1..a95f1cc 100644 --- a/content/browser/renderer_host/render_widget_host_view_base.h +++ b/content/browser/renderer_host/render_widget_host_view_base.h @@ -425,7 +425,7 @@ protected: uint32 renderer_frame_number_; - base::OneShotTimer<RenderWidgetHostViewBase> flush_input_timer_; + base::OneShotTimer flush_input_timer_; base::WeakPtrFactory<RenderWidgetHostViewBase> weak_factory_; diff --git a/content/browser/renderer_host/websocket_dispatcher_host.h b/content/browser/renderer_host/websocket_dispatcher_host.h index debbf58..5039078 100644 --- a/content/browser/renderer_host/websocket_dispatcher_host.h +++ b/content/browser/renderer_host/websocket_dispatcher_host.h @@ -165,7 +165,7 @@ class CONTENT_EXPORT WebSocketDispatcherHost : public BrowserMessageFilter { WebSocketHostFactory websocket_host_factory_; // Timer and counters for per-renderer WebSocket throttling. - base::RepeatingTimer<WebSocketDispatcherHost> throttling_period_timer_; + base::RepeatingTimer throttling_period_timer_; // The current number of pending connections. int num_pending_connections_; diff --git a/content/browser/service_worker/service_worker_version.h b/content/browser/service_worker/service_worker_version.h index 0c20444..4f83cbf 100644 --- a/content/browser/service_worker/service_worker_version.h +++ b/content/browser/service_worker/service_worker_version.h @@ -593,10 +593,10 @@ class CONTENT_EXPORT ServiceWorkerVersion base::WeakPtr<ServiceWorkerContextCore> context_; base::ObserverList<Listener> listeners_; ServiceWorkerScriptCacheMap script_cache_map_; - base::OneShotTimer<ServiceWorkerVersion> update_timer_; + base::OneShotTimer update_timer_; // Starts running in StartWorker and continues until the worker is stopped. - base::RepeatingTimer<ServiceWorkerVersion> timeout_timer_; + base::RepeatingTimer timeout_timer_; // Holds the time the worker last started being considered idle. base::TimeTicks idle_time_; // Holds the time that the outstanding StartWorker() request started. diff --git a/content/browser/tracing/background_tracing_manager_impl.h b/content/browser/tracing/background_tracing_manager_impl.h index b4ae03c..e5570af 100644 --- a/content/browser/tracing/background_tracing_manager_impl.h +++ b/content/browser/tracing/background_tracing_manager_impl.h @@ -78,7 +78,7 @@ class BackgroundTracingManagerImpl : public BackgroundTracingManager { private: void TracingTimerFired(); - base::OneShotTimer<TracingTimer> tracing_timer_; + base::OneShotTimer tracing_timer_; StartedFinalizingCallback callback_; }; diff --git a/content/browser/tracing/background_tracing_rule.cc b/content/browser/tracing/background_tracing_rule.cc index 473e3d3..1393a51 100644 --- a/content/browser/tracing/background_tracing_rule.cc +++ b/content/browser/tracing/background_tracing_rule.cc @@ -274,7 +274,7 @@ class ReactiveTraceAtRandomIntervalsRule : public BackgroundTracingRule { private: std::string named_event_; - base::OneShotTimer<ReactiveTraceAtRandomIntervalsRule> trigger_timer_; + base::OneShotTimer trigger_timer_; BackgroundTracingConfigImpl::CategoryPreset category_preset_; BackgroundTracingManagerImpl::TriggerHandle handle_; int timeout_min_; diff --git a/content/child/npapi/webplugin_delegate_impl.h b/content/child/npapi/webplugin_delegate_impl.h index 96d4a1e..72f559a9 100644 --- a/content/child/npapi/webplugin_delegate_impl.h +++ b/content/child/npapi/webplugin_delegate_impl.h @@ -395,7 +395,7 @@ class WebPluginDelegateImpl : public WebPluginDelegate { CALayer* layer_; // Used for CA drawing mode. Weak, retained by plugin. WebPluginAcceleratedSurface* surface_; // Weak ref. CARenderer* renderer_; // Renders layer_ to surface_. - scoped_ptr<base::RepeatingTimer<WebPluginDelegateImpl> > redraw_timer_; + scoped_ptr<base::RepeatingTimer> redraw_timer_; // The upper-left corner of the web content area in screen coordinates, // relative to an upper-left (0,0). diff --git a/content/child/npapi/webplugin_delegate_impl_mac.mm b/content/child/npapi/webplugin_delegate_impl_mac.mm index 4dad117..f945eda 100644 --- a/content/child/npapi/webplugin_delegate_impl_mac.mm +++ b/content/child/npapi/webplugin_delegate_impl_mac.mm @@ -214,7 +214,7 @@ bool WebPluginDelegateImpl::PlatformInitialize() { if (!err) { if (drawing_model == NPDrawingModelCoreAnimation) { // Create the timer; it will be started when we get a window handle. - redraw_timer_.reset(new base::RepeatingTimer<WebPluginDelegateImpl>); + redraw_timer_.reset(new base::RepeatingTimer); } layer_ = layer; diff --git a/content/common/gpu/gpu_channel.cc b/content/common/gpu/gpu_channel.cc index e6fa80f..7b0593e 100644 --- a/content/common/gpu/gpu_channel.cc +++ b/content/common/gpu/gpu_channel.cc @@ -238,7 +238,7 @@ GpuChannelMessageFilter::~GpuChannelMessageFilter() {} void GpuChannelMessageFilter::OnFilterAdded(IPC::Sender* sender) { DCHECK(!sender_); sender_ = sender; - timer_ = make_scoped_ptr(new base::OneShotTimer<GpuChannelMessageFilter>); + timer_ = make_scoped_ptr(new base::OneShotTimer); for (scoped_refptr<IPC::MessageFilter>& filter : channel_filters_) { filter->OnFilterAdded(sender_); } diff --git a/content/common/gpu/gpu_channel.h b/content/common/gpu/gpu_channel.h index da16f34..46557c4 100644 --- a/content/common/gpu/gpu_channel.h +++ b/content/common/gpu/gpu_channel.h @@ -379,7 +379,7 @@ class GpuChannelMessageFilter : public IPC::MessageFilter { std::vector<scoped_refptr<IPC::MessageFilter>> channel_filters_; // This timer is created and destroyed on the IO thread. - scoped_ptr<base::OneShotTimer<GpuChannelMessageFilter>> timer_; + scoped_ptr<base::OneShotTimer> timer_; bool a_stub_is_descheduled_; diff --git a/content/common/gpu/media/android_video_decode_accelerator.h b/content/common/gpu/media/android_video_decode_accelerator.h index 6afd437..fec0102 100644 --- a/content/common/gpu/media/android_video_decode_accelerator.h +++ b/content/common/gpu/media/android_video_decode_accelerator.h @@ -204,7 +204,7 @@ class CONTENT_EXPORT AndroidVideoDecodeAccelerator base::WeakPtr<gpu::gles2::GLES2Decoder> gl_decoder_; // Repeating timer responsible for draining pending IO to the codec. - base::RepeatingTimer<AndroidVideoDecodeAccelerator> io_timer_; + base::RepeatingTimer io_timer_; // Backing strategy that we'll use to connect PictureBuffers to frames. scoped_ptr<BackingStrategy> strategy_; diff --git a/content/common/gpu/media/android_video_encode_accelerator.h b/content/common/gpu/media/android_video_encode_accelerator.h index f44865e..98fa3c2 100644 --- a/content/common/gpu/media/android_video_encode_accelerator.h +++ b/content/common/gpu/media/android_video_encode_accelerator.h @@ -90,7 +90,7 @@ class CONTENT_EXPORT AndroidVideoEncodeAccelerator PendingFrames pending_frames_; // Repeating timer responsible for draining pending IO to the codec. - base::RepeatingTimer<AndroidVideoEncodeAccelerator> io_timer_; + base::RepeatingTimer io_timer_; // The difference between number of buffers queued & dequeued at the codec. int32 num_buffers_at_codec_; diff --git a/content/common/gpu/media/video_encode_accelerator_unittest.cc b/content/common/gpu/media/video_encode_accelerator_unittest.cc index d94941c..b612bd8 100644 --- a/content/common/gpu/media/video_encode_accelerator_unittest.cc +++ b/content/common/gpu/media/video_encode_accelerator_unittest.cc @@ -965,7 +965,7 @@ class VEAClient : public VideoEncodeAccelerator::Client { unsigned int requested_subsequent_framerate_; // The timer used to feed the encoder with the input frames. - scoped_ptr<base::RepeatingTimer<VEAClient>> input_timer_; + scoped_ptr<base::RepeatingTimer> input_timer_; }; VEAClient::VEAClient(TestStream* test_stream, @@ -1209,7 +1209,7 @@ void VEAClient::RequireBitstreamBuffers(unsigned int input_count, } if (g_env->run_at_fps()) { - input_timer_.reset(new base::RepeatingTimer<VEAClient>()); + input_timer_.reset(new base::RepeatingTimer()); input_timer_->Start( FROM_HERE, base::TimeDelta::FromSeconds(1) / current_framerate_, base::Bind(&VEAClient::OnInputTimer, base::Unretained(this))); diff --git a/content/renderer/device_sensors/device_sensor_event_pump.h b/content/renderer/device_sensors/device_sensor_event_pump.h index 45e028d..700f28e 100644 --- a/content/renderer/device_sensors/device_sensor_event_pump.h +++ b/content/renderer/device_sensors/device_sensor_event_pump.h @@ -92,7 +92,7 @@ class CONTENT_EXPORT DeviceSensorEventPump int pump_delay_microseconds_; PumpState state_; - base::RepeatingTimer<DeviceSensorEventPump> timer_; + base::RepeatingTimer timer_; DISALLOW_COPY_AND_ASSIGN(DeviceSensorEventPump); }; diff --git a/content/renderer/fetchers/resource_fetcher_impl.h b/content/renderer/fetchers/resource_fetcher_impl.h index 4e22ff0..34838f2 100644 --- a/content/renderer/fetchers/resource_fetcher_impl.h +++ b/content/renderer/fetchers/resource_fetcher_impl.h @@ -71,7 +71,7 @@ class ResourceFetcherImpl : public ResourceFetcher, Callback callback_; // Limit how long to wait for the server. - base::OneShotTimer<ResourceFetcherImpl> timeout_timer_; + base::OneShotTimer timeout_timer_; DISALLOW_COPY_AND_ASSIGN(ResourceFetcherImpl); }; diff --git a/content/renderer/pepper/plugin_instance_throttler_impl.h b/content/renderer/pepper/plugin_instance_throttler_impl.h index abecf5d..8d6568b 100644 --- a/content/renderer/pepper/plugin_instance_throttler_impl.h +++ b/content/renderer/pepper/plugin_instance_throttler_impl.h @@ -109,7 +109,7 @@ class CONTENT_EXPORT PluginInstanceThrottlerImpl // Video plugins with throttled audio often stop generating frames. // This timer is so we don't wait forever for candidate poster frames. bool audio_throttled_; - base::DelayTimer<PluginInstanceThrottlerImpl> audio_throttled_frame_timeout_; + base::DelayTimer audio_throttled_frame_timeout_; base::ObserverList<Observer> observer_list_; diff --git a/content/renderer/render_thread_impl.h b/content/renderer/render_thread_impl.h index c3f9ab6..941169d 100644 --- a/content/renderer/render_thread_impl.h +++ b/content/renderer/render_thread_impl.h @@ -552,7 +552,7 @@ class CONTENT_EXPORT RenderThreadImpl bool layout_test_mode_; // Timer that periodically calls IdleHandler. - base::RepeatingTimer<RenderThreadImpl> idle_timer_; + base::RepeatingTimer idle_timer_; // The channel from the renderer process to the GPU process. scoped_refptr<GpuChannelHost> gpu_channel_; diff --git a/content/renderer/render_view_impl.h b/content/renderer/render_view_impl.h index 597e79e..76b70c9 100644 --- a/content/renderer/render_view_impl.h +++ b/content/renderer/render_view_impl.h @@ -828,7 +828,7 @@ class CONTENT_EXPORT RenderViewImpl // Timer used to delay the updating of nav state (see // StartNavStateSyncTimerIfNecessary). - base::OneShotTimer<RenderViewImpl> nav_state_sync_timer_; + base::OneShotTimer nav_state_sync_timer_; // Page IDs ------------------------------------------------------------------ // See documentation in RenderView. @@ -901,7 +901,7 @@ class CONTENT_EXPORT RenderViewImpl // Used to delay determining the preferred size (to avoid intermediate // states for the sizes). - base::OneShotTimer<RenderViewImpl> check_preferred_size_timer_; + base::OneShotTimer check_preferred_size_timer_; // Bookkeeping to suppress redundant scroll and focus requests for an already // scrolled and focused editable node. diff --git a/content/renderer/resource_fetcher_browsertest.cc b/content/renderer/resource_fetcher_browsertest.cc index 3b0f704..0d76e2d 100644 --- a/content/renderer/resource_fetcher_browsertest.cc +++ b/content/renderer/resource_fetcher_browsertest.cc @@ -92,7 +92,7 @@ class FetcherDelegate { static FetcherDelegate* instance_; private: - base::OneShotTimer<FetcherDelegate> timer_; + base::OneShotTimer timer_; bool completed_; bool timed_out_; WebURLResponse response_; 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_; diff --git a/google_apis/gaia/oauth2_token_service.cc b/google_apis/gaia/oauth2_token_service.cc index 01e5d96..0c7519b 100644 --- a/google_apis/gaia/oauth2_token_service.cc +++ b/google_apis/gaia/oauth2_token_service.cc @@ -172,7 +172,7 @@ class OAuth2TokenService::Fetcher : public OAuth2AccessTokenConsumer { std::vector<base::WeakPtr<RequestImpl> > waiting_requests_; int retry_number_; - base::OneShotTimer<Fetcher> retry_timer_; + base::OneShotTimer retry_timer_; scoped_ptr<OAuth2AccessTokenFetcher> fetcher_; // Variables that store fetch results. diff --git a/google_apis/gaia/ubertoken_fetcher.h b/google_apis/gaia/ubertoken_fetcher.h index ade53cc..5601746 100644 --- a/google_apis/gaia/ubertoken_fetcher.h +++ b/google_apis/gaia/ubertoken_fetcher.h @@ -91,7 +91,7 @@ class UbertokenFetcher : public GaiaAuthConsumer, std::string account_id_; std::string access_token_; int retry_number_; - base::OneShotTimer<UbertokenFetcher> retry_timer_; + base::OneShotTimer retry_timer_; bool second_access_token_request_; DISALLOW_COPY_AND_ASSIGN(UbertokenFetcher); diff --git a/google_apis/gcm/engine/connection_handler_impl.h b/google_apis/gcm/engine/connection_handler_impl.h index 399b397..e2702c0 100644 --- a/google_apis/gcm/engine/connection_handler_impl.h +++ b/google_apis/gcm/engine/connection_handler_impl.h @@ -93,7 +93,7 @@ class GCM_EXPORT ConnectionHandlerImpl : public ConnectionHandler { // TODO(zea): consider enforcing a separate timeout when waiting for // a message to send. const base::TimeDelta read_timeout_; - base::OneShotTimer<ConnectionHandlerImpl> read_timeout_timer_; + base::OneShotTimer read_timeout_timer_; // This connection's socket and the input/output streams attached to it. net::StreamSocket* socket_; diff --git a/jingle/notifier/communicator/login.h b/jingle/notifier/communicator/login.h index cfc4267..e499150 100644 --- a/jingle/notifier/communicator/login.h +++ b/jingle/notifier/communicator/login.h @@ -121,7 +121,7 @@ class Login : public net::NetworkChangeNotifier::IPAddressObserver, // reconnection state. base::TimeDelta reconnect_interval_; - base::OneShotTimer<Login> reconnect_timer_; + base::OneShotTimer reconnect_timer_; DISALLOW_COPY_AND_ASSIGN(Login); }; diff --git a/media/audio/agc_audio_stream.h b/media/audio/agc_audio_stream.h index a2958ce..b0117e1 100644 --- a/media/audio/agc_audio_stream.h +++ b/media/audio/agc_audio_stream.h @@ -180,7 +180,7 @@ class MEDIA_EXPORT AgcAudioStream : public AudioInterface { // Repeating timer which cancels itself when it goes out of scope. // Used to check the microphone volume periodically. - base::RepeatingTimer<AgcAudioStream<AudioInterface> > timer_; + base::RepeatingTimer timer_; // True when automatic gain control is enabled, false otherwise. bool agc_is_enabled_; diff --git a/media/audio/audio_output_controller.cc b/media/audio/audio_output_controller.cc index 8af0aab..59f541e 100644 --- a/media/audio/audio_output_controller.cc +++ b/media/audio/audio_output_controller.cc @@ -176,7 +176,7 @@ void AudioOutputController::DoPlay() { // Timer self-manages its lifetime and WedgeCheck() will only record the UMA // statistic if state is still kPlaying. Additional Start() calls will // invalidate the previous timer. - wedge_timer_.reset(new base::OneShotTimer<AudioOutputController>()); + wedge_timer_.reset(new base::OneShotTimer()); wedge_timer_->Start( FROM_HERE, TimeDelta::FromSeconds(5), this, &AudioOutputController::WedgeCheck); diff --git a/media/audio/audio_output_controller.h b/media/audio/audio_output_controller.h index 298c565..f1711d5 100644 --- a/media/audio/audio_output_controller.h +++ b/media/audio/audio_output_controller.h @@ -248,7 +248,7 @@ class MEDIA_EXPORT AudioOutputController // Flags when we've asked for a stream to start but it never did. base::AtomicRefCount on_more_io_data_called_; - scoped_ptr<base::OneShotTimer<AudioOutputController> > wedge_timer_; + scoped_ptr<base::OneShotTimer> wedge_timer_; DISALLOW_COPY_AND_ASSIGN(AudioOutputController); }; diff --git a/media/audio/audio_output_dispatcher_impl.h b/media/audio/audio_output_dispatcher_impl.h index d271784..ab290c5 100644 --- a/media/audio/audio_output_dispatcher_impl.h +++ b/media/audio/audio_output_dispatcher_impl.h @@ -83,7 +83,7 @@ class MEDIA_EXPORT AudioOutputDispatcherImpl : public AudioOutputDispatcher { // When streams are stopped they're added to |idle_streams_|, if no stream is // reused before |close_delay_| elapses |close_timer_| will run // CloseIdleStreams(). - base::DelayTimer<AudioOutputDispatcherImpl> close_timer_; + base::DelayTimer close_timer_; typedef std::map<AudioOutputProxy*, AudioOutputStream*> AudioStreamMap; AudioStreamMap proxy_to_physical_map_; diff --git a/media/base/android/media_player_bridge.h b/media/base/android/media_player_bridge.h index 53d3ead..f2f53e7 100644 --- a/media/base/android/media_player_bridge.h +++ b/media/base/android/media_player_bridge.h @@ -177,7 +177,7 @@ class MEDIA_EXPORT MediaPlayerBridge : public MediaPlayerAndroid { // Java MediaPlayerBridge instance. base::android::ScopedJavaGlobalRef<jobject> j_media_player_bridge_; - base::RepeatingTimer<MediaPlayerBridge> time_update_timer_; + base::RepeatingTimer time_update_timer_; // Volume of playback. double volume_; diff --git a/media/blink/skcanvas_video_renderer.h b/media/blink/skcanvas_video_renderer.h index b82fe0a..0bb7b39 100644 --- a/media/blink/skcanvas_video_renderer.h +++ b/media/blink/skcanvas_video_renderer.h @@ -81,7 +81,7 @@ class MEDIA_EXPORT SkCanvasVideoRenderer { // Timestamp of the videoframe used to generate |last_image_|. base::TimeDelta last_timestamp_ = media::kNoTimestamp(); // If |last_image_| is not used for a while, it's deleted to save memory. - base::DelayTimer<SkCanvasVideoRenderer> last_image_deleting_timer_; + base::DelayTimer last_image_deleting_timer_; DISALLOW_COPY_AND_ASSIGN(SkCanvasVideoRenderer); }; diff --git a/media/cast/test/receiver.cc b/media/cast/test/receiver.cc index 9d7759b..ccaf37e 100644 --- a/media/cast/test/receiver.cc +++ b/media/cast/test/receiver.cc @@ -517,7 +517,7 @@ class NaivePlayer : public InProcessReceiver, base::TimeTicks last_popped_video_playout_time_; int64 num_video_frames_processed_; - base::OneShotTimer<NaivePlayer> video_playout_timer_; + base::OneShotTimer video_playout_timer_; // Audio playout queue, synchronized by |audio_lock_|. base::Lock audio_lock_; diff --git a/media/mojo/services/mojo_renderer_service.h b/media/mojo/services/mojo_renderer_service.h index 2fa0ce3..dad6170 100644 --- a/media/mojo/services/mojo_renderer_service.h +++ b/media/mojo/services/mojo_renderer_service.h @@ -114,7 +114,7 @@ class MEDIA_EXPORT MojoRendererService scoped_ptr<media::Renderer> renderer_; - base::RepeatingTimer<MojoRendererService> time_update_timer_; + base::RepeatingTimer time_update_timer_; uint64_t last_media_time_usec_; interfaces::RendererClientPtr client_; diff --git a/net/base/network_change_notifier.cc b/net/base/network_change_notifier.cc index 4c1dd68..b86b79c 100644 --- a/net/base/network_change_notifier.cc +++ b/net/base/network_change_notifier.cc @@ -484,7 +484,7 @@ class NetworkChangeNotifier::NetworkChangeCalculator // Value to pass to NotifyObserversOfNetworkChange when Notify is called. ConnectionType pending_connection_type_; // Used to delay notifications so duplicates can be combined. - base::OneShotTimer<NetworkChangeCalculator> timer_; + base::OneShotTimer timer_; base::ThreadChecker thread_checker_; diff --git a/net/base/network_change_notifier_win.h b/net/base/network_change_notifier_win.h index 04615a7..113de9f 100644 --- a/net/base/network_change_notifier_win.h +++ b/net/base/network_change_notifier_win.h @@ -90,7 +90,7 @@ class NET_EXPORT_PRIVATE NetworkChangeNotifierWin base::win::ObjectWatcher addr_watcher_; OVERLAPPED addr_overlapped_; - base::OneShotTimer<NetworkChangeNotifierWin> timer_; + base::OneShotTimer timer_; // Number of times WatchForAddressChange has failed in a row. int sequential_failures_; diff --git a/net/cert_net/cert_net_fetcher_impl.cc b/net/cert_net/cert_net_fetcher_impl.cc index 51947e3..bf7623b 100644 --- a/net/cert_net/cert_net_fetcher_impl.cc +++ b/net/cert_net/cert_net_fetcher_impl.cc @@ -217,7 +217,7 @@ class CertNetFetcherImpl::Job : public URLRequest::Delegate { // Used to timeout the job when the URLRequest takes too long. This timer is // also used for notifying a failure to start the URLRequest. - base::OneShotTimer<Job> timer_; + base::OneShotTimer timer_; // Non-owned pointer to the CertNetFetcherImpl that created this job. CertNetFetcherImpl* parent_; diff --git a/net/disk_cache/blockfile/backend_impl.cc b/net/disk_cache/blockfile/backend_impl.cc index 50e7b02..82a58b3 100644 --- a/net/disk_cache/blockfile/backend_impl.cc +++ b/net/disk_cache/blockfile/backend_impl.cc @@ -294,7 +294,7 @@ int BackendImpl::SyncInit() { if (!disabled_ && should_create_timer) { // Create a recurrent timer of 30 secs. int timer_delay = unit_test_ ? 1000 : 30000; - timer_.reset(new base::RepeatingTimer<BackendImpl>()); + timer_.reset(new base::RepeatingTimer()); timer_->Start(FROM_HERE, TimeDelta::FromMilliseconds(timer_delay), this, &BackendImpl::OnStatsTimer); } @@ -1158,7 +1158,7 @@ void BackendImpl::TrimDeletedListForTest(bool empty) { eviction_.TrimDeletedList(empty); } -base::RepeatingTimer<BackendImpl>* BackendImpl::GetTimerForTest() { +base::RepeatingTimer* BackendImpl::GetTimerForTest() { return timer_.get(); } diff --git a/net/disk_cache/blockfile/backend_impl.h b/net/disk_cache/blockfile/backend_impl.h index d3a81ac..3feafc1 100644 --- a/net/disk_cache/blockfile/backend_impl.h +++ b/net/disk_cache/blockfile/backend_impl.h @@ -249,7 +249,7 @@ class NET_EXPORT_PRIVATE BackendImpl : public Backend { void TrimDeletedListForTest(bool empty); // Only intended for testing - base::RepeatingTimer<BackendImpl>* GetTimerForTest(); + base::RepeatingTimer* GetTimerForTest(); // Performs a simple self-check, and returns the number of dirty items // or an error code (negative value). @@ -395,7 +395,7 @@ class NET_EXPORT_PRIVATE BackendImpl : public Backend { net::NetLog* net_log_; Stats stats_; // Usage statistics. - scoped_ptr<base::RepeatingTimer<BackendImpl> > timer_; // Usage timer. + scoped_ptr<base::RepeatingTimer> timer_; // Usage timer. base::WaitableEvent done_; // Signals the end of background work. scoped_refptr<TraceObject> trace_object_; // Initializes internal tracing. base::WeakPtrFactory<BackendImpl> ptr_factory_; diff --git a/net/disk_cache/blockfile/backend_impl_v3.cc b/net/disk_cache/blockfile/backend_impl_v3.cc index 36402510..fd572c3 100644 --- a/net/disk_cache/blockfile/backend_impl_v3.cc +++ b/net/disk_cache/blockfile/backend_impl_v3.cc @@ -1026,7 +1026,7 @@ int BackendImplV3::SyncInit() { trace_object_ = TraceObject::GetTraceObject(); // Create a recurrent timer of 30 secs. int timer_delay = unit_test_ ? 1000 : 30000; - timer_.reset(new base::RepeatingTimer<BackendImplV3>()); + timer_.reset(new base::RepeatingTimer()); timer_->Start(FROM_HERE, TimeDelta::FromMilliseconds(timer_delay), this, &BackendImplV3::OnStatsTimer); } diff --git a/net/disk_cache/blockfile/backend_impl_v3.h b/net/disk_cache/blockfile/backend_impl_v3.h index 45ce6ac..4ec5b3f 100644 --- a/net/disk_cache/blockfile/backend_impl_v3.h +++ b/net/disk_cache/blockfile/backend_impl_v3.h @@ -271,7 +271,7 @@ class NET_EXPORT_PRIVATE BackendImplV3 : public Backend { net::NetLog* net_log_; Stats stats_; // Usage statistics. - scoped_ptr<base::RepeatingTimer<BackendImplV3> > timer_; // Usage timer. + scoped_ptr<base::RepeatingTimer> timer_; // Usage timer. scoped_refptr<TraceObject> trace_object_; // Initializes internal tracing. base::WeakPtrFactory<BackendImplV3> ptr_factory_; diff --git a/net/disk_cache/blockfile/backend_worker_v3.cc b/net/disk_cache/blockfile/backend_worker_v3.cc index b0f3250..9d2e6a6 100644 --- a/net/disk_cache/blockfile/backend_worker_v3.cc +++ b/net/disk_cache/blockfile/backend_worker_v3.cc @@ -124,7 +124,7 @@ int BackendImpl::SyncInit() { trace_object_ = TraceObject::GetTraceObject(); // Create a recurrent timer of 30 secs. int timer_delay = unit_test_ ? 1000 : 30000; - timer_.reset(new base::RepeatingTimer<BackendImpl>()); + timer_.reset(new base::RepeatingTimer()); timer_->Start(FROM_HERE, TimeDelta::FromMilliseconds(timer_delay), this, &BackendImpl::OnStatsTimer); } diff --git a/net/disk_cache/disk_cache_test_util.h b/net/disk_cache/disk_cache_test_util.h index 0f40f5e..7191874 100644 --- a/net/disk_cache/disk_cache_test_util.h +++ b/net/disk_cache/disk_cache_test_util.h @@ -64,7 +64,7 @@ class MessageLoopHelper { // Called periodically to test if WaitUntilCacheIoFinished should return. void TimerExpired(); - base::RepeatingTimer<MessageLoopHelper> timer_; + base::RepeatingTimer timer_; int num_callbacks_; int num_iterations_; int last_; diff --git a/net/disk_cache/simple/simple_index.h b/net/disk_cache/simple/simple_index.h index 5135c2b..11adab9 100644 --- a/net/disk_cache/simple/simple_index.h +++ b/net/disk_cache/simple/simple_index.h @@ -187,7 +187,7 @@ class NET_EXPORT_PRIVATE SimpleIndex // has been a while since last time we wrote. base::TimeTicks last_write_to_disk_; - base::OneShotTimer<SimpleIndex> write_to_disk_timer_; + base::OneShotTimer write_to_disk_timer_; base::Closure write_to_disk_cb_; typedef std::list<net::CompletionCallback> CallbackList; diff --git a/net/dns/dns_config_service.h b/net/dns/dns_config_service.h index d7f3b07..05a9d66 100644 --- a/net/dns/dns_config_service.h +++ b/net/dns/dns_config_service.h @@ -204,7 +204,7 @@ class NET_EXPORT_PRIVATE DnsConfigService base::TimeTicks last_sent_empty_time_; // Started in Invalidate*, cleared in On*Read. - base::OneShotTimer<DnsConfigService> timer_; + base::OneShotTimer timer_; NameServerClassifier classifier_; diff --git a/net/dns/dns_transaction.cc b/net/dns/dns_transaction.cc index 148d248..020d5b4 100644 --- a/net/dns/dns_transaction.cc +++ b/net/dns/dns_transaction.cc @@ -961,7 +961,7 @@ class DnsTransactionImpl : public DnsTransaction, // Index of the first server to try on each search query. int first_server_index_; - base::OneShotTimer<DnsTransactionImpl> timer_; + base::OneShotTimer timer_; DISALLOW_COPY_AND_ASSIGN(DnsTransactionImpl); }; diff --git a/net/http/http_response_body_drainer.h b/net/http/http_response_body_drainer.h index a4255d0..3336822 100644 --- a/net/http/http_response_body_drainer.h +++ b/net/http/http_response_body_drainer.h @@ -56,7 +56,7 @@ class NET_EXPORT_PRIVATE HttpResponseBodyDrainer { State next_state_; int total_read_; CompletionCallback user_callback_; - base::OneShotTimer<HttpResponseBodyDrainer> timer_; + base::OneShotTimer timer_; HttpNetworkSession* session_; DISALLOW_COPY_AND_ASSIGN(HttpResponseBodyDrainer); diff --git a/net/http/http_server_properties_manager.cc b/net/http/http_server_properties_manager.cc index b0b6019..2577f95 100644 --- a/net/http/http_server_properties_manager.cc +++ b/net/http/http_server_properties_manager.cc @@ -86,8 +86,7 @@ HttpServerPropertiesManager::HttpServerPropertiesManager( pref_weak_ptr_factory_.reset( new base::WeakPtrFactory<HttpServerPropertiesManager>(this)); pref_weak_ptr_ = pref_weak_ptr_factory_->GetWeakPtr(); - pref_cache_update_timer_.reset( - new base::OneShotTimer<HttpServerPropertiesManager>); + pref_cache_update_timer_.reset(new base::OneShotTimer); pref_change_registrar_.Init(pref_service_); pref_change_registrar_.Add( path_, @@ -106,8 +105,7 @@ void HttpServerPropertiesManager::InitializeOnNetworkThread() { new base::WeakPtrFactory<HttpServerPropertiesManager>(this)); http_server_properties_impl_.reset(new HttpServerPropertiesImpl()); - network_prefs_update_timer_.reset( - new base::OneShotTimer<HttpServerPropertiesManager>); + network_prefs_update_timer_.reset(new base::OneShotTimer); pref_task_runner_->PostTask( FROM_HERE, diff --git a/net/http/http_server_properties_manager.h b/net/http/http_server_properties_manager.h index edd52b4..5678982 100644 --- a/net/http/http_server_properties_manager.h +++ b/net/http/http_server_properties_manager.h @@ -251,8 +251,7 @@ class NET_EXPORT HttpServerPropertiesManager : public HttpServerProperties { base::WeakPtr<HttpServerPropertiesManager> pref_weak_ptr_; // Used to post cache update tasks. - scoped_ptr<base::OneShotTimer<HttpServerPropertiesManager> > - pref_cache_update_timer_; + scoped_ptr<base::OneShotTimer> pref_cache_update_timer_; // Used to track the spdy servers changes. PrefChangeRegistrar pref_change_registrar_; @@ -267,8 +266,7 @@ class NET_EXPORT HttpServerPropertiesManager : public HttpServerProperties { const scoped_refptr<base::SequencedTaskRunner> network_task_runner_; // Used to post |prefs::kHttpServerProperties| pref update tasks. - scoped_ptr<base::OneShotTimer<HttpServerPropertiesManager> > - network_prefs_update_timer_; + scoped_ptr<base::OneShotTimer> network_prefs_update_timer_; scoped_ptr<HttpServerPropertiesImpl> http_server_properties_impl_; diff --git a/net/proxy/dhcp_proxy_script_adapter_fetcher_win.h b/net/proxy/dhcp_proxy_script_adapter_fetcher_win.h index 30dcda2..5e5a691 100644 --- a/net/proxy/dhcp_proxy_script_adapter_fetcher_win.h +++ b/net/proxy/dhcp_proxy_script_adapter_fetcher_win.h @@ -178,7 +178,7 @@ class NET_EXPORT_PRIVATE DhcpProxyScriptAdapterFetcher scoped_ptr<ProxyScriptFetcher> script_fetcher_; // Implements a timeout on the call to the Win32 DHCP API. - base::OneShotTimer<DhcpProxyScriptAdapterFetcher> wait_timer_; + base::OneShotTimer wait_timer_; URLRequestContext* const url_request_context_; diff --git a/net/proxy/dhcp_proxy_script_adapter_fetcher_win_unittest.cc b/net/proxy/dhcp_proxy_script_adapter_fetcher_win_unittest.cc index 0206a17..fd227df 100644 --- a/net/proxy/dhcp_proxy_script_adapter_fetcher_win_unittest.cc +++ b/net/proxy/dhcp_proxy_script_adapter_fetcher_win_unittest.cc @@ -128,7 +128,7 @@ class MockDhcpProxyScriptAdapterFetcher int fetcher_result_; std::string pac_script_; MockProxyScriptFetcher* fetcher_; - base::OneShotTimer<MockDhcpProxyScriptAdapterFetcher> fetcher_timer_; + base::OneShotTimer fetcher_timer_; scoped_refptr<DelayingDhcpQuery> dhcp_query_; }; diff --git a/net/proxy/dhcp_proxy_script_fetcher_win.h b/net/proxy/dhcp_proxy_script_fetcher_win.h index 6110a01..decb795 100644 --- a/net/proxy/dhcp_proxy_script_fetcher_win.h +++ b/net/proxy/dhcp_proxy_script_fetcher_win.h @@ -158,7 +158,7 @@ class NET_EXPORT_PRIVATE DhcpProxyScriptFetcherWin // PAC URL retrieved from DHCP, if any. Valid only in state STATE_DONE. GURL pac_url_; - base::OneShotTimer<DhcpProxyScriptFetcherWin> wait_timer_; + base::OneShotTimer wait_timer_; URLRequestContext* const url_request_context_; diff --git a/net/proxy/dhcp_proxy_script_fetcher_win_unittest.cc b/net/proxy/dhcp_proxy_script_fetcher_win_unittest.cc index 59927dc..a1a2382 100644 --- a/net/proxy/dhcp_proxy_script_fetcher_win_unittest.cc +++ b/net/proxy/dhcp_proxy_script_fetcher_win_unittest.cc @@ -112,8 +112,8 @@ class RealFetchTester { scoped_ptr<DhcpProxyScriptFetcherWin> fetcher_; bool finished_; base::string16 pac_text_; - base::OneShotTimer<RealFetchTester> timeout_; - base::OneShotTimer<RealFetchTester> cancel_timer_; + base::OneShotTimer timeout_; + base::OneShotTimer cancel_timer_; bool on_completion_is_error_; }; @@ -260,7 +260,7 @@ class DummyDhcpProxyScriptAdapterFetcher base::string16 pac_script_; int fetch_delay_ms_; CompletionCallback callback_; - base::OneShotTimer<DummyDhcpProxyScriptAdapterFetcher> timer_; + base::OneShotTimer timer_; }; class MockDhcpProxyScriptFetcherWin : public DhcpProxyScriptFetcherWin { diff --git a/net/proxy/proxy_config_service_linux.cc b/net/proxy/proxy_config_service_linux.cc index c26c0e1..e6c0bcd 100644 --- a/net/proxy/proxy_config_service_linux.cc +++ b/net/proxy/proxy_config_service_linux.cc @@ -208,8 +208,7 @@ class SettingGetterImplGConf : public ProxyConfigServiceLinux::SettingGetter { system_proxy_id_(0), system_http_proxy_id_(0), notify_delegate_(NULL), - debounce_timer_(new base::OneShotTimer<SettingGetterImplGConf>()) { - } + debounce_timer_(new base::OneShotTimer()) {} ~SettingGetterImplGConf() override { // client_ should have been released before now, from @@ -505,7 +504,7 @@ class SettingGetterImplGConf : public ProxyConfigServiceLinux::SettingGetter { guint system_http_proxy_id_; ProxyConfigServiceLinux::Delegate* notify_delegate_; - scoped_ptr<base::OneShotTimer<SettingGetterImplGConf> > debounce_timer_; + scoped_ptr<base::OneShotTimer> debounce_timer_; // Task runner for the thread that we make gconf calls on. It should // be the UI thread and all our methods should be called on this @@ -523,15 +522,14 @@ const char kProxyGConfSchema[] = "org.gnome.system.proxy"; class SettingGetterImplGSettings : public ProxyConfigServiceLinux::SettingGetter { public: - SettingGetterImplGSettings() : - client_(NULL), - http_client_(NULL), - https_client_(NULL), - ftp_client_(NULL), - socks_client_(NULL), - notify_delegate_(NULL), - debounce_timer_(new base::OneShotTimer<SettingGetterImplGSettings>()) { - } + SettingGetterImplGSettings() + : client_(NULL), + http_client_(NULL), + https_client_(NULL), + ftp_client_(NULL), + socks_client_(NULL), + notify_delegate_(NULL), + debounce_timer_(new base::OneShotTimer()) {} ~SettingGetterImplGSettings() override { // client_ should have been released before now, from @@ -776,7 +774,7 @@ class SettingGetterImplGSettings GSettings* ftp_client_; GSettings* socks_client_; ProxyConfigServiceLinux::Delegate* notify_delegate_; - scoped_ptr<base::OneShotTimer<SettingGetterImplGSettings> > debounce_timer_; + scoped_ptr<base::OneShotTimer> debounce_timer_; // Task runner for the thread that we make gsettings calls on. It should // be the UI thread and all our methods should be called on this @@ -862,7 +860,7 @@ class SettingGetterImplKDE : public ProxyConfigServiceLinux::SettingGetter, explicit SettingGetterImplKDE(base::Environment* env_var_getter) : inotify_fd_(-1), notify_delegate_(NULL), - debounce_timer_(new base::OneShotTimer<SettingGetterImplKDE>()), + debounce_timer_(new base::OneShotTimer()), indirect_manual_(false), auto_no_pac_(false), reversed_bypass_list_(false), @@ -1333,7 +1331,7 @@ class SettingGetterImplKDE : public ProxyConfigServiceLinux::SettingGetter, int inotify_fd_; base::MessagePumpLibevent::FileDescriptorWatcher inotify_watcher_; ProxyConfigServiceLinux::Delegate* notify_delegate_; - scoped_ptr<base::OneShotTimer<SettingGetterImplKDE> > debounce_timer_; + scoped_ptr<base::OneShotTimer> debounce_timer_; base::FilePath kde_config_dir_; bool indirect_manual_; bool auto_no_pac_; diff --git a/net/proxy/proxy_script_decider.h b/net/proxy/proxy_script_decider.h index f0e0590..cf5edff 100644 --- a/net/proxy/proxy_script_decider.h +++ b/net/proxy/proxy_script_decider.h @@ -185,7 +185,7 @@ class NET_EXPORT_PRIVATE ProxyScriptDecider { bool fetch_pac_bytes_; base::TimeDelta wait_delay_; - base::OneShotTimer<ProxyScriptDecider> wait_timer_; + base::OneShotTimer wait_timer_; // Whether to do DNS quick check bool quick_check_enabled_; @@ -195,7 +195,7 @@ class NET_EXPORT_PRIVATE ProxyScriptDecider { scoped_refptr<ProxyResolverScriptData> script_data_; AddressList wpad_addresses_; - base::OneShotTimer<ProxyScriptDecider> quick_check_timer_; + base::OneShotTimer quick_check_timer_; scoped_ptr<SingleRequestHostResolver> host_resolver_; base::Time quick_check_start_time_; diff --git a/net/socket/client_socket_pool_base.h b/net/socket/client_socket_pool_base.h index 601ab6d..2f21981 100644 --- a/net/socket/client_socket_pool_base.h +++ b/net/socket/client_socket_pool_base.h @@ -136,7 +136,7 @@ class NET_EXPORT_PRIVATE ConnectJob { // TODO(akalin): Support reprioritization. const RequestPriority priority_; // Timer to abort jobs that take too long. - base::OneShotTimer<ConnectJob> timer_; + base::OneShotTimer timer_; Delegate* delegate_; scoped_ptr<StreamSocket> socket_; BoundNetLog net_log_; @@ -494,7 +494,7 @@ class NET_EXPORT_PRIVATE ClientSocketPoolBaseHelper RequestQueue pending_requests_; int active_socket_count_; // number of active sockets used by clients // A timer for when to start the backup job. - base::OneShotTimer<Group> backup_job_timer_; + base::OneShotTimer backup_job_timer_; }; typedef std::map<std::string, Group*> GroupMap; @@ -615,7 +615,7 @@ class NET_EXPORT_PRIVATE ClientSocketPoolBaseHelper // Timer used to periodically prune idle sockets that timed out or can't be // reused. - base::RepeatingTimer<ClientSocketPoolBaseHelper> timer_; + base::RepeatingTimer timer_; // The total number of idle sockets in the system. int idle_socket_count_; diff --git a/net/socket/transport_client_socket_pool.h b/net/socket/transport_client_socket_pool.h index f201670..036fd9f 100644 --- a/net/socket/transport_client_socket_pool.h +++ b/net/socket/transport_client_socket_pool.h @@ -206,7 +206,7 @@ class NET_EXPORT_PRIVATE TransportConnectJob : public ConnectJob { scoped_ptr<StreamSocket> fallback_transport_socket_; scoped_ptr<AddressList> fallback_addresses_; base::TimeTicks fallback_connect_start_time_; - base::OneShotTimer<TransportConnectJob> fallback_timer_; + base::OneShotTimer fallback_timer_; // Track the interval between this connect and previous connect. ConnectInterval interval_between_connects_; diff --git a/net/socket/websocket_transport_client_socket_pool.h b/net/socket/websocket_transport_client_socket_pool.h index 21fe8dd..4eed598 100644 --- a/net/socket/websocket_transport_client_socket_pool.h +++ b/net/socket/websocket_transport_client_socket_pool.h @@ -100,7 +100,7 @@ class NET_EXPORT_PRIVATE WebSocketTransportConnectJob : public ConnectJob { scoped_ptr<WebSocketTransportConnectSubJob> ipv4_job_; scoped_ptr<WebSocketTransportConnectSubJob> ipv6_job_; - base::OneShotTimer<WebSocketTransportConnectJob> fallback_timer_; + base::OneShotTimer fallback_timer_; TransportConnectJobHelper::ConnectionLatencyHistogram race_result_; ClientSocketHandle* const handle_; CompletionCallback callback_; diff --git a/net/url_request/url_fetcher_core.cc b/net/url_request/url_fetcher_core.cc index e07dcdf..1ecf9e5 100644 --- a/net/url_request/url_fetcher_core.cc +++ b/net/url_request/url_fetcher_core.cc @@ -602,8 +602,7 @@ void URLFetcherCore::StartURLRequest() { current_upload_bytes_ = -1; // TODO(kinaba): http://crbug.com/118103. Implement upload callback in the // layer and avoid using timer here. - upload_progress_checker_timer_.reset( - new base::RepeatingTimer<URLFetcherCore>()); + upload_progress_checker_timer_.reset(new base::RepeatingTimer()); upload_progress_checker_timer_->Start( FROM_HERE, base::TimeDelta::FromMilliseconds(kUploadProgressTimerInterval), diff --git a/net/url_request/url_fetcher_core.h b/net/url_request/url_fetcher_core.h index 06f8451..0af6d14 100644 --- a/net/url_request/url_fetcher_core.h +++ b/net/url_request/url_fetcher_core.h @@ -326,8 +326,7 @@ class URLFetcherCore : public base::RefCountedThreadSafe<URLFetcherCore>, // Timer to poll the progress of uploading for POST and PUT requests. // When crbug.com/119629 is fixed, scoped_ptr is not necessary here. - scoped_ptr<base::RepeatingTimer<URLFetcherCore> > - upload_progress_checker_timer_; + scoped_ptr<base::RepeatingTimer> upload_progress_checker_timer_; // Number of bytes sent so far. int64 current_upload_bytes_; // Number of bytes received so far. diff --git a/net/websockets/websocket_channel.h b/net/websockets/websocket_channel.h index 4df6a62..bc58574 100644 --- a/net/websockets/websocket_channel.h +++ b/net/websockets/websocket_channel.h @@ -376,7 +376,7 @@ class NET_EXPORT WebSocketChannel { uint64 current_receive_quota_; // Timer for the closing handshake. - base::OneShotTimer<WebSocketChannel> close_timer_; + base::OneShotTimer close_timer_; // Timeout for the closing handshake. base::TimeDelta closing_handshake_timeout_; diff --git a/remoting/client/plugin/chromoting_instance.h b/remoting/client/plugin/chromoting_instance.h index 5f582d9..ee53c1c 100644 --- a/remoting/client/plugin/chromoting_instance.h +++ b/remoting/client/plugin/chromoting_instance.h @@ -287,7 +287,7 @@ class ChromotingInstance : public ClientUserInterface, base::WeakPtr<TokenFetcherProxy> token_fetcher_proxy_; - base::RepeatingTimer<ChromotingInstance> stats_update_timer_; + base::RepeatingTimer stats_update_timer_; base::TimeTicks connection_started_time; base::TimeTicks connection_authenticated_time_; diff --git a/remoting/host/audio_capturer_win.cc b/remoting/host/audio_capturer_win.cc index f5d7139..d9a8a14 100644 --- a/remoting/host/audio_capturer_win.cc +++ b/remoting/host/audio_capturer_win.cc @@ -58,7 +58,7 @@ bool AudioCapturerWin::Start(const PacketCapturedCallback& callback) { callback_ = callback; // Initialize the capture timer. - capture_timer_.reset(new base::RepeatingTimer<AudioCapturerWin>()); + capture_timer_.reset(new base::RepeatingTimer()); HRESULT hr = S_OK; diff --git a/remoting/host/audio_capturer_win.h b/remoting/host/audio_capturer_win.h index 49477fa..62fe99c 100644 --- a/remoting/host/audio_capturer_win.h +++ b/remoting/host/audio_capturer_win.h @@ -37,7 +37,7 @@ class AudioCapturerWin : public AudioCapturer { AudioPacket::SamplingRate sampling_rate_; - scoped_ptr<base::RepeatingTimer<AudioCapturerWin> > capture_timer_; + scoped_ptr<base::RepeatingTimer> capture_timer_; base::TimeDelta audio_device_period_; AudioSilenceDetector silence_detector_; diff --git a/remoting/host/cast_extension_session.h b/remoting/host/cast_extension_session.h index 48d97a4..3c0fe4b4 100644 --- a/remoting/host/cast_extension_session.h +++ b/remoting/host/cast_extension_session.h @@ -212,7 +212,7 @@ class CastExtensionSession : public HostExtensionSession, rtc::scoped_refptr<webrtc::StatsObserver> stats_observer_; // Used to repeatedly poll stats from the |peer_connection_|. - base::RepeatingTimer<CastExtensionSession> stats_polling_timer_; + base::RepeatingTimer stats_polling_timer_; // True if a PeerConnection offer from the client has been received. This // necessarily means that the host is not the caller in this attempted diff --git a/remoting/host/cast_video_capturer_adapter.cc b/remoting/host/cast_video_capturer_adapter.cc index 37d36fe..02caeff 100644 --- a/remoting/host/cast_video_capturer_adapter.cc +++ b/remoting/host/cast_video_capturer_adapter.cc @@ -95,7 +95,7 @@ cricket::CaptureState CastVideoCapturerAdapter::Start( // to estimate the creation time of the frame source, to set the elapsed_time // of future CapturedFrames in OnCaptureCompleted(). start_time_ = base::TimeTicks::Now(); - capture_timer_.reset(new base::RepeatingTimer<CastVideoCapturerAdapter>()); + capture_timer_.reset(new base::RepeatingTimer()); capture_timer_->Start(FROM_HERE, base::TimeDelta::FromMicroseconds( GetCaptureFormat()->interval / diff --git a/remoting/host/cast_video_capturer_adapter.h b/remoting/host/cast_video_capturer_adapter.h index 1a39a2e2b7..8a5db48 100644 --- a/remoting/host/cast_video_capturer_adapter.h +++ b/remoting/host/cast_video_capturer_adapter.h @@ -67,7 +67,7 @@ class CastVideoCapturerAdapter : public cricket::VideoCapturer, scoped_ptr<webrtc::DesktopCapturer> desktop_capturer_; // Used to schedule periodic screen captures. - scoped_ptr<base::RepeatingTimer<CastVideoCapturerAdapter> > capture_timer_; + scoped_ptr<base::RepeatingTimer> capture_timer_; // Used to set the elapsed_time attribute of captured frames. base::TimeTicks start_time_; diff --git a/remoting/host/chromeos/clipboard_aura.h b/remoting/host/chromeos/clipboard_aura.h index 1d03380..ed408e3 100644 --- a/remoting/host/chromeos/clipboard_aura.h +++ b/remoting/host/chromeos/clipboard_aura.h @@ -43,7 +43,7 @@ class ClipboardAura : public Clipboard { base::ThreadChecker thread_checker_; scoped_ptr<protocol::ClipboardStub> client_clipboard_; - base::RepeatingTimer<ClipboardAura> clipboard_polling_timer_; + base::RepeatingTimer clipboard_polling_timer_; uint64 current_change_count_; base::TimeDelta polling_interval_; diff --git a/remoting/host/client_session.h b/remoting/host/client_session.h index 1994144..7d34439 100644 --- a/remoting/host/client_session.h +++ b/remoting/host/client_session.h @@ -196,7 +196,7 @@ class ClientSession // A timer that triggers a disconnect when the maximum session duration // is reached. - base::OneShotTimer<ClientSession> max_duration_timer_; + base::OneShotTimer max_duration_timer_; scoped_refptr<base::SingleThreadTaskRunner> audio_task_runner_; scoped_refptr<base::SingleThreadTaskRunner> input_task_runner_; diff --git a/remoting/host/clipboard_mac.mm b/remoting/host/clipboard_mac.mm index 59c684b..215793f 100644 --- a/remoting/host/clipboard_mac.mm +++ b/remoting/host/clipboard_mac.mm @@ -37,7 +37,7 @@ class ClipboardMac : public Clipboard { void CheckClipboardForChanges(); scoped_ptr<protocol::ClipboardStub> client_clipboard_; - scoped_ptr<base::RepeatingTimer<ClipboardMac> > clipboard_polling_timer_; + scoped_ptr<base::RepeatingTimer> clipboard_polling_timer_; NSInteger current_change_count_; DISALLOW_COPY_AND_ASSIGN(ClipboardMac); @@ -56,7 +56,7 @@ void ClipboardMac::Start(scoped_ptr<protocol::ClipboardStub> client_clipboard) { // OS X doesn't provide a clipboard-changed notification. The only way to // detect clipboard changes is by polling. - clipboard_polling_timer_.reset(new base::RepeatingTimer<ClipboardMac>()); + clipboard_polling_timer_.reset(new base::RepeatingTimer()); clipboard_polling_timer_->Start(FROM_HERE, base::TimeDelta::FromMilliseconds(kClipboardPollingIntervalMs), this, &ClipboardMac::CheckClipboardForChanges); diff --git a/remoting/host/config_file_watcher.cc b/remoting/host/config_file_watcher.cc index 0756085..85d38e0 100644 --- a/remoting/host/config_file_watcher.cc +++ b/remoting/host/config_file_watcher.cc @@ -68,7 +68,7 @@ class ConfigFileWatcherImpl std::string config_; base::FilePath config_path_; - scoped_ptr<base::DelayTimer<ConfigFileWatcherImpl> > config_updated_timer_; + scoped_ptr<base::DelayTimer> config_updated_timer_; // Number of times an attempt to read the configuration file failed. int retries_; @@ -134,9 +134,9 @@ void ConfigFileWatcherImpl::WatchOnIoThread() { // Create the timer that will be used for delayed-reading the configuration // file. - config_updated_timer_.reset(new base::DelayTimer<ConfigFileWatcherImpl>( - FROM_HERE, base::TimeDelta::FromSeconds(2), this, - &ConfigFileWatcherImpl::ReloadConfig)); + config_updated_timer_.reset( + new base::DelayTimer(FROM_HERE, base::TimeDelta::FromSeconds(2), this, + &ConfigFileWatcherImpl::ReloadConfig)); // Start watching the configuration file. config_watcher_.reset(new base::FilePathWatcher()); diff --git a/remoting/host/continue_window.h b/remoting/host/continue_window.h index aed2863..c025160 100644 --- a/remoting/host/continue_window.h +++ b/remoting/host/continue_window.h @@ -42,10 +42,10 @@ class ContinueWindow : public HostWindow { base::WeakPtr<ClientSessionControl> client_session_control_; // Used to disconnect the client session when timeout expires. - base::OneShotTimer<ContinueWindow> disconnect_timer_; + base::OneShotTimer disconnect_timer_; // Used to ask the local user whether the session should be continued. - base::OneShotTimer<ContinueWindow> session_expired_timer_; + base::OneShotTimer session_expired_timer_; DISALLOW_COPY_AND_ASSIGN(ContinueWindow); }; diff --git a/remoting/host/desktop_session_win.h b/remoting/host/desktop_session_win.h index 933be24..b6fcd84 100644 --- a/remoting/host/desktop_session_win.h +++ b/remoting/host/desktop_session_win.h @@ -123,7 +123,7 @@ class DesktopSessionWin // Used to report an error if the session attach notification does not arrives // for too long. - base::OneShotTimer<DesktopSessionWin> session_attach_timer_; + base::OneShotTimer session_attach_timer_; base::Time last_timestamp_; diff --git a/remoting/host/heartbeat_sender.h b/remoting/host/heartbeat_sender.h index 162a147..1541edd 100644 --- a/remoting/host/heartbeat_sender.h +++ b/remoting/host/heartbeat_sender.h @@ -158,8 +158,8 @@ class HeartbeatSender : public SignalStrategy::Listener { scoped_ptr<IqSender> iq_sender_; scoped_ptr<IqRequest> request_; int interval_ms_; - base::RepeatingTimer<HeartbeatSender> timer_; - base::OneShotTimer<HeartbeatSender> timer_resend_; + base::RepeatingTimer timer_; + base::OneShotTimer timer_resend_; int sequence_id_; bool sequence_id_was_set_; int sequence_id_recent_set_num_; @@ -169,7 +169,7 @@ class HeartbeatSender : public SignalStrategy::Listener { // Fields to send and indicate completion of sending host-offline-reason. std::string host_offline_reason_; base::Callback<void(bool success)> host_offline_reason_ack_callback_; - base::OneShotTimer<HeartbeatSender> host_offline_reason_timeout_timer_; + base::OneShotTimer host_offline_reason_timeout_timer_; base::ThreadChecker thread_checker_; diff --git a/remoting/host/linux/audio_pipe_reader.h b/remoting/host/linux/audio_pipe_reader.h index a5b9e4f..235b560 100644 --- a/remoting/host/linux/audio_pipe_reader.h +++ b/remoting/host/linux/audio_pipe_reader.h @@ -79,7 +79,7 @@ class AudioPipeReader base::FilePathWatcher file_watcher_; base::File pipe_; - base::RepeatingTimer<AudioPipeReader> timer_; + base::RepeatingTimer timer_; scoped_refptr<base::ObserverListThreadSafe<StreamObserver>> observers_; // Size of the pipe buffer. diff --git a/remoting/host/oauth_token_getter_impl.cc b/remoting/host/oauth_token_getter_impl.cc index 37b51af..12b8c70 100644 --- a/remoting/host/oauth_token_getter_impl.cc +++ b/remoting/host/oauth_token_getter_impl.cc @@ -33,7 +33,7 @@ OAuthTokenGetterImpl::OAuthTokenGetterImpl( new gaia::GaiaOAuthClient(url_request_context_getter.get())), url_request_context_getter_(url_request_context_getter) { if (auto_refresh) { - refresh_timer_.reset(new base::OneShotTimer<OAuthTokenGetterImpl>()); + refresh_timer_.reset(new base::OneShotTimer()); } } diff --git a/remoting/host/oauth_token_getter_impl.h b/remoting/host/oauth_token_getter_impl.h index f875ab7..e900745 100644 --- a/remoting/host/oauth_token_getter_impl.h +++ b/remoting/host/oauth_token_getter_impl.h @@ -61,7 +61,7 @@ class OAuthTokenGetterImpl : public OAuthTokenGetter, std::string oauth_access_token_; base::Time auth_token_expiry_time_; std::queue<OAuthTokenGetter::TokenCallback> pending_callbacks_; - scoped_ptr<base::OneShotTimer<OAuthTokenGetterImpl>> refresh_timer_; + scoped_ptr<base::OneShotTimer> refresh_timer_; }; } // namespace remoting diff --git a/remoting/host/resizing_host_observer.h b/remoting/host/resizing_host_observer.h index 723b416..933347a 100644 --- a/remoting/host/resizing_host_observer.h +++ b/remoting/host/resizing_host_observer.h @@ -44,7 +44,7 @@ class ResizingHostObserver : public ScreenControls { ScreenResolution original_resolution_; // State to manage rate-limiting of desktop resizes. - base::OneShotTimer<ResizingHostObserver> deferred_resize_timer_; + base::OneShotTimer deferred_resize_timer_; base::Time previous_resize_time_; base::Callback<base::Time(void)> now_function_; diff --git a/remoting/host/setup/me2me_native_messaging_host.h b/remoting/host/setup/me2me_native_messaging_host.h index c889258..02c730d 100644 --- a/remoting/host/setup/me2me_native_messaging_host.h +++ b/remoting/host/setup/me2me_native_messaging_host.h @@ -159,7 +159,7 @@ class Me2MeNativeMessagingHost scoped_ptr<ElevatedChannelEventHandler> elevated_channel_event_handler_; // Timer to control the lifetime of the elevated host. - base::OneShotTimer<Me2MeNativeMessagingHost> elevated_host_timer_; + base::OneShotTimer elevated_host_timer_; #endif // defined(OS_WIN) bool needs_elevation_; diff --git a/remoting/host/setup/win/auth_code_getter.h b/remoting/host/setup/win/auth_code_getter.h index 7493d7c..4373895 100644 --- a/remoting/host/setup/win/auth_code_getter.h +++ b/remoting/host/setup/win/auth_code_getter.h @@ -44,7 +44,7 @@ class AuthCodeGetter : public base::NonThreadSafe { // The browser through which the user requests an authorization code. base::win::ScopedComPtr<IWebBrowser2, &IID_IWebBrowser2> browser_; // A timer used to poll the browser's URL. - base::OneShotTimer<AuthCodeGetter> timer_; + base::OneShotTimer timer_; // The interval at which the timer fires. base::TimeDelta timer_interval_; diff --git a/remoting/host/signaling_connector.h b/remoting/host/signaling_connector.h index b8186b7..03868d5 100644 --- a/remoting/host/signaling_connector.h +++ b/remoting/host/signaling_connector.h @@ -69,7 +69,7 @@ class SignalingConnector // Number of times we tried to connect without success. int reconnect_attempts_; - base::OneShotTimer<SignalingConnector> timer_; + base::OneShotTimer timer_; DISALLOW_COPY_AND_ASSIGN(SignalingConnector); }; diff --git a/remoting/host/win/worker_process_launcher.h b/remoting/host/win/worker_process_launcher.h index f512a2b..96bef44 100644 --- a/remoting/host/win/worker_process_launcher.h +++ b/remoting/host/win/worker_process_launcher.h @@ -139,7 +139,7 @@ class WorkerProcessLauncher // The timer used to delay termination of the worker process when an IPC error // occured or when Crash() request is pending - base::OneShotTimer<WorkerProcessLauncher> kill_process_timer_; + base::OneShotTimer kill_process_timer_; // The default timeout for |kill_process_timer_|. base::TimeDelta kill_process_timeout_; @@ -148,7 +148,7 @@ class WorkerProcessLauncher net::BackoffEntry launch_backoff_; // Timer used to schedule the next attempt to launch the process. - base::OneShotTimer<WorkerProcessLauncher> launch_timer_; + base::OneShotTimer launch_timer_; // Monitors |worker_process_| to detect when the launched process // terminates. @@ -156,7 +156,7 @@ class WorkerProcessLauncher // Timer used to detect whether a launch attempt was successful or not, and to // cancel the launch attempt if it is taking too long. - base::OneShotTimer<WorkerProcessLauncher> launch_result_timer_; + base::OneShotTimer launch_result_timer_; // The handle of the worker process, if launched. base::win::ScopedHandle worker_process_; diff --git a/remoting/protocol/jingle_session.h b/remoting/protocol/jingle_session.h index 41b5e83..6867868 100644 --- a/remoting/protocol/jingle_session.h +++ b/remoting/protocol/jingle_session.h @@ -176,7 +176,7 @@ class JingleSession : public base::NonThreadSafe, scoped_ptr<QuicChannelFactory> quic_channel_factory_; scoped_ptr<JingleMessage> pending_transport_info_message_; - base::OneShotTimer<JingleSession> transport_info_timer_; + base::OneShotTimer transport_info_timer_; // Pending remote transport info received before the local channels were // created. diff --git a/remoting/protocol/libjingle_transport_factory.cc b/remoting/protocol/libjingle_transport_factory.cc index ec3a0f3..7dc8e74 100644 --- a/remoting/protocol/libjingle_transport_factory.cc +++ b/remoting/protocol/libjingle_transport_factory.cc @@ -110,7 +110,7 @@ class LibjingleTransport std::list<cricket::Candidate> pending_candidates_; scoped_ptr<cricket::P2PTransportChannel> channel_; int connect_attempts_left_; - base::RepeatingTimer<LibjingleTransport> reconnect_timer_; + base::RepeatingTimer reconnect_timer_; base::WeakPtrFactory<LibjingleTransport> weak_factory_; diff --git a/remoting/protocol/monitored_video_stub.h b/remoting/protocol/monitored_video_stub.h index 33a9b90..ea94010 100644 --- a/remoting/protocol/monitored_video_stub.h +++ b/remoting/protocol/monitored_video_stub.h @@ -51,7 +51,7 @@ class MonitoredVideoStub : public VideoStub { ChannelStateCallback callback_; base::ThreadChecker thread_checker_; bool is_connected_; - base::DelayTimer<MonitoredVideoStub> connectivity_check_timer_; + base::DelayTimer connectivity_check_timer_; DISALLOW_COPY_AND_ASSIGN(MonitoredVideoStub); }; diff --git a/remoting/protocol/monitored_video_stub_unittest.cc b/remoting/protocol/monitored_video_stub_unittest.cc index 6aad087..448785a 100644 --- a/remoting/protocol/monitored_video_stub_unittest.cc +++ b/remoting/protocol/monitored_video_stub_unittest.cc @@ -41,7 +41,7 @@ class MonitoredVideoStubTest : public testing::Test { scoped_ptr<MonitoredVideoStub> monitor_; scoped_ptr<VideoPacket> packet_; - base::OneShotTimer<MonitoredVideoStubTest> timer_end_test_; + base::OneShotTimer timer_end_test_; }; TEST_F(MonitoredVideoStubTest, OnChannelConnected) { diff --git a/remoting/protocol/performance_tracker.h b/remoting/protocol/performance_tracker.h index 37fdc0be..af9e4c7 100644 --- a/remoting/protocol/performance_tracker.h +++ b/remoting/protocol/performance_tracker.h @@ -102,7 +102,7 @@ class PerformanceTracker { bool is_paused_ = false; - base::RepeatingTimer<PerformanceTracker> upload_uma_stats_timer_; + base::RepeatingTimer upload_uma_stats_timer_; DISALLOW_COPY_AND_ASSIGN(PerformanceTracker); }; diff --git a/remoting/protocol/pseudotcp_adapter.cc b/remoting/protocol/pseudotcp_adapter.cc index 11f01fd..2ed9cb7 100644 --- a/remoting/protocol/pseudotcp_adapter.cc +++ b/remoting/protocol/pseudotcp_adapter.cc @@ -106,7 +106,7 @@ class PseudoTcpAdapter::Core : public cricket::IPseudoTcpNotify, bool socket_write_pending_; scoped_refptr<net::IOBuffer> socket_read_buffer_; - base::OneShotTimer<Core> timer_; + base::OneShotTimer timer_; DISALLOW_COPY_AND_ASSIGN(Core); }; diff --git a/storage/browser/quota/quota_database.h b/storage/browser/quota/quota_database.h index 6ca5651..7112666 100644 --- a/storage/browser/quota/quota_database.h +++ b/storage/browser/quota/quota_database.h @@ -174,7 +174,7 @@ class STORAGE_EXPORT_PRIVATE QuotaDatabase { bool is_recreating_; bool is_disabled_; - base::OneShotTimer<QuotaDatabase> timer_; + base::OneShotTimer timer_; friend class content::QuotaDatabaseTest; friend class QuotaManager; diff --git a/storage/browser/quota/quota_manager.h b/storage/browser/quota/quota_manager.h index 506aa0a..3e05388 100644 --- a/storage/browser/quota/quota_manager.h +++ b/storage/browser/quota/quota_manager.h @@ -452,7 +452,7 @@ class STORAGE_EXPORT QuotaManager scoped_refptr<SpecialStoragePolicy> special_storage_policy_; - base::RepeatingTimer<QuotaManager> histogram_timer_; + base::RepeatingTimer histogram_timer_; // Pointer to the function used to get the available disk space. This is // overwritten by QuotaManagerTest in order to attain a deterministic reported diff --git a/storage/browser/quota/quota_temporary_storage_evictor.h b/storage/browser/quota/quota_temporary_storage_evictor.h index a32b6c8..9b896e9 100644 --- a/storage/browser/quota/quota_temporary_storage_evictor.h +++ b/storage/browser/quota/quota_temporary_storage_evictor.h @@ -122,8 +122,8 @@ class STORAGE_EXPORT_PRIVATE QuotaTemporaryStorageEvictor int64 interval_ms_; bool repeated_eviction_; - base::OneShotTimer<QuotaTemporaryStorageEvictor> eviction_timer_; - base::RepeatingTimer<QuotaTemporaryStorageEvictor> histogram_timer_; + base::OneShotTimer eviction_timer_; + base::RepeatingTimer histogram_timer_; base::WeakPtrFactory<QuotaTemporaryStorageEvictor> weak_factory_; DISALLOW_COPY_AND_ASSIGN(QuotaTemporaryStorageEvictor); diff --git a/storage/browser/quota/storage_monitor.h b/storage/browser/quota/storage_monitor.h index 650c7b1..8c7960f 100644 --- a/storage/browser/quota/storage_monitor.h +++ b/storage/browser/quota/storage_monitor.h @@ -60,7 +60,7 @@ class STORAGE_EXPORT_PRIVATE StorageObserverList { void DispatchPendingEvent(); StorageObserverStateMap observers_; - base::OneShotTimer<StorageObserverList> notification_timer_; + base::OneShotTimer notification_timer_; StorageObserver::Event pending_event_; friend class content::StorageMonitorTestBase; diff --git a/sync/engine/sync_scheduler_impl.h b/sync/engine/sync_scheduler_impl.h index 0304da9..4e5fb17 100644 --- a/sync/engine/sync_scheduler_impl.h +++ b/sync/engine/sync_scheduler_impl.h @@ -255,7 +255,7 @@ class SYNC_EXPORT_PRIVATE SyncSchedulerImpl // Timer for polling. Restarted on each successful poll, and when entering // normal sync mode or exiting an error state. Not active in configuration // mode. - base::OneShotTimer<SyncSchedulerImpl> poll_timer_; + base::OneShotTimer poll_timer_; // The mode of operation. Mode mode_; @@ -266,10 +266,10 @@ class SYNC_EXPORT_PRIVATE SyncSchedulerImpl scoped_ptr<BackoffDelayProvider> delay_provider_; // The event that will wake us up. - base::OneShotTimer<SyncSchedulerImpl> pending_wakeup_timer_; + base::OneShotTimer pending_wakeup_timer_; // An event that fires when data type throttling expires. - base::OneShotTimer<SyncSchedulerImpl> type_unthrottle_timer_; + base::OneShotTimer type_unthrottle_timer_; // Storage for variables related to an in-progress configure request. Note // that (mode_ != CONFIGURATION_MODE) \implies !pending_configure_params_. @@ -315,7 +315,7 @@ class SYNC_EXPORT_PRIVATE SyncSchedulerImpl JobPriority next_sync_session_job_priority_; // One-shot timer for scheduling GU retry according to delay set by server. - base::OneShotTimer<SyncSchedulerImpl> retry_timer_; + base::OneShotTimer retry_timer_; base::WeakPtrFactory<SyncSchedulerImpl> weak_ptr_factory_; diff --git a/ui/accelerated_widget_mac/io_surface_layer.h b/ui/accelerated_widget_mac/io_surface_layer.h index ba48ff9..6e25979 100644 --- a/ui/accelerated_widget_mac/io_surface_layer.h +++ b/ui/accelerated_widget_mac/io_surface_layer.h @@ -109,7 +109,7 @@ class IOSurfaceLayerHelper { // calls until they appear on the screen. This can lead to hangs if the // view is moved offscreen (among other things). Prevent hangs by always // acknowledging the frame after timeout of 1/6th of a second has passed. - base::DelayTimer<IOSurfaceLayerHelper> timer_; + base::DelayTimer timer_; }; } // namespace ui diff --git a/ui/app_list/search_controller.h b/ui/app_list/search_controller.h index f1e45d5..a639ea0 100644 --- a/ui/app_list/search_controller.h +++ b/ui/app_list/search_controller.h @@ -63,7 +63,7 @@ class APP_LIST_EXPORT SearchController { bool is_voice_query_; - base::OneShotTimer<SearchController> stop_timer_; + base::OneShotTimer stop_timer_; DISALLOW_COPY_AND_ASSIGN(SearchController); }; diff --git a/ui/app_list/views/app_list_item_view.h b/ui/app_list/views/app_list_item_view.h index c434371..0bab4c7 100644 --- a/ui/app_list/views/app_list_item_view.h +++ b/ui/app_list/views/app_list_item_view.h @@ -171,7 +171,7 @@ class APP_LIST_EXPORT AppListItemView : public views::CustomButton, base::string16 tooltip_text_; // A timer to defer showing drag UI when mouse is pressed. - base::OneShotTimer<AppListItemView> mouse_drag_timer_; + base::OneShotTimer mouse_drag_timer_; DISALLOW_COPY_AND_ASSIGN(AppListItemView); }; diff --git a/ui/app_list/views/app_list_main_view.h b/ui/app_list/views/app_list_main_view.h index 5e51775..567ab51 100644 --- a/ui/app_list/views/app_list_main_view.h +++ b/ui/app_list/views/app_list_main_view.h @@ -123,7 +123,7 @@ class APP_LIST_EXPORT AppListMainView : public views::View, // A timer that fires when maximum allowed time to wait for icon loading has // passed. - base::OneShotTimer<AppListMainView> icon_loading_wait_timer_; + base::OneShotTimer icon_loading_wait_timer_; ScopedVector<IconLoader> pending_icon_loaders_; diff --git a/ui/app_list/views/app_list_main_view_unittest.cc b/ui/app_list/views/app_list_main_view_unittest.cc index aaae0b90..5e77e9a 100644 --- a/ui/app_list/views/app_list_main_view_unittest.cc +++ b/ui/app_list/views/app_list_main_view_unittest.cc @@ -59,7 +59,7 @@ class GridViewVisibleWaiter { AppsGridView* grid_view_; scoped_ptr<base::RunLoop> run_loop_; - base::RepeatingTimer<GridViewVisibleWaiter> check_timer_; + base::RepeatingTimer check_timer_; DISALLOW_COPY_AND_ASSIGN(GridViewVisibleWaiter); }; diff --git a/ui/app_list/views/apps_grid_view.h b/ui/app_list/views/apps_grid_view.h index d8e2ede..8200c73 100644 --- a/ui/app_list/views/apps_grid_view.h +++ b/ui/app_list/views/apps_grid_view.h @@ -534,14 +534,14 @@ class APP_LIST_EXPORT AppsGridView : public views::View, DropAttempt drop_attempt_; // Timer for re-ordering the |drop_target_| and |drag_view_|. - base::OneShotTimer<AppsGridView> reorder_timer_; + base::OneShotTimer reorder_timer_; // Timer for dropping |drag_view_| into the folder containing // the |drop_target_|. - base::OneShotTimer<AppsGridView> folder_dropping_timer_; + base::OneShotTimer folder_dropping_timer_; // Timer for dragging a folder item out of folder container ink bubble. - base::OneShotTimer<AppsGridView> folder_item_reparent_timer_; + base::OneShotTimer folder_item_reparent_timer_; // An application target drag and drop host which accepts dnd operations. ApplicationDragAndDropHost* drag_and_drop_host_; @@ -554,7 +554,7 @@ class APP_LIST_EXPORT AppsGridView : public views::View, gfx::Point last_drag_point_; // Timer to auto flip page when dragging an item near the left/right edges. - base::OneShotTimer<AppsGridView> page_flip_timer_; + base::OneShotTimer page_flip_timer_; // Target page to switch to when |page_flip_timer_| fires. int page_flip_target_; diff --git a/ui/app_list/views/pulsing_block_view.h b/ui/app_list/views/pulsing_block_view.h index 160ee0cc..a6e6e96 100644 --- a/ui/app_list/views/pulsing_block_view.h +++ b/ui/app_list/views/pulsing_block_view.h @@ -30,7 +30,7 @@ class PulsingBlockView : public views::View { // views::View overrides: void OnPaint(gfx::Canvas* canvas) override; - base::OneShotTimer<PulsingBlockView> start_delay_timer_; + base::OneShotTimer start_delay_timer_; DISALLOW_COPY_AND_ASSIGN(PulsingBlockView); }; diff --git a/ui/base/x/selection_owner.h b/ui/base/x/selection_owner.h index 6e3ac7f..7bea5ad 100644 --- a/ui/base/x/selection_owner.h +++ b/ui/base/x/selection_owner.h @@ -125,7 +125,7 @@ class UI_BASE_EXPORT SelectionOwner { std::vector<IncrementalTransfer> incremental_transfers_; // Used to abort stale incremental data transfers. - base::RepeatingTimer<SelectionOwner> incremental_transfer_abort_timer_; + base::RepeatingTimer incremental_transfer_abort_timer_; X11AtomCache atom_cache_; diff --git a/ui/base/x/selection_requestor.h b/ui/base/x/selection_requestor.h index 5455ff7..2e39166 100644 --- a/ui/base/x/selection_requestor.h +++ b/ui/base/x/selection_requestor.h @@ -146,7 +146,7 @@ class UI_BASE_EXPORT SelectionRequestor { size_t current_request_index_; // Used to abort requests if the selection owner takes too long to respond. - base::RepeatingTimer<SelectionRequestor> abort_timer_; + base::RepeatingTimer abort_timer_; X11AtomCache atom_cache_; diff --git a/ui/chromeos/ime/infolist_window.h b/ui/chromeos/ime/infolist_window.h index 1051b96..f305790 100644 --- a/ui/chromeos/ime/infolist_window.h +++ b/ui/chromeos/ime/infolist_window.h @@ -56,7 +56,7 @@ class UI_CHROMEOS_EXPORT InfolistWindow : public views::BubbleDelegateView { // Information description font. gfx::FontList description_font_list_; - base::OneShotTimer<views::Widget> show_hide_timer_; + base::OneShotTimer show_hide_timer_; DISALLOW_COPY_AND_ASSIGN(InfolistWindow); }; diff --git a/ui/chromeos/ime/mode_indicator_view.h b/ui/chromeos/ime/mode_indicator_view.h index 4a2e962..d9c824b 100644 --- a/ui/chromeos/ime/mode_indicator_view.h +++ b/ui/chromeos/ime/mode_indicator_view.h @@ -45,7 +45,7 @@ class UI_CHROMEOS_EXPORT ModeIndicatorView : public views::BubbleDelegateView { private: gfx::Rect cursor_bounds_; views::Label* label_view_; - base::OneShotTimer<views::Widget> timer_; + base::OneShotTimer timer_; DISALLOW_COPY_AND_ASSIGN(ModeIndicatorView); }; diff --git a/ui/chromeos/touch_exploration_controller.h b/ui/chromeos/touch_exploration_controller.h index ea46fd5..d023ec9 100644 --- a/ui/chromeos/touch_exploration_controller.h +++ b/ui/chromeos/touch_exploration_controller.h @@ -436,13 +436,13 @@ class UI_CHROMEOS_EXPORT TouchExplorationController scoped_ptr<ui::TouchEvent> last_touch_exploration_; // A timer that fires after the double-tap delay. - base::OneShotTimer<TouchExplorationController> tap_timer_; + base::OneShotTimer tap_timer_; // A timer that fires to enter passthrough. - base::OneShotTimer<TouchExplorationController> passthrough_timer_; + base::OneShotTimer passthrough_timer_; // A timer to fire an indicating sound when sliding to change volume. - base::RepeatingTimer<TouchExplorationController> sound_timer_; + base::RepeatingTimer sound_timer_; // A default gesture detector config, so we can share the same // timeout and pixel slop constants. diff --git a/ui/display/chromeos/display_configurator.h b/ui/display/chromeos/display_configurator.h index eab3d90..5a2b2d4 100644 --- a/ui/display/chromeos/display_configurator.h +++ b/ui/display/chromeos/display_configurator.h @@ -403,7 +403,7 @@ class DISPLAY_EXPORT DisplayConfigurator : public NativeDisplayObserver { // The timer to delay configuring displays. This is used to aggregate multiple // display configuration events when they are reported in short time spans. // See comment for NativeDisplayEventDispatcherX11 for more details. - base::OneShotTimer<DisplayConfigurator> configure_timer_; + base::OneShotTimer configure_timer_; // Id for next display protection client. ContentProtectionClientId next_display_protection_client_id_; diff --git a/ui/events/gesture_detection/gesture_detector.cc b/ui/events/gesture_detection/gesture_detector.cc index 4180eb3..7ea0a3e 100644 --- a/ui/events/gesture_detection/gesture_detector.cc +++ b/ui/events/gesture_detection/gesture_detector.cc @@ -103,7 +103,7 @@ class GestureDetector::TimeoutGestureHandler { typedef void (GestureDetector::*ReceiverMethod)(); GestureDetector* const gesture_detector_; - base::OneShotTimer<GestureDetector> timeout_timers_[TIMEOUT_EVENT_COUNT]; + base::OneShotTimer timeout_timers_[TIMEOUT_EVENT_COUNT]; ReceiverMethod timeout_callbacks_[TIMEOUT_EVENT_COUNT]; base::TimeDelta timeout_delays_[TIMEOUT_EVENT_COUNT]; }; diff --git a/ui/events/ozone/evdev/libgestures_glue/gesture_timer_provider.cc b/ui/events/ozone/evdev/libgestures_glue/gesture_timer_provider.cc index 3452d69..655492e 100644 --- a/ui/events/ozone/evdev/libgestures_glue/gesture_timer_provider.cc +++ b/ui/events/ozone/evdev/libgestures_glue/gesture_timer_provider.cc @@ -41,7 +41,7 @@ struct GesturesTimer { GesturesTimerCallback callback_ = nullptr; void* callback_data_ = nullptr; - base::OneShotTimer<GesturesTimer> timer_; + base::OneShotTimer timer_; }; namespace ui { diff --git a/ui/gfx/animation/animation_container.h b/ui/gfx/animation/animation_container.h index bb59f8f..726fdda 100644 --- a/ui/gfx/animation/animation_container.h +++ b/ui/gfx/animation/animation_container.h @@ -79,7 +79,7 @@ class GFX_EXPORT AnimationContainer // Minimum interval the timers run at. base::TimeDelta min_timer_interval_; - base::RepeatingTimer<AnimationContainer> timer_; + base::RepeatingTimer timer_; AnimationContainerObserver* observer_; diff --git a/ui/gfx/screen_mac.mm b/ui/gfx/screen_mac.mm index 3039124..abd8549 100644 --- a/ui/gfx/screen_mac.mm +++ b/ui/gfx/screen_mac.mm @@ -192,7 +192,7 @@ class ScreenMac : public gfx::Screen { return; } - configure_timer_.reset(new base::OneShotTimer<ScreenMac>()); + configure_timer_.reset(new base::OneShotTimer()); configure_timer_->Start( FROM_HERE, base::TimeDelta::FromMilliseconds(kConfigureDelayMs), @@ -262,7 +262,7 @@ class ScreenMac : public gfx::Screen { // The timer to delay configuring outputs. See also the comments in // HandleDisplayReconfiguration(). - scoped_ptr<base::OneShotTimer<ScreenMac> > configure_timer_; + scoped_ptr<base::OneShotTimer> configure_timer_; gfx::DisplayChangeNotifier change_notifier_; diff --git a/ui/message_center/message_center_impl.cc b/ui/message_center/message_center_impl.cc index e34ef36..1020569 100644 --- a/ui/message_center/message_center_impl.cc +++ b/ui/message_center/message_center_impl.cc @@ -817,7 +817,7 @@ void MessageCenterImpl::EnterQuietModeWithExpire( FOR_EACH_OBSERVER( MessageCenterObserver, observer_list_, OnQuietModeChanged(true)); - quiet_mode_timer_.reset(new base::OneShotTimer<MessageCenterImpl>); + quiet_mode_timer_.reset(new base::OneShotTimer); quiet_mode_timer_->Start( FROM_HERE, expires_in, diff --git a/ui/message_center/message_center_impl.h b/ui/message_center/message_center_impl.h index a9cc6b9..c9c531f 100644 --- a/ui/message_center/message_center_impl.h +++ b/ui/message_center/message_center_impl.h @@ -119,7 +119,7 @@ class MessageCenterImpl : public MessageCenter, NotificationCache notification_cache_; base::ObserverList<MessageCenterObserver> observer_list_; scoped_ptr<PopupTimersController> popup_timers_controller_; - scoped_ptr<base::OneShotTimer<MessageCenterImpl> > quiet_mode_timer_; + scoped_ptr<base::OneShotTimer> quiet_mode_timer_; NotifierSettingsProvider* settings_provider_; std::vector<NotificationBlocker*> blockers_; diff --git a/ui/message_center/popup_timer.cc b/ui/message_center/popup_timer.cc index e04252b..aa45d06 100644 --- a/ui/message_center/popup_timer.cc +++ b/ui/message_center/popup_timer.cc @@ -35,7 +35,7 @@ PopupTimer::PopupTimer(const std::string& id, : id_(id), timeout_(timeout), timer_controller_(controller), - timer_(new base::OneShotTimer<PopupTimersController>) {} + timer_(new base::OneShotTimer) {} PopupTimer::~PopupTimer() { if (!timer_) diff --git a/ui/message_center/popup_timer.h b/ui/message_center/popup_timer.h index 8a9e64b..f730732 100644 --- a/ui/message_center/popup_timer.h +++ b/ui/message_center/popup_timer.h @@ -65,7 +65,7 @@ class PopupTimer { base::WeakPtr<PopupTimersController> timer_controller_; // The actual timer. - scoped_ptr<base::OneShotTimer<PopupTimersController>> timer_; + scoped_ptr<base::OneShotTimer> timer_; DISALLOW_COPY_AND_ASSIGN(PopupTimer); }; diff --git a/ui/message_center/views/message_popup_collection.cc b/ui/message_center/views/message_popup_collection.cc index a413060..fbf869d 100644 --- a/ui/message_center/views/message_popup_collection.cc +++ b/ui/message_center/views/message_popup_collection.cc @@ -62,7 +62,7 @@ MessagePopupCollection::MessagePopupCollection( context_menu_controller_(new MessageViewContextMenuController(this)), weak_factory_(this) { DCHECK(message_center_); - defer_timer_.reset(new base::OneShotTimer<MessagePopupCollection>); + defer_timer_.reset(new base::OneShotTimer); message_center_->AddObserver(this); alignment_delegate_->set_collection(this); } diff --git a/ui/message_center/views/message_popup_collection.h b/ui/message_center/views/message_popup_collection.h index a8acf67..216e8a3 100644 --- a/ui/message_center/views/message_popup_collection.h +++ b/ui/message_center/views/message_popup_collection.h @@ -165,7 +165,7 @@ class MESSAGE_CENTER_EXPORT MessagePopupCollection // happens to be right under the mouse, and the user can just dispose of // multipel toasts by clicking. The mode ends when defer_timer_ expires. bool user_is_closing_toasts_by_clicking_; - scoped_ptr<base::OneShotTimer<MessagePopupCollection> > defer_timer_; + scoped_ptr<base::OneShotTimer> defer_timer_; // The top edge to align the position of the next toast during 'close by // clicking" mode. // Only to be used when user_is_closing_toasts_by_clicking_ is true. diff --git a/ui/ozone/demo/software_renderer.h b/ui/ozone/demo/software_renderer.h index dcb4645..6fbbcbec 100644 --- a/ui/ozone/demo/software_renderer.h +++ b/ui/ozone/demo/software_renderer.h @@ -38,7 +38,7 @@ class SoftwareRenderer : public RendererBase { scoped_ptr<gfx::VSyncProvider> vsync_provider_; // Timer for animation. - base::RepeatingTimer<SoftwareRenderer> timer_; + base::RepeatingTimer timer_; base::TimeDelta vsync_period_; diff --git a/ui/ozone/platform/drm/gpu/drm_window.h b/ui/ozone/platform/drm/gpu/drm_window.h index ad92ecc..23c5932 100644 --- a/ui/ozone/platform/drm/gpu/drm_window.h +++ b/ui/ozone/platform/drm/gpu/drm_window.h @@ -122,7 +122,7 @@ class OZONE_EXPORT DrmWindow { // the window isn't over an active display. HardwareDisplayController* controller_ = nullptr; - base::RepeatingTimer<DrmWindow> cursor_timer_; + base::RepeatingTimer cursor_timer_; scoped_refptr<DrmBuffer> cursor_buffers_[2]; int cursor_frontbuffer_ = 0; diff --git a/ui/views/controls/menu/menu_controller.cc b/ui/views/controls/menu/menu_controller.cc index 53fa52c..9b70948 100644 --- a/ui/views/controls/menu/menu_controller.cc +++ b/ui/views/controls/menu/menu_controller.cc @@ -223,7 +223,7 @@ class MenuController::MenuScrollTask { bool is_scrolling_up_; // Timer to periodically scroll. - base::RepeatingTimer<MenuScrollTask> scrolling_timer_; + base::RepeatingTimer scrolling_timer_; // Time we started scrolling at. base::Time start_scroll_time_; diff --git a/ui/views/controls/menu/menu_controller.h b/ui/views/controls/menu/menu_controller.h index b1db03d..db6b426 100644 --- a/ui/views/controls/menu/menu_controller.h +++ b/ui/views/controls/menu/menu_controller.h @@ -567,13 +567,13 @@ class VIEWS_EXPORT MenuController : public WidgetObserver { // As the mouse moves around submenus are not opened immediately. Instead // they open after this timer fires. - base::OneShotTimer<MenuController> show_timer_; + base::OneShotTimer show_timer_; // Used to invoke CancelAll(). This is used during drag and drop to hide the // menu after the mouse moves out of the of the menu. This is necessitated by // the lack of an ability to detect when the drag has completed from the drop // side. - base::OneShotTimer<MenuController> cancel_all_timer_; + base::OneShotTimer cancel_all_timer_; // Drop target. MenuItemView* drop_target_; diff --git a/ui/views/controls/textfield/textfield.h b/ui/views/controls/textfield/textfield.h index 593954b..524ba3b 100644 --- a/ui/views/controls/textfield/textfield.h +++ b/ui/views/controls/textfield/textfield.h @@ -437,7 +437,7 @@ class VIEWS_EXPORT Textfield : public View, // The duration and timer to reveal the last typed password character. base::TimeDelta password_reveal_duration_; - base::OneShotTimer<Textfield> password_reveal_timer_; + base::OneShotTimer password_reveal_timer_; // Tracks whether a user action is being performed; i.e. OnBeforeUserAction() // has been called, but OnAfterUserAction() has not yet been called. @@ -447,7 +447,7 @@ class VIEWS_EXPORT Textfield : public View, bool skip_input_method_cancel_composition_; // The text editing cursor repaint timer and visibility. - base::RepeatingTimer<Textfield> cursor_repaint_timer_; + base::RepeatingTimer cursor_repaint_timer_; bool cursor_visible_; // The drop cursor is a visual cue for where dragged text will be dropped. @@ -458,7 +458,7 @@ class VIEWS_EXPORT Textfield : public View, bool initiating_drag_; // A timer and point used to modify the selection when dragging. - base::RepeatingTimer<Textfield> drag_selection_timer_; + base::RepeatingTimer drag_selection_timer_; gfx::Point last_drag_location_; // State variables used to track double and triple clicks. diff --git a/ui/views/controls/throbber.cc b/ui/views/controls/throbber.cc index 635ff88..5970290 100644 --- a/ui/views/controls/throbber.cc +++ b/ui/views/controls/throbber.cc @@ -4,6 +4,8 @@ #include "ui/views/controls/throbber.h" +#include "base/bind.h" +#include "base/location.h" #include "ui/base/resource/resource_bundle.h" #include "ui/gfx/animation/tween.h" #include "ui/gfx/canvas.h" @@ -39,8 +41,8 @@ void Throbber::Start() { start_time_ = base::TimeTicks::Now(); const int kFrameTimeMs = 30; - timer_.Start(FROM_HERE, base::TimeDelta::FromMilliseconds(kFrameTimeMs), this, - &Throbber::SchedulePaint); + timer_.Start(FROM_HERE, base::TimeDelta::FromMilliseconds(kFrameTimeMs), + base::Bind(&Throbber::SchedulePaint, base::Unretained(this))); SchedulePaint(); // paint right away } diff --git a/ui/views/controls/throbber.h b/ui/views/controls/throbber.h index 4328815..f88ee57 100644 --- a/ui/views/controls/throbber.h +++ b/ui/views/controls/throbber.h @@ -37,7 +37,7 @@ class VIEWS_EXPORT Throbber : public View { private: base::TimeTicks start_time_; // Time when Start was called. - base::RepeatingTimer<Throbber> timer_; // Used to schedule Run calls. + base::RepeatingTimer timer_; // Used to schedule Run calls. // Whether or not we should display a checkmark. bool checked_; @@ -75,8 +75,8 @@ class VIEWS_EXPORT SmoothedThrobber : public Throbber { // Delay after work stops before stopping, in milliseconds. int stop_delay_ms_; - base::OneShotTimer<SmoothedThrobber> start_timer_; - base::OneShotTimer<SmoothedThrobber> stop_timer_; + base::OneShotTimer start_timer_; + base::OneShotTimer stop_timer_; DISALLOW_COPY_AND_ASSIGN(SmoothedThrobber); }; diff --git a/ui/views/corewm/tooltip_controller.h b/ui/views/corewm/tooltip_controller.h index 2f8c7ef..2c93f7a 100644 --- a/ui/views/corewm/tooltip_controller.h +++ b/ui/views/corewm/tooltip_controller.h @@ -90,11 +90,11 @@ class VIEWS_EXPORT TooltipController : public aura::client::TooltipClient, scoped_ptr<Tooltip> tooltip_; - base::RepeatingTimer<TooltipController> tooltip_timer_; + base::RepeatingTimer tooltip_timer_; // Timer to timeout the life of an on-screen tooltip. We hide the tooltip when // this timer fires. - base::OneShotTimer<TooltipController> tooltip_shown_timer_; + base::OneShotTimer tooltip_shown_timer_; // Location of the last event in |tooltip_window_|'s coordinates. gfx::Point curr_mouse_loc_; diff --git a/ui/views/repeat_controller.h b/ui/views/repeat_controller.h index 3a93ea5..9eb412e 100644 --- a/ui/views/repeat_controller.h +++ b/ui/views/repeat_controller.h @@ -37,7 +37,7 @@ class RepeatController { void Run(); // The current timer. - base::OneShotTimer<RepeatController> timer_; + base::OneShotTimer timer_; base::Closure callback_; diff --git a/ui/views/touchui/touch_selection_controller_impl.h b/ui/views/touchui/touch_selection_controller_impl.h index deafbd6..d7ff087 100644 --- a/ui/views/touchui/touch_selection_controller_impl.h +++ b/ui/views/touchui/touch_selection_controller_impl.h @@ -130,7 +130,7 @@ class VIEWS_EXPORT TouchSelectionControllerImpl // Timer to trigger quick menu (Quick menu is not shown if the selection // handles are being updated. It appears only when the handles are stationary // for a certain amount of time). - base::OneShotTimer<TouchSelectionControllerImpl> quick_menu_timer_; + base::OneShotTimer quick_menu_timer_; // Pointer to the SelectionHandleView being dragged during a drag session. EditingHandleView* dragging_handle_; diff --git a/ui/views/widget/desktop_aura/desktop_drag_drop_client_aurax11.h b/ui/views/widget/desktop_aura/desktop_drag_drop_client_aurax11.h index 888791b..8b040ca 100644 --- a/ui/views/widget/desktop_aura/desktop_drag_drop_client_aurax11.h +++ b/ui/views/widget/desktop_aura/desktop_drag_drop_client_aurax11.h @@ -242,7 +242,7 @@ class VIEWS_EXPORT DesktopDragDropClientAuraX11 // Reprocesses the most recent mouse move event if the mouse has not moved // in a while in case the window stacking order has changed and // |source_current_window_| needs to be updated. - base::OneShotTimer<DesktopDragDropClientAuraX11> repeat_mouse_move_timer_; + base::OneShotTimer repeat_mouse_move_timer_; // When the mouse is released, we need to wait for the last XdndStatus message // only if we have previously received a status message from @@ -271,7 +271,7 @@ class VIEWS_EXPORT DesktopDragDropClientAuraX11 // Ends the move loop if the target is too slow to respond after the mouse is // released. - base::OneShotTimer<DesktopDragDropClientAuraX11> end_move_loop_timer_; + base::OneShotTimer end_move_loop_timer_; // Widget that the user drags around. May be NULL. scoped_ptr<Widget> drag_widget_; diff --git a/ui/views/widget/desktop_aura/desktop_screen_x11.cc b/ui/views/widget/desktop_aura/desktop_screen_x11.cc index b6e147e..4b4c315 100644 --- a/ui/views/widget/desktop_aura/desktop_screen_x11.cc +++ b/ui/views/widget/desktop_aura/desktop_screen_x11.cc @@ -238,7 +238,7 @@ uint32_t DesktopScreenX11::DispatchEvent(const ui::PlatformEvent& event) { if (configure_timer_.get() && configure_timer_->IsRunning()) { configure_timer_->Reset(); } else { - configure_timer_.reset(new base::OneShotTimer<DesktopScreenX11>()); + configure_timer_.reset(new base::OneShotTimer()); configure_timer_->Start( FROM_HERE, base::TimeDelta::FromMilliseconds(kConfigureDelayMs), diff --git a/ui/views/widget/desktop_aura/desktop_screen_x11.h b/ui/views/widget/desktop_aura/desktop_screen_x11.h index 0f91497..4466ba4 100644 --- a/ui/views/widget/desktop_aura/desktop_screen_x11.h +++ b/ui/views/widget/desktop_aura/desktop_screen_x11.h @@ -75,7 +75,7 @@ class VIEWS_EXPORT DesktopScreenX11 : public gfx::Screen, // The timer to delay configuring outputs. See also the comments in // Dispatch(). - scoped_ptr<base::OneShotTimer<DesktopScreenX11> > configure_timer_; + scoped_ptr<base::OneShotTimer> configure_timer_; gfx::DisplayChangeNotifier change_notifier_; |