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

Unified Diff: chrome/browser/chromeos/drive/sync_client_unittest.cc

Issue 148233006: drive: Use UploadNewFile from EntryUpdatePerformer (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix nits Created 6 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 | « chrome/browser/chromeos/drive/sync_client.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/drive/sync_client_unittest.cc
diff --git a/chrome/browser/chromeos/drive/sync_client_unittest.cc b/chrome/browser/chromeos/drive/sync_client_unittest.cc
index 77da5459cf61a69ef61c40f3fdd53dd3c434ef77..4698b96da9b5c283524eafcb8dd7d471f5ba0331 100644
--- a/chrome/browser/chromeos/drive/sync_client_unittest.cc
+++ b/chrome/browser/chromeos/drive/sync_client_unittest.cc
@@ -135,6 +135,11 @@ class SyncClientTest : public testing::Test {
NULL /* free_disk_space_getter */));
ASSERT_TRUE(cache_->Initialize());
+ change_list_loader_.reset(new ChangeListLoader(
+ base::MessageLoopProxy::current().get(),
+ metadata_.get(),
+ scheduler_.get(),
+ drive_service_.get()));
ASSERT_NO_FATAL_FAILURE(SetUpTestData());
sync_client_.reset(new SyncClient(base::MessageLoopProxy::current().get(),
@@ -142,6 +147,7 @@ class SyncClientTest : public testing::Test {
scheduler_.get(),
metadata_.get(),
cache_.get(),
+ change_list_loader_.get(),
temp_dir_.path()));
// Disable delaying so that DoSyncLoop() starts immediately.
@@ -184,12 +190,7 @@ class SyncClientTest : public testing::Test {
// Load data from the service to the metadata.
FileError error = FILE_ERROR_FAILED;
- internal::ChangeListLoader change_list_loader(
- base::MessageLoopProxy::current().get(),
- metadata_.get(),
- scheduler_.get(),
- drive_service_.get());
- change_list_loader.LoadForTesting(
+ change_list_loader_->LoadForTesting(
google_apis::test_util::CreateCopyResultCallback(&error));
base::RunLoop().RunUntilIdle();
EXPECT_EQ(FILE_ERROR_OK, error);
@@ -256,6 +257,7 @@ class SyncClientTest : public testing::Test {
test_util::DestroyHelperForTests> metadata_storage_;
scoped_ptr<ResourceMetadata, test_util::DestroyHelperForTests> metadata_;
scoped_ptr<FileCache, test_util::DestroyHelperForTests> cache_;
+ scoped_ptr<ChangeListLoader> change_list_loader_;
scoped_ptr<SyncClient> sync_client_;
std::map<std::string, std::string> resource_ids_; // Name-to-id map.
« no previous file with comments | « chrome/browser/chromeos/drive/sync_client.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698