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

Unified Diff: base/synchronization/condition_variable.h

Issue 1860353002: Remove XP Condition Variable Affordances (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Change declaration order Created 4 years, 8 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 | « no previous file | base/synchronization/condition_variable_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/synchronization/condition_variable.h
diff --git a/base/synchronization/condition_variable.h b/base/synchronization/condition_variable.h
index a41b2ba5a7815e692ae44bc5a704925793b28c27..7dda21ffce848e9af49b4c31b6303d08bfbf56fd 100644
--- a/base/synchronization/condition_variable.h
+++ b/base/synchronization/condition_variable.h
@@ -75,9 +75,12 @@
#include <pthread.h>
#endif
+#if defined(OS_WIN)
+#include <windows.h>
+#endif
+
namespace base {
-class ConditionVarImpl;
class TimeDelta;
class BASE_EXPORT ConditionVariable {
@@ -100,14 +103,15 @@ class BASE_EXPORT ConditionVariable {
private:
#if defined(OS_WIN)
- ConditionVarImpl* impl_;
+ CONDITION_VARIABLE cv_;
+ CRITICAL_SECTION* const crit_sec_;
#elif defined(OS_POSIX)
pthread_cond_t condition_;
pthread_mutex_t* user_mutex_;
-#if DCHECK_IS_ON()
- base::Lock* user_lock_; // Needed to adjust shadow lock state on wait.
#endif
+#if DCHECK_IS_ON() && (defined(OS_WIN) || defined(OS_POSIX))
+ base::Lock* const user_lock_; // Needed to adjust shadow lock state on wait.
#endif
DISALLOW_COPY_AND_ASSIGN(ConditionVariable);
« no previous file with comments | « no previous file | base/synchronization/condition_variable_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698