Index: base/synchronization/lock.h |
diff --git a/base/synchronization/lock.h b/base/synchronization/lock.h |
index 15de446d1d494c5ef5b2e3954c0fbbaf4e08fd51..e8201a5da5e22b98da9f94683c96733dd1af8674 100644 |
--- a/base/synchronization/lock.h |
+++ b/base/synchronization/lock.h |
@@ -16,21 +16,6 @@ namespace base { |
// AssertAcquired() method. |
class BASE_EXPORT Lock { |
public: |
-#if defined(NDEBUG) // Optimized wrapper implementation |
- Lock() : lock_() {} |
- ~Lock() {} |
- void Acquire() { lock_.Lock(); } |
- void Release() { lock_.Unlock(); } |
- |
- // If the lock is not held, take it and return true. If the lock is already |
- // held by another thread, immediately return false. This must not be called |
- // by a thread already holding the lock (what happens is undefined and an |
- // assertion may fail). |
- bool Try() { return lock_.Try(); } |
- |
- // Null implementation if not debug. |
- void AssertAcquired() const {} |
-#else |
Lock(); |
~Lock() {} |
@@ -55,7 +40,6 @@ class BASE_EXPORT Lock { |
} |
void AssertAcquired() const; |
-#endif // NDEBUG |
#if defined(OS_POSIX) |
// The posix implementation of ConditionVariable needs to be able |
@@ -69,7 +53,6 @@ class BASE_EXPORT Lock { |
#endif |
private: |
-#if !defined(NDEBUG) |
// Members and routines taking care of locks assertions. |
// Note that this checks for recursive locks and allows them |
// if the variable is set. This is allowed by the underlying implementation |
@@ -85,7 +68,6 @@ class BASE_EXPORT Lock { |
// a null owning_thread_id_ value. |
bool owned_by_thread_; |
base::PlatformThreadId owning_thread_id_; |
-#endif // NDEBUG |
// Platform specific underlying lock implementation. |
internal::LockImpl lock_; |