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

Side by Side Diff: chrome/browser/chromeos/drive/file_system/operation_test_base.cc

Issue 23670006: Use DriveService for proper resource id resolution in ChangeListLoader. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 3 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
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/chromeos/drive/file_system/operation_test_base.h" 5 #include "chrome/browser/chromeos/drive/file_system/operation_test_base.h"
6 6
7 #include "base/prefs/testing_pref_service.h" 7 #include "base/prefs/testing_pref_service.h"
8 #include "base/threading/sequenced_worker_pool.h" 8 #include "base/threading/sequenced_worker_pool.h"
9 #include "chrome/browser/chromeos/drive/change_list_processor.h" 9 #include "chrome/browser/chromeos/drive/change_list_processor.h"
10 #include "chrome/browser/chromeos/drive/fake_free_disk_space_getter.h" 10 #include "chrome/browser/chromeos/drive/fake_free_disk_space_getter.h"
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 blocking_task_runner_.get(), 103 blocking_task_runner_.get(),
104 FROM_HERE, 104 FROM_HERE,
105 base::Bind(&internal::FileCache::Initialize, 105 base::Bind(&internal::FileCache::Initialize,
106 base::Unretained(cache_.get())), 106 base::Unretained(cache_.get())),
107 google_apis::test_util::CreateCopyResultCallback(&success)); 107 google_apis::test_util::CreateCopyResultCallback(&success));
108 test_util::RunBlockingPoolTask(); 108 test_util::RunBlockingPoolTask();
109 ASSERT_TRUE(success); 109 ASSERT_TRUE(success);
110 110
111 // Makes sure the FakeDriveService's content is loaded to the metadata_. 111 // Makes sure the FakeDriveService's content is loaded to the metadata_.
112 change_list_loader_.reset(new internal::ChangeListLoader( 112 change_list_loader_.reset(new internal::ChangeListLoader(
113 blocking_task_runner_.get(), metadata_.get(), scheduler_.get())); 113 blocking_task_runner_.get(),
114 metadata_.get(),
115 scheduler_.get(),
116 fake_drive_service_.get()));
114 change_list_loader_->LoadIfNeeded( 117 change_list_loader_->LoadIfNeeded(
115 internal::DirectoryFetchInfo(), 118 internal::DirectoryFetchInfo(),
116 google_apis::test_util::CreateCopyResultCallback(&error)); 119 google_apis::test_util::CreateCopyResultCallback(&error));
117 test_util::RunBlockingPoolTask(); 120 test_util::RunBlockingPoolTask();
118 ASSERT_EQ(FILE_ERROR_OK, error); 121 ASSERT_EQ(FILE_ERROR_OK, error);
119 } 122 }
120 123
121 FileError OperationTestBase::GetLocalResourceEntry(const base::FilePath& path, 124 FileError OperationTestBase::GetLocalResourceEntry(const base::FilePath& path,
122 ResourceEntry* entry) { 125 ResourceEntry* entry) {
123 FileError error = FILE_ERROR_FAILED; 126 FileError error = FILE_ERROR_FAILED;
(...skipping 24 matching lines...) Expand all
148 FileError OperationTestBase::CheckForUpdates() { 151 FileError OperationTestBase::CheckForUpdates() {
149 FileError error = FILE_ERROR_FAILED; 152 FileError error = FILE_ERROR_FAILED;
150 change_list_loader_->CheckForUpdates( 153 change_list_loader_->CheckForUpdates(
151 google_apis::test_util::CreateCopyResultCallback(&error)); 154 google_apis::test_util::CreateCopyResultCallback(&error));
152 test_util::RunBlockingPoolTask(); 155 test_util::RunBlockingPoolTask();
153 return error; 156 return error;
154 } 157 }
155 158
156 } // namespace file_system 159 } // namespace file_system
157 } // namespace drive 160 } // namespace drive
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/drive/file_system.cc ('k') | chrome/browser/chromeos/drive/sync_client_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698