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

Side by Side Diff: base/timer/timer.h

Issue 822713002: Update from https://crrev.com/309415 (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 6 years 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 241 matching lines...) Expand 10 before | Expand all | Expand 10 after
252 typedef void (Receiver::*ReceiverMethod)(); 252 typedef void (Receiver::*ReceiverMethod)();
253 253
254 DelayTimer(const tracked_objects::Location& posted_from, 254 DelayTimer(const tracked_objects::Location& posted_from,
255 TimeDelta delay, 255 TimeDelta delay,
256 Receiver* receiver, 256 Receiver* receiver,
257 ReceiverMethod method) 257 ReceiverMethod method)
258 : Timer(posted_from, delay, 258 : Timer(posted_from, delay,
259 base::Bind(method, base::Unretained(receiver)), 259 base::Bind(method, base::Unretained(receiver)),
260 false) {} 260 false) {}
261 261
262 void Reset() { Timer::Reset(); } 262 void Reset() override { Timer::Reset(); }
263 }; 263 };
264 264
265 } // namespace base 265 } // namespace base
266 266
267 #endif // BASE_TIMER_TIMER_H_ 267 #endif // BASE_TIMER_TIMER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698