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

Unified Diff: chrome/browser/sync_file_system/drive_backend/list_changes_task_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/list_changes_task_unittest.cc
diff --git a/chrome/browser/sync_file_system/drive_backend/list_changes_task_unittest.cc b/chrome/browser/sync_file_system/drive_backend/list_changes_task_unittest.cc
index 81c290c24ecdbfcf9c3ce569e06b6964bb7aaa40..173d901ea56594acf3aa2129b1a881e5836fc882 100644
--- a/chrome/browser/sync_file_system/drive_backend/list_changes_task_unittest.cc
+++ b/chrome/browser/sync_file_system/drive_backend/list_changes_task_unittest.cc
@@ -42,14 +42,15 @@ class ListChangesTaskTest : 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()));
fake_drive_service_helper_.reset(
- new FakeDriveServiceHelper(fake_drive_service_.get(),
+ new FakeDriveServiceHelper(fake_drive_service.get(),
drive_uploader_.get(),
kSyncRootFolderTitle));
@@ -58,11 +59,11 @@ class ListChangesTaskTest : public testing::Test {
10 /* maximum_background_task */));
sync_task_manager_->Initialize(SYNC_STATUS_OK);
- 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()));
SetUpRemoteFolders();
@@ -73,7 +74,6 @@ class ListChangesTaskTest : public testing::Test {
virtual void TearDown() OVERRIDE {
sync_task_manager_.reset();
context_.reset();
- fake_drive_service_.reset();
drive_uploader_.reset();
base::RunLoop().RunUntilIdle();
}
@@ -204,7 +204,6 @@ class ListChangesTaskTest : public testing::Test {
base::ScopedTempDir database_dir_;
scoped_ptr<SyncEngineContext> context_;
- scoped_ptr<drive::FakeDriveService> fake_drive_service_;
scoped_ptr<drive::DriveUploaderInterface> drive_uploader_;
scoped_ptr<FakeDriveServiceHelper> fake_drive_service_helper_;

Powered by Google App Engine
This is Rietveld 408576698