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

Unified Diff: components/sync_driver/device_info_data_type_controller_unittest.cc

Issue 1310553005: [Sync] Replace ProfileSyncComponentsFactory with SyncClient (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Really fix GN Created 5 years, 4 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: components/sync_driver/device_info_data_type_controller_unittest.cc
diff --git a/components/sync_driver/device_info_data_type_controller_unittest.cc b/components/sync_driver/device_info_data_type_controller_unittest.cc
index 926cca409ab1c0ec84d10d2a102ac0f44e8efb04..4393dfdd58845c236119757e89f10ce491ecc9ef 100644
--- a/components/sync_driver/device_info_data_type_controller_unittest.cc
+++ b/components/sync_driver/device_info_data_type_controller_unittest.cc
@@ -8,6 +8,7 @@
#include "base/run_loop.h"
#include "base/thread_task_runner_handle.h"
#include "components/sync_driver/device_info_data_type_controller.h"
+#include "components/sync_driver/fake_sync_client.h"
#include "components/sync_driver/local_device_info_provider_mock.h"
#include "components/sync_driver/sync_api_component_factory.h"
#include "sync/internal_api/public/base/model_type.h"
@@ -17,8 +18,7 @@ namespace sync_driver {
namespace {
-class DeviceInfoDataTypeControllerTest : public testing::Test,
- public SyncApiComponentFactory {
+class DeviceInfoDataTypeControllerTest : public testing::Test {
public:
DeviceInfoDataTypeControllerTest()
: load_finished_(false),
@@ -36,7 +36,7 @@ class DeviceInfoDataTypeControllerTest : public testing::Test,
"device_id"));
controller_ = new DeviceInfoDataTypeController(
- base::ThreadTaskRunnerHandle::Get(), base::Closure(), this,
+ base::ThreadTaskRunnerHandle::Get(), base::Closure(), &sync_client_,
local_device_.get());
load_finished_ = false;
@@ -55,24 +55,6 @@ class DeviceInfoDataTypeControllerTest : public testing::Test,
weak_ptr_factory_.GetWeakPtr()));
}
- base::WeakPtr<syncer::SyncableService> GetSyncableServiceForType(
- syncer::ModelType type) override {
- // Shouldn't be called for this test.
- NOTREACHED();
- return base::WeakPtr<syncer::SyncableService>();
- }
-
- scoped_ptr<syncer::AttachmentService> CreateAttachmentService(
- scoped_ptr<syncer::AttachmentStoreForSync> attachment_store,
- const syncer::UserShare& user_share,
- const std::string& store_birthday,
- syncer::ModelType model_type,
- syncer::AttachmentService::Delegate* delegate) override {
- // Shouldn't be called for this test.
- NOTREACHED();
- return scoped_ptr<syncer::AttachmentService>();
- }
-
void OnLoadFinished(syncer::ModelType type, syncer::SyncError error) {
load_finished_ = true;
last_type_ = type;
@@ -108,6 +90,7 @@ class DeviceInfoDataTypeControllerTest : public testing::Test,
base::MessageLoopForUI message_loop_;
syncer::ModelType last_type_;
syncer::SyncError last_error_;
+ FakeSyncClient sync_client_;
base::WeakPtrFactory<DeviceInfoDataTypeControllerTest> weak_ptr_factory_;
};
« no previous file with comments | « components/sync_driver/device_info_data_type_controller.cc ('k') | components/sync_driver/fake_generic_change_processor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698