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

Unified Diff: base/tracked_objects.cc

Issue 6142009: Upating the app, ceee, chrome, ipc, media, and net directories to use the correct lock.h file. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Unified patch updating all references to the new base/synchronization/lock.h Created 9 years, 11 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 | « base/tracked_objects.h ('k') | chrome/browser/automation/automation_resource_message_filter.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/tracked_objects.cc
diff --git a/base/tracked_objects.cc b/base/tracked_objects.cc
index d62aa5971401d3ccff783b4ce8685a2b86b798fc..a9f81b1a71ac65ad4282d74feabbec45a4a229e3 100644
--- a/base/tracked_objects.cc
+++ b/base/tracked_objects.cc
@@ -85,7 +85,7 @@ Births::Births(const Location& location)
// static
ThreadData* ThreadData::first_ = NULL;
// static
-Lock ThreadData::list_lock_;
+base::Lock ThreadData::list_lock_;
// static
ThreadData::Status ThreadData::status_ = ThreadData::UNINITIALIZED;
@@ -111,7 +111,7 @@ ThreadData* ThreadData::current() {
bool too_late_to_create = false;
{
registry = new ThreadData;
- AutoLock lock(list_lock_);
+ base::AutoLock lock(list_lock_);
// Use lock to insure we have most recent status.
if (!IsActive()) {
too_late_to_create = true;
@@ -285,7 +285,7 @@ Births* ThreadData::TallyABirth(const Location& location) {
Births* tracker = new Births(location);
// Lock since the map may get relocated now, and other threads sometimes
// snapshot it (but they lock before copying it).
- AutoLock lock(lock_);
+ base::AutoLock lock(lock_);
birth_map_[location] = tracker;
return tracker;
}
@@ -305,13 +305,13 @@ void ThreadData::TallyADeath(const Births& lifetimes,
return;
}
- AutoLock lock(lock_); // Lock since the map may get relocated now.
+ base::AutoLock lock(lock_); // Lock since the map may get relocated now.
death_map_[&lifetimes].RecordDeath(duration);
}
// static
ThreadData* ThreadData::first() {
- AutoLock lock(list_lock_);
+ base::AutoLock lock(list_lock_);
return first_;
}
@@ -323,7 +323,7 @@ const std::string ThreadData::ThreadName() const {
// This may be called from another thread.
void ThreadData::SnapshotBirthMap(BirthMap *output) const {
- AutoLock lock(lock_);
+ base::AutoLock lock(lock_);
for (BirthMap::const_iterator it = birth_map_.begin();
it != birth_map_.end(); ++it)
(*output)[it->first] = it->second;
@@ -331,7 +331,7 @@ void ThreadData::SnapshotBirthMap(BirthMap *output) const {
// This may be called from another thread.
void ThreadData::SnapshotDeathMap(DeathMap *output) const {
- AutoLock lock(lock_);
+ base::AutoLock lock(lock_);
for (DeathMap::const_iterator it = death_map_.begin();
it != death_map_.end(); ++it)
(*output)[it->first] = it->second;
@@ -348,7 +348,7 @@ void ThreadData::ResetAllThreadData() {
}
void ThreadData::Reset() {
- AutoLock lock(lock_);
+ base::AutoLock lock(lock_);
for (DeathMap::iterator it = death_map_.begin();
it != death_map_.end(); ++it)
it->second.Clear();
@@ -372,7 +372,7 @@ class ThreadData::ThreadSafeDownCounter {
private:
size_t remaining_count_;
- Lock lock_; // protect access to remaining_count_.
+ base::Lock lock_; // protect access to remaining_count_.
};
ThreadData::ThreadSafeDownCounter::ThreadSafeDownCounter(size_t count)
@@ -382,7 +382,7 @@ ThreadData::ThreadSafeDownCounter::ThreadSafeDownCounter(size_t count)
bool ThreadData::ThreadSafeDownCounter::LastCaller() {
{
- AutoLock lock(lock_);
+ base::AutoLock lock(lock_);
if (--remaining_count_)
return false;
} // Release lock, so we can delete everything in this instance.
@@ -461,12 +461,12 @@ bool ThreadData::StartTracking(bool status) {
#endif
if (!status) {
- AutoLock lock(list_lock_);
+ base::AutoLock lock(list_lock_);
DCHECK(status_ == ACTIVE || status_ == SHUTDOWN);
status_ = SHUTDOWN;
return true;
}
- AutoLock lock(list_lock_);
+ base::AutoLock lock(list_lock_);
DCHECK(status_ == UNINITIALIZED);
CHECK(tls_index_.Initialize(NULL));
status_ = ACTIVE;
@@ -504,7 +504,7 @@ void ThreadData::ShutdownSingleThreadedCleanup() {
return;
ThreadData* thread_data_list;
{
- AutoLock lock(list_lock_);
+ base::AutoLock lock(list_lock_);
thread_data_list = first_;
first_ = NULL;
}
@@ -614,7 +614,7 @@ void DataCollector::Append(const ThreadData& thread_data) {
thread_data.SnapshotDeathMap(&death_map);
// Use our lock to protect our accumulation activity.
- AutoLock lock(accumulation_lock_);
+ base::AutoLock lock(accumulation_lock_);
DCHECK(count_of_contributing_threads_);
« no previous file with comments | « base/tracked_objects.h ('k') | chrome/browser/automation/automation_resource_message_filter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698