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

Unified Diff: components/sync_driver/ui_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
« no previous file with comments | « components/sync_driver/ui_data_type_controller.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/sync_driver/ui_data_type_controller_unittest.cc
diff --git a/components/sync_driver/ui_data_type_controller_unittest.cc b/components/sync_driver/ui_data_type_controller_unittest.cc
index 8b5b5d098331daef544d69cd352ad98bc5197c5f..59164faee5a62737753ea6b6424453e0278f38b1 100644
--- a/components/sync_driver/ui_data_type_controller_unittest.cc
+++ b/components/sync_driver/ui_data_type_controller_unittest.cc
@@ -12,8 +12,8 @@
#include "base/tracked_objects.h"
#include "components/sync_driver/data_type_controller_mock.h"
#include "components/sync_driver/fake_generic_change_processor.h"
+#include "components/sync_driver/fake_sync_client.h"
#include "sync/api/fake_syncable_service.h"
-#include "sync/internal_api/public/attachments/attachment_service_impl.h"
#include "sync/internal_api/public/base/model_type.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -30,15 +30,22 @@ namespace {
// intelligent default values for the methods queried in the dependent services
// (e.g. those queried in StartModels).
class SyncUIDataTypeControllerTest : public testing::Test,
- public SyncApiComponentFactory {
+ public FakeSyncClient {
public:
SyncUIDataTypeControllerTest()
: type_(syncer::PREFERENCES),
change_processor_(NULL) {}
+ // FakeSyncClient overrides.
+ base::WeakPtr<syncer::SyncableService> GetSyncableServiceForType(
+ syncer::ModelType type) override {
+ return syncable_service_.AsWeakPtr();
+ }
+
void SetUp() override {
- preference_dtc_ = new UIDataTypeController(
- base::ThreadTaskRunnerHandle::Get(), base::Closure(), type_, this);
+ preference_dtc_ =
+ new UIDataTypeController(base::ThreadTaskRunnerHandle::Get(),
+ base::Closure(), type_, this);
SetStartExpectations();
}
@@ -49,20 +56,6 @@ class SyncUIDataTypeControllerTest : public testing::Test,
PumpLoop();
}
- base::WeakPtr<syncer::SyncableService> GetSyncableServiceForType(
- syncer::ModelType type) override {
- return syncable_service_.AsWeakPtr();
- }
-
- 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 {
- return syncer::AttachmentServiceImpl::CreateForTest();
- }
-
protected:
void SetStartExpectations() {
scoped_ptr<FakeGenericChangeProcessor> p(
« no previous file with comments | « components/sync_driver/ui_data_type_controller.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698