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

Unified Diff: cc/base/completion_event.h

Issue 1377063003: Split ThreadProxy methods to ProxyMain and ProxyImpl. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Keep ProxyMain and ProxyImpl methods private. Created 5 years, 2 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 | « cc/BUILD.gn ('k') | cc/cc.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/base/completion_event.h
diff --git a/cc/base/completion_event.h b/cc/base/completion_event.h
index 6bae765dd20e2173065bccab670afd2618547a95..36e8954c99565f35b70847b1cc3b85cdbc1b8667 100644
--- a/cc/base/completion_event.h
+++ b/cc/base/completion_event.h
@@ -8,6 +8,7 @@
#include "base/logging.h"
#include "base/synchronization/waitable_event.h"
#include "base/threading/thread_restrictions.h"
+#include "base/time/time.h"
namespace cc {
@@ -41,6 +42,16 @@ class CompletionEvent {
event_.Wait();
}
+ void TimedWait(const base::TimeDelta& max_time) {
+#if DCHECK_IS_ON()
+ DCHECK(!waited_);
+ waited_ = true;
+#endif
+ event_.TimedWait(max_time);
+ }
+
+ bool IsSignaled() { return event_.IsSignaled(); }
+
void Signal() {
#if DCHECK_IS_ON()
DCHECK(!signaled_);
« no previous file with comments | « cc/BUILD.gn ('k') | cc/cc.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698