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

Side by Side Diff: chrome/browser/sync_file_system/drive_backend/conflict_resolver_unittest.cc

Issue 293003002: [SyncFS] Remove using MessageLoop in worker thread (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: RemoteToLocalSyncer Created 6 years, 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/sync_file_system/drive_backend/list_changes_task_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/sync_file_system/drive_backend/conflict_resolver.h" 5 #include "chrome/browser/sync_file_system/drive_backend/conflict_resolver.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/file_util.h" 9 #include "base/file_util.h"
10 #include "base/files/scoped_temp_dir.h" 10 #include "base/files/scoped_temp_dir.h"
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 sync_task_manager_.reset(); 86 sync_task_manager_.reset();
87 RevokeSyncableFileSystem(); 87 RevokeSyncableFileSystem();
88 fake_drive_helper_.reset(); 88 fake_drive_helper_.reset();
89 context_.reset(); 89 context_.reset();
90 base::RunLoop().RunUntilIdle(); 90 base::RunLoop().RunUntilIdle();
91 } 91 }
92 92
93 void InitializeMetadataDatabase() { 93 void InitializeMetadataDatabase() {
94 SyncEngineInitializer* initializer = 94 SyncEngineInitializer* initializer =
95 new SyncEngineInitializer(context_.get(), 95 new SyncEngineInitializer(context_.get(),
96 base::MessageLoopProxy::current(),
97 database_dir_.path(), 96 database_dir_.path(),
98 in_memory_env_.get()); 97 in_memory_env_.get());
99 SyncStatusCode status = SYNC_STATUS_UNKNOWN; 98 SyncStatusCode status = SYNC_STATUS_UNKNOWN;
100 sync_task_manager_->ScheduleSyncTask( 99 sync_task_manager_->ScheduleSyncTask(
101 FROM_HERE, 100 FROM_HERE,
102 scoped_ptr<SyncTask>(initializer), 101 scoped_ptr<SyncTask>(initializer),
103 SyncTaskManager::PRIORITY_MED, 102 SyncTaskManager::PRIORITY_MED,
104 base::Bind(&ConflictResolverTest::DidInitializeMetadataDatabase, 103 base::Bind(&ConflictResolverTest::DidInitializeMetadataDatabase,
105 base::Unretained(this), initializer, &status)); 104 base::Unretained(this), initializer, &status));
106 105
(...skipping 406 matching lines...) Expand 10 before | Expand all | Expand 10 after
513 512
514 EXPECT_EQ(4, CountParents(file)); 513 EXPECT_EQ(4, CountParents(file));
515 514
516 EXPECT_EQ(SYNC_STATUS_OK, RunConflictResolver()); 515 EXPECT_EQ(SYNC_STATUS_OK, RunConflictResolver());
517 516
518 EXPECT_EQ(1, CountParents(file)); 517 EXPECT_EQ(1, CountParents(file));
519 } 518 }
520 519
521 } // namespace drive_backend 520 } // namespace drive_backend
522 } // namespace sync_file_system 521 } // namespace sync_file_system
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/sync_file_system/drive_backend/list_changes_task_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698