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

Unified Diff: chrome/browser/sync/sessions/session_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: chrome/browser/sync/sessions/session_data_type_controller_unittest.cc
diff --git a/chrome/browser/sync/sessions/session_data_type_controller_unittest.cc b/chrome/browser/sync/sessions/session_data_type_controller_unittest.cc
index f22ce4a6db504fded0fce3775629205da469907d..77b4ee7c2675d336744f7ebc1d8990df87935141 100644
--- a/chrome/browser/sync/sessions/session_data_type_controller_unittest.cc
+++ b/chrome/browser/sync/sessions/session_data_type_controller_unittest.cc
@@ -12,6 +12,7 @@
#include "chrome/browser/sync/sessions/session_data_type_controller.h"
#include "chrome/browser/sync/sessions/synced_window_delegates_getter.h"
#include "chrome/test/base/testing_profile.h"
+#include "components/sync_driver/fake_sync_client.h"
#include "components/sync_driver/local_device_info_provider_mock.h"
#include "content/public/browser/notification_service.h"
#include "content/public/test/test_browser_thread_bundle.h"
@@ -80,15 +81,21 @@ class MockSyncedWindowDelegatesGetter : public SyncedWindowDelegatesGetter {
};
class SessionDataTypeControllerTest
- : public testing::Test {
+ : public testing::Test, public sync_driver::FakeSyncClient {
public:
SessionDataTypeControllerTest()
- : load_finished_(false),
+ : sync_driver::FakeSyncClient(&profile_sync_factory_),
+ load_finished_(false),
thread_bundle_(content::TestBrowserThreadBundle::DEFAULT),
last_type_(syncer::UNSPECIFIED),
weak_ptr_factory_(this) {}
~SessionDataTypeControllerTest() override {}
+ // FakeSyncClient overrides.
+ PrefService* GetPrefService() override {
+ return profile_.GetPrefs();
+ }
+
void SetUp() override {
synced_window_delegate_.reset(new MockSyncedWindowDelegate(&profile_));
synced_window_getter_.reset(new MockSyncedWindowDelegatesGetter());
@@ -103,7 +110,7 @@ class SessionDataTypeControllerTest
"device_id"));
controller_ = new SessionDataTypeController(
- &profile_sync_factory_,
+ this,
&profile_,
synced_window_getter_.get(),
local_device_.get());
« no previous file with comments | « chrome/browser/sync/sessions/session_data_type_controller.cc ('k') | chrome/browser/sync/test_profile_sync_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698