summaryrefslogtreecommitdiffstats
path: root/base/timer.h
diff options
context:
space:
mode:
authoragl@chromium.org <agl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-26 23:17:56 +0000
committeragl@chromium.org <agl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-26 23:17:56 +0000
commit02bf7f27abb24a349f178d2faa2bdee635913f28 (patch)
treee34cc0a3035f9652e5d718bb47de323cc1ea5ba6 /base/timer.h
parentd36540e90a608afc57b600d0981b906d6c94ab8f (diff)
downloadchromium_src-02bf7f27abb24a349f178d2faa2bdee635913f28.zip
chromium_src-02bf7f27abb24a349f178d2faa2bdee635913f28.tar.gz
chromium_src-02bf7f27abb24a349f178d2faa2bdee635913f28.tar.bz2
Add a test to DelayTimer ensure that the callback is never
made once the DelayTimer has been destroyed. Review URL: http://codereview.chromium.org/27234 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10520 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/timer.h')
-rw-r--r--base/timer.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/base/timer.h b/base/timer.h
index eb00486..706551f 100644
--- a/base/timer.h
+++ b/base/timer.h
@@ -206,6 +206,9 @@ class RepeatingTimer : public BaseTimer<Receiver, true> {};
// Once created, it is inactive until Reset is called. Once |delay| seconds have
// passed since the last call to Reset, the callback is made. Once the callback
// has been made, it's inactive until Reset is called again.
+//
+// If destroyed, the timeout is canceled and will not occur even if already
+// inflight.
template <class Receiver>
class DelayTimer {
public: