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

Unified Diff: chrome/browser/sync_file_system/drive_backend/remote_to_local_syncer_unittest.cc

Issue 248853002: [NOCOMMIT] Make DriveService{Wrapper|Messenger} class (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Simplify Created 6 years, 8 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
Index: chrome/browser/sync_file_system/drive_backend/remote_to_local_syncer_unittest.cc
diff --git a/chrome/browser/sync_file_system/drive_backend/remote_to_local_syncer_unittest.cc b/chrome/browser/sync_file_system/drive_backend/remote_to_local_syncer_unittest.cc
index 28e564c385101d4f682c5d533b86861282562e0a..128032470906c88b38dd823e09fc952586446309 100644
--- a/chrome/browser/sync_file_system/drive_backend/remote_to_local_syncer_unittest.cc
+++ b/chrome/browser/sync_file_system/drive_backend/remote_to_local_syncer_unittest.cc
@@ -55,21 +55,23 @@ class RemoteToLocalSyncerTest : public testing::Test {
ASSERT_TRUE(database_dir_.CreateUniqueTempDir());
in_memory_env_.reset(leveldb::NewMemEnv(leveldb::Env::Default()));
- fake_drive_service_.reset(new drive::FakeDriveService);
+ scoped_ptr<drive::FakeDriveService>
+ fake_drive_service(new drive::FakeDriveService);
drive_uploader_.reset(
- new drive::DriveUploader(fake_drive_service_.get(),
+ new drive::DriveUploader(fake_drive_service.get(),
base::MessageLoopProxy::current().get()));
fake_drive_helper_.reset(
- new FakeDriveServiceHelper(fake_drive_service_.get(),
+ new FakeDriveServiceHelper(fake_drive_service.get(),
drive_uploader_.get(),
kSyncRootFolderTitle));
fake_remote_change_processor_.reset(new FakeRemoteChangeProcessor);
- context_.reset(new SyncEngineContext(fake_drive_service_.get(),
- drive_uploader_.get(),
- base::MessageLoopProxy::current(),
- base::MessageLoopProxy::current()));
+ context_.reset(new SyncEngineContext(
+ fake_drive_service.PassAs<drive::DriveServiceInterface>(),
+ drive_uploader_.get(),
+ base::MessageLoopProxy::current(),
+ base::MessageLoopProxy::current()));
context_->SetRemoteChangeProcessor(fake_remote_change_processor_.get());
RegisterSyncableFileSystem();
@@ -87,7 +89,6 @@ class RemoteToLocalSyncerTest : public testing::Test {
fake_remote_change_processor_.reset();
fake_drive_helper_.reset();
- fake_drive_service_.reset();
drive_uploader_.reset();
context_.reset();
base::RunLoop().RunUntilIdle();
@@ -221,7 +222,6 @@ class RemoteToLocalSyncerTest : public testing::Test {
scoped_ptr<leveldb::Env> in_memory_env_;
scoped_ptr<SyncEngineContext> context_;
- scoped_ptr<drive::FakeDriveService> fake_drive_service_;
scoped_ptr<drive::DriveUploaderInterface> drive_uploader_;
scoped_ptr<FakeDriveServiceHelper> fake_drive_helper_;
scoped_ptr<FakeRemoteChangeProcessor> fake_remote_change_processor_;

Powered by Google App Engine
This is Rietveld 408576698