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

Side by Side Diff: components/component_updater/timer.h

Issue 2837863004: Use base::OneShotTimer instead of base::Timer(false, false)
Patch Set: rebase Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « base/timer/timer_unittest.cc ('k') | components/component_updater/timer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef COMPONENTS_COMPONENT_UPDATER_TIMER_H_ 5 #ifndef COMPONENTS_COMPONENT_UPDATER_TIMER_H_
6 #define COMPONENTS_COMPONENT_UPDATER_TIMER_H_ 6 #define COMPONENTS_COMPONENT_UPDATER_TIMER_H_
7 7
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/threading/thread_checker.h" 10 #include "base/threading/thread_checker.h"
(...skipping 11 matching lines...) Expand all
22 base::TimeDelta delay, 22 base::TimeDelta delay,
23 const base::Closure& user_task); 23 const base::Closure& user_task);
24 24
25 void Stop(); 25 void Stop();
26 26
27 private: 27 private:
28 void OnDelay(); 28 void OnDelay();
29 29
30 base::ThreadChecker thread_checker_; 30 base::ThreadChecker thread_checker_;
31 31
32 base::Timer timer_; 32 base::OneShotTimer timer_;
33 33
34 base::TimeDelta delay_; 34 base::TimeDelta delay_;
35 base::Closure user_task_; 35 base::Closure user_task_;
36 36
37 DISALLOW_COPY_AND_ASSIGN(Timer); 37 DISALLOW_COPY_AND_ASSIGN(Timer);
38 }; 38 };
39 39
40 } // namespace component_updater 40 } // namespace component_updater
41 41
42 #endif // COMPONENTS_COMPONENT_UPDATER_TIMER_H_ 42 #endif // COMPONENTS_COMPONENT_UPDATER_TIMER_H_
OLDNEW
« no previous file with comments | « base/timer/timer_unittest.cc ('k') | components/component_updater/timer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698