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

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

Issue 1124813003: [chrome/browser/chromeos/drive] Avoid use of MessageLoopProxy by use of TTRH (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/drive/change_list_loader_unittest.cc
diff --git a/chrome/browser/chromeos/drive/change_list_loader_unittest.cc b/chrome/browser/chromeos/drive/change_list_loader_unittest.cc
index b837d25033f09096d321935037bda3738be0489d..7fe3da78ddae79b7262a17654e5bd1b4cdc49613 100644
--- a/chrome/browser/chromeos/drive/change_list_loader_unittest.cc
+++ b/chrome/browser/chromeos/drive/change_list_loader_unittest.cc
@@ -9,6 +9,8 @@
#include "base/memory/scoped_ptr.h"
#include "base/prefs/testing_pref_service.h"
#include "base/run_loop.h"
+#include "base/single_thread_task_runner.h"
+#include "base/thread_task_runner_handle.h"
#include "chrome/browser/chromeos/drive/change_list_loader_observer.h"
#include "chrome/browser/chromeos/drive/file_cache.h"
#include "chrome/browser/chromeos/drive/file_change.h"
@@ -78,34 +80,28 @@ class ChangeListLoaderTest : public testing::Test {
drive_service_.reset(new FakeDriveService);
ASSERT_TRUE(test_util::SetUpTestEntries(drive_service_.get()));
- scheduler_.reset(new JobScheduler(pref_service_.get(),
- logger_.get(),
+ scheduler_.reset(new JobScheduler(pref_service_.get(), logger_.get(),
drive_service_.get(),
- base::MessageLoopProxy::current().get()));
+ base::ThreadTaskRunnerHandle::Get()));
metadata_storage_.reset(new ResourceMetadataStorage(
- temp_dir_.path(), base::MessageLoopProxy::current().get()));
+ temp_dir_.path(), base::ThreadTaskRunnerHandle::Get()));
ASSERT_TRUE(metadata_storage_->Initialize());
- cache_.reset(new FileCache(metadata_storage_.get(),
- temp_dir_.path(),
- base::MessageLoopProxy::current().get(),
+ cache_.reset(new FileCache(metadata_storage_.get(), temp_dir_.path(),
+ base::ThreadTaskRunnerHandle::Get(),
NULL /* free_disk_space_getter */));
ASSERT_TRUE(cache_->Initialize());
- metadata_.reset(new ResourceMetadata(
- metadata_storage_.get(), cache_.get(),
- base::MessageLoopProxy::current().get()));
+ metadata_.reset(new ResourceMetadata(metadata_storage_.get(), cache_.get(),
+ base::ThreadTaskRunnerHandle::Get()));
ASSERT_EQ(FILE_ERROR_OK, metadata_->Initialize());
about_resource_loader_.reset(new AboutResourceLoader(scheduler_.get()));
loader_controller_.reset(new LoaderController);
- change_list_loader_.reset(
- new ChangeListLoader(logger_.get(),
- base::MessageLoopProxy::current().get(),
- metadata_.get(),
- scheduler_.get(),
- about_resource_loader_.get(),
- loader_controller_.get()));
+ change_list_loader_.reset(new ChangeListLoader(
+ logger_.get(), base::ThreadTaskRunnerHandle::Get(), metadata_.get(),
+ scheduler_.get(), about_resource_loader_.get(),
+ loader_controller_.get()));
satorux1 2015/05/05 16:23:23 Please keep them aligned vertically for consistenc
Pranay 2015/05/08 10:21:16 Done.
}
// Adds a new file to the root directory of the service.
@@ -245,13 +241,10 @@ TEST_F(ChangeListLoaderTest, Load_LocalMetadataAvailable) {
// Reset loader.
about_resource_loader_.reset(new AboutResourceLoader(scheduler_.get()));
- change_list_loader_.reset(
- new ChangeListLoader(logger_.get(),
- base::MessageLoopProxy::current().get(),
- metadata_.get(),
- scheduler_.get(),
- about_resource_loader_.get(),
- loader_controller_.get()));
+ change_list_loader_.reset(new ChangeListLoader(
+ logger_.get(), base::ThreadTaskRunnerHandle::Get(), metadata_.get(),
+ scheduler_.get(), about_resource_loader_.get(),
+ loader_controller_.get()));
// Add a file to the service.
scoped_ptr<google_apis::FileResource> gdata_entry = AddNewFile("New File");
« no previous file with comments | « chrome/browser/chromeos/drive/change_list_loader.cc ('k') | chrome/browser/chromeos/drive/change_list_processor_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698