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

Side by Side Diff: base/timer.h

Issue 7879006: Delete Tracked, and move Location to its own file. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 9 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « base/threading/worker_pool_unittest.cc ('k') | base/tracked.h » ('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 (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 // OneShotTimer and RepeatingTimer provide a simple timer API. As the names 5 // OneShotTimer and RepeatingTimer provide a simple timer API. As the names
6 // suggest, OneShotTimer calls you back once after a time delay expires. 6 // suggest, OneShotTimer calls you back once after a time delay expires.
7 // RepeatingTimer on the other hand calls you back periodically with the 7 // RepeatingTimer on the other hand calls you back periodically with the
8 // prescribed time interval. 8 // prescribed time interval.
9 // 9 //
10 // OneShotTimer and RepeatingTimer both cancel the timer when they go out of 10 // OneShotTimer and RepeatingTimer both cancel the timer when they go out of
(...skipping 30 matching lines...) Expand all
41 #ifndef BASE_TIMER_H_ 41 #ifndef BASE_TIMER_H_
42 #define BASE_TIMER_H_ 42 #define BASE_TIMER_H_
43 #pragma once 43 #pragma once
44 44
45 // IMPORTANT: If you change timer code, make sure that all tests (including 45 // IMPORTANT: If you change timer code, make sure that all tests (including
46 // disabled ones) from timer_unittests.cc pass locally. Some are disabled 46 // disabled ones) from timer_unittests.cc pass locally. Some are disabled
47 // because they're flaky on the buildbot, but when you run them locally you 47 // because they're flaky on the buildbot, but when you run them locally you
48 // should be able to tell the difference. 48 // should be able to tell the difference.
49 49
50 #include "base/base_export.h" 50 #include "base/base_export.h"
51 #include "base/location.h"
51 #include "base/logging.h" 52 #include "base/logging.h"
52 #include "base/task.h" 53 #include "base/task.h"
53 #include "base/time.h" 54 #include "base/time.h"
54 55
55 class MessageLoop; 56 class MessageLoop;
56 57
57 namespace base { 58 namespace base {
58 59
59 //----------------------------------------------------------------------------- 60 //-----------------------------------------------------------------------------
60 // This class is an implementation detail of OneShotTimer and RepeatingTimer. 61 // This class is an implementation detail of OneShotTimer and RepeatingTimer.
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
279 const ReceiverMethod method_; 280 const ReceiverMethod method_;
280 const TimeDelta delay_; 281 const TimeDelta delay_;
281 282
282 OneShotTimer<DelayTimer<Receiver> > timer_; 283 OneShotTimer<DelayTimer<Receiver> > timer_;
283 TimeTicks trigger_time_; 284 TimeTicks trigger_time_;
284 }; 285 };
285 286
286 } // namespace base 287 } // namespace base
287 288
288 #endif // BASE_TIMER_H_ 289 #endif // BASE_TIMER_H_
OLDNEW
« no previous file with comments | « base/threading/worker_pool_unittest.cc ('k') | base/tracked.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698