diff options
Diffstat (limited to 'ceee/testing/utils')
-rw-r--r-- | ceee/testing/utils/instance_count_mixin.cc | 8 | ||||
-rw-r--r-- | ceee/testing/utils/instance_count_mixin.h | 8 |
2 files changed, 8 insertions, 8 deletions
diff --git a/ceee/testing/utils/instance_count_mixin.cc b/ceee/testing/utils/instance_count_mixin.cc index c6d8bdc..14a0ebb 100644 --- a/ceee/testing/utils/instance_count_mixin.cc +++ b/ceee/testing/utils/instance_count_mixin.cc @@ -17,13 +17,13 @@ namespace testing { Lock InstanceCountMixinBase::lock_; InstanceCountMixinBase::InstanceCountMixinBase() { - AutoLock lock(lock_); + base::AutoLock lock(lock_); instances.insert(this); } InstanceCountMixinBase::~InstanceCountMixinBase() { - AutoLock lock(lock_); + base::AutoLock lock(lock_); EXPECT_EQ(1, instances.erase(this)); } @@ -34,7 +34,7 @@ void InstanceCountMixinBase::GetDescription(std::string* description) const { } void InstanceCountMixinBase::LogLeakedInstances() { - AutoLock lock(lock_); + base::AutoLock lock(lock_); InstanceSet::const_iterator it(instances.begin()); InstanceSet::const_iterator end(instances.end()); @@ -49,7 +49,7 @@ void InstanceCountMixinBase::LogLeakedInstances() { typedef InstanceCountMixinBase::InstanceSet InstanceSet; size_t InstanceCountMixinBase::all_instance_count() { - AutoLock lock(lock_); + base::AutoLock lock(lock_); return instances.size(); } diff --git a/ceee/testing/utils/instance_count_mixin.h b/ceee/testing/utils/instance_count_mixin.h index 11627da..5686885 100644 --- a/ceee/testing/utils/instance_count_mixin.h +++ b/ceee/testing/utils/instance_count_mixin.h @@ -10,7 +10,7 @@ #include <string> #include <set> -#include "base/lock.h" +#include "base/synchronization/lock.h" namespace testing { @@ -47,7 +47,7 @@ class InstanceCountMixinBase { static InstanceSet::const_iterator end(); protected: - static Lock lock_; + static base::Lock lock_; }; // Inherit test classes from this class to get a per-class instance count. @@ -60,11 +60,11 @@ template <class T> class InstanceCountMixin : public InstanceCountMixinBase { public: InstanceCountMixin() { - AutoLock lock(lock_); + base::AutoLock lock(lock_); ++instance_count_; } ~InstanceCountMixin() { - AutoLock lock(lock_); + base::AutoLock lock(lock_); --instance_count_; } |