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

Unified Diff: extensions/common/one_shot_event.h

Issue 204983020: Remove ExtensionService Garbage-Collecting methods. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove lazy global empty delta Created 6 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/common/extensions/extension_file_util_unittest.cc ('k') | extensions/common/one_shot_event.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/common/one_shot_event.h
diff --git a/extensions/common/one_shot_event.h b/extensions/common/one_shot_event.h
index 9baa152d2c5ce96924978c451efb4efd8bdb557e..49031243ab9f2b712c05154618cc51b15b75e8bd 100644
--- a/extensions/common/one_shot_event.h
+++ b/extensions/common/one_shot_event.h
@@ -15,6 +15,7 @@
namespace base {
class TaskRunner;
+class TimeDelta;
}
namespace tracked_objects {
@@ -55,8 +56,10 @@ class OneShotEvent {
void Signal();
// Scheduled |task| to be called on |runner| after is_signaled()
- // becomes true. Inside |task|, if this OneShotEvent is still
- // alive, CHECK(is_signaled()) will never fail (which implies that
+ // becomes true. If called with |delay|, then the task will happen
+ // (roughly) |delay| after is_signaled(), *not* |delay| after the
+ // post. Inside |task|, if this OneShotEvent is still alive,
+ // CHECK(is_signaled()) will never fail (which implies that
// OneShotEvent::Reset() doesn't exist).
//
// If |*this| is destroyed before being released, none of these
@@ -78,10 +81,18 @@ class OneShotEvent {
void Post(const tracked_objects::Location& from_here,
const base::Closure& task,
const scoped_refptr<base::TaskRunner>& runner) const;
+ void PostDelayed(const tracked_objects::Location& from_here,
+ const base::Closure& task,
+ const base::TimeDelta& delay) const;
private:
struct TaskInfo;
+ void PostImpl(const tracked_objects::Location& from_here,
+ const base::Closure& task,
+ const scoped_refptr<base::TaskRunner>& runner,
+ const base::TimeDelta& delay) const;
+
base::ThreadChecker thread_checker_;
bool signaled_;
« no previous file with comments | « chrome/common/extensions/extension_file_util_unittest.cc ('k') | extensions/common/one_shot_event.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698