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

Side by Side Diff: chrome/browser/safe_browsing/incident_reporting/delayed_callback_runner.h

Issue 1355063004: Template methods on Timer classes instead of the classes themselves. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: timer: fixcaller Created 5 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 CHROME_BROWSER_SAFE_BROWSING_INCIDENT_REPORTING_DELAYED_CALLBACK_RUNNER_ H_ 5 #ifndef CHROME_BROWSER_SAFE_BROWSING_INCIDENT_REPORTING_DELAYED_CALLBACK_RUNNER_ H_
6 #define CHROME_BROWSER_SAFE_BROWSING_INCIDENT_REPORTING_DELAYED_CALLBACK_RUNNER_ H_ 6 #define CHROME_BROWSER_SAFE_BROWSING_INCIDENT_REPORTING_DELAYED_CALLBACK_RUNNER_ H_
7 7
8 #include <list> 8 #include <list>
9 9
10 #include "base/callback_forward.h" 10 #include "base/callback_forward.h"
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 // The runner on which callbacks are to be run. 49 // The runner on which callbacks are to be run.
50 scoped_refptr<base::TaskRunner> task_runner_; 50 scoped_refptr<base::TaskRunner> task_runner_;
51 51
52 // The list of callbacks to run. Callbacks are removed when run. 52 // The list of callbacks to run. Callbacks are removed when run.
53 CallbackList callbacks_; 53 CallbackList callbacks_;
54 54
55 // callbacks_.end() when no work is being done. Any other value otherwise. 55 // callbacks_.end() when no work is being done. Any other value otherwise.
56 CallbackList::iterator next_callback_; 56 CallbackList::iterator next_callback_;
57 57
58 // A timer upon the firing of which the next callback will be run. 58 // A timer upon the firing of which the next callback will be run.
59 base::DelayTimer<DelayedCallbackRunner> timer_; 59 base::DelayTimer timer_;
60 60
61 DISALLOW_COPY_AND_ASSIGN(DelayedCallbackRunner); 61 DISALLOW_COPY_AND_ASSIGN(DelayedCallbackRunner);
62 }; 62 };
63 63
64 } // namespace safe_browsing 64 } // namespace safe_browsing
65 65
66 #endif // CHROME_BROWSER_SAFE_BROWSING_INCIDENT_REPORTING_DELAYED_CALLBACK_RUNN ER_H_ 66 #endif // CHROME_BROWSER_SAFE_BROWSING_INCIDENT_REPORTING_DELAYED_CALLBACK_RUNN ER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698