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

Unified Diff: base/threading/worker_pool_posix_unittest.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/threading/thread_collision_warner_unittest.cc ('k') | base/tracked_objects.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/threading/worker_pool_posix_unittest.cc
diff --git a/base/threading/worker_pool_posix_unittest.cc b/base/threading/worker_pool_posix_unittest.cc
index 332c55e014fd0c8b0a9fc3f78c33b8193bde800e..c984ee33af77656cf3d1f4813802eee49b5ad4f7 100644
--- a/base/threading/worker_pool_posix_unittest.cc
+++ b/base/threading/worker_pool_posix_unittest.cc
@@ -6,8 +6,8 @@
#include <set>
-#include "base/lock.h"
#include "base/synchronization/condition_variable.h"
+#include "base/synchronization/lock.h"
#include "base/task.h"
#include "base/threading/platform_thread.h"
#include "base/synchronization/waitable_event.h"
@@ -61,12 +61,12 @@ class IncrementingTask : public Task {
virtual void Run() {
AddSelfToUniqueThreadSet();
- AutoLock locked(*counter_lock_);
+ base::AutoLock locked(*counter_lock_);
(*counter_)++;
}
void AddSelfToUniqueThreadSet() {
- AutoLock locked(*unique_threads_lock_);
+ base::AutoLock locked(*unique_threads_lock_);
unique_threads_->insert(PlatformThread::CurrentId());
}
@@ -100,7 +100,7 @@ class BlockingIncrementingTask : public Task {
virtual void Run() {
{
- AutoLock num_waiting_to_start_locked(*num_waiting_to_start_lock_);
+ base::AutoLock num_waiting_to_start_locked(*num_waiting_to_start_lock_);
(*num_waiting_to_start_)++;
}
num_waiting_to_start_cv_->Signal();
@@ -138,14 +138,14 @@ class PosixDynamicThreadPoolTest : public testing::Test {
}
void WaitForTasksToStart(int num_tasks) {
- AutoLock num_waiting_to_start_locked(num_waiting_to_start_lock_);
+ base::AutoLock num_waiting_to_start_locked(num_waiting_to_start_lock_);
while (num_waiting_to_start_ < num_tasks) {
num_waiting_to_start_cv_.Wait();
}
}
void WaitForIdleThreads(int num_idle_threads) {
- AutoLock pool_locked(*peer_.lock());
+ base::AutoLock pool_locked(*peer_.lock());
while (peer_.num_idle_threads() < num_idle_threads) {
peer_.num_idle_threads_cv()->Wait();
}
@@ -249,7 +249,7 @@ TEST_F(PosixDynamicThreadPoolTest, Complex) {
// Wake up all idle threads so they can exit.
{
- AutoLock locked(*peer_.lock());
+ base::AutoLock locked(*peer_.lock());
while (peer_.num_idle_threads() > 0) {
peer_.tasks_available_cv()->Signal();
peer_.num_idle_threads_cv()->Wait();
« no previous file with comments | « base/threading/thread_collision_warner_unittest.cc ('k') | base/tracked_objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698