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

Unified Diff: base/synchronization/lock.h

Issue 13265003: cc: Switch ContentLayerUpdater to use RenderingStatsInstrumentation (Closed) Base URL: http://git.chromium.org/chromium/src.git@update
Patch Set: Added printfs Created 7 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 | « no previous file | base/synchronization/lock.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_;
« no previous file with comments | « no previous file | base/synchronization/lock.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698