diff options
author | agl@chromium.org <agl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-26 23:17:56 +0000 |
---|---|---|
committer | agl@chromium.org <agl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-26 23:17:56 +0000 |
commit | 02bf7f27abb24a349f178d2faa2bdee635913f28 (patch) | |
tree | e34cc0a3035f9652e5d718bb47de323cc1ea5ba6 /base/timer.h | |
parent | d36540e90a608afc57b600d0981b906d6c94ab8f (diff) | |
download | chromium_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.h | 3 |
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: |