summaryrefslogtreecommitdiffstats
path: root/chrome/browser/sync/syncable
diff options
context:
space:
mode:
authorbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-01-01 23:16:20 +0000
committerbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-01-01 23:16:20 +0000
commitbc581a6829fe49e43f4869075781d6dc94843f09 (patch)
treea94363488dadff28fe2c03f3a169b6ad2eeb02e8 /chrome/browser/sync/syncable
parent10f33b1bd6c6adb6306759a45bf3a5c18221d878 (diff)
downloadchromium_src-bc581a6829fe49e43f4869075781d6dc94843f09.zip
chromium_src-bc581a6829fe49e43f4869075781d6dc94843f09.tar.gz
chromium_src-bc581a6829fe49e43f4869075781d6dc94843f09.tar.bz2
Move base/lock and base/condition_variable to base/synchronization/
I kept a base/lock.h in place with a using statement to avoid updating all callers in one CL. TEST=it compiles BUG=none Review URL: http://codereview.chromium.org/6018013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70363 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/sync/syncable')
-rw-r--r--chrome/browser/sync/syncable/syncable_unittest.cc18
1 files changed, 9 insertions, 9 deletions
diff --git a/chrome/browser/sync/syncable/syncable_unittest.cc b/chrome/browser/sync/syncable/syncable_unittest.cc
index 1bf4587..6c887b2 100644
--- a/chrome/browser/sync/syncable/syncable_unittest.cc
+++ b/chrome/browser/sync/syncable/syncable_unittest.cc
@@ -386,7 +386,7 @@ TEST_F(SyncableDirectoryTest, TakeSnapshotGetsMetahandlesToPurge) {
dir_->PurgeEntriesWithTypeIn(to_purge);
Directory::SaveChangesSnapshot snapshot1;
- AutoLock scoped_lock(dir_->kernel_->save_changes_mutex);
+ base::AutoLock scoped_lock(dir_->kernel_->save_changes_mutex);
dir_->TakeSnapshotForSaveChanges(&snapshot1);
EXPECT_TRUE(expected_purges == snapshot1.metahandles_to_purge);
@@ -415,7 +415,7 @@ TEST_F(SyncableDirectoryTest, TakeSnapshotGetsAllDirtyHandlesTest) {
// Fake SaveChanges() and make sure we got what we expected.
{
Directory::SaveChangesSnapshot snapshot;
- AutoLock scoped_lock(dir_->kernel_->save_changes_mutex);
+ base::AutoLock scoped_lock(dir_->kernel_->save_changes_mutex);
dir_->TakeSnapshotForSaveChanges(&snapshot);
// Make sure there's an entry for each new metahandle. Make sure all
// entries are marked dirty.
@@ -448,7 +448,7 @@ TEST_F(SyncableDirectoryTest, TakeSnapshotGetsAllDirtyHandlesTest) {
// Fake SaveChanges() and make sure we got what we expected.
{
Directory::SaveChangesSnapshot snapshot;
- AutoLock scoped_lock(dir_->kernel_->save_changes_mutex);
+ base::AutoLock scoped_lock(dir_->kernel_->save_changes_mutex);
dir_->TakeSnapshotForSaveChanges(&snapshot);
// Make sure there's an entry for each new metahandle. Make sure all
// entries are marked dirty.
@@ -588,7 +588,7 @@ TEST_F(SyncableDirectoryTest, TakeSnapshotGetsOnlyDirtyHandlesTest) {
// Fake SaveChanges() and make sure we got what we expected.
{
Directory::SaveChangesSnapshot snapshot;
- AutoLock scoped_lock(dir_->kernel_->save_changes_mutex);
+ base::AutoLock scoped_lock(dir_->kernel_->save_changes_mutex);
dir_->TakeSnapshotForSaveChanges(&snapshot);
// Make sure there are no dirty_metahandles.
EXPECT_EQ(0u, snapshot.dirty_metas.size());
@@ -614,7 +614,7 @@ TEST_F(SyncableDirectoryTest, TakeSnapshotGetsOnlyDirtyHandlesTest) {
// Fake SaveChanges() and make sure we got what we expected.
{
Directory::SaveChangesSnapshot snapshot;
- AutoLock scoped_lock(dir_->kernel_->save_changes_mutex);
+ base::AutoLock scoped_lock(dir_->kernel_->save_changes_mutex);
dir_->TakeSnapshotForSaveChanges(&snapshot);
// Make sure there's an entry for each changed metahandle. Make sure all
// entries are marked dirty.
@@ -1389,8 +1389,8 @@ TEST(SyncableDirectoryManager, ThreadOpenTest) {
struct Step {
Step() : condvar(&mutex), number(0) {}
- Lock mutex;
- ConditionVariable condvar;
+ base::Lock mutex;
+ base::ConditionVariable condvar;
int number;
int64 metahandle;
};
@@ -1409,7 +1409,7 @@ class ThreadBugDelegate : public base::PlatformThread::Delegate {
// PlatformThread::Delegate methods:
virtual void ThreadMain() {
const std::string dirname = "ThreadBug1";
- AutoLock scoped_lock(step_->mutex);
+ base::AutoLock scoped_lock(step_->mutex);
while (step_->number < 3) {
while (step_->number % 2 != role_) {
@@ -1482,7 +1482,7 @@ class DirectoryKernelStalenessBugDelegate : public ThreadBugDelegate {
virtual void ThreadMain() {
const char test_bytes[] = "test data";
const std::string dirname = "DirectoryKernelStalenessBug";
- AutoLock scoped_lock(step_->mutex);
+ base::AutoLock scoped_lock(step_->mutex);
const Id jeff_id = TestIdFactory::FromNumber(100);
while (step_->number < 4) {