Commit 69a0c405 authored by Marc Treib's avatar Marc Treib Committed by Commit Bot

Cleanup: Remove unused FakeSyncService implementation in ntp_snippets

Bug: 859874
Change-Id: Ib02931e14a22b2454b94b2021b65744441856475
Reviewed-on: https://chromium-review.googlesource.com/c/1326504Reviewed-by: default avatarFilip Gorski <fgorski@chromium.org>
Commit-Queue: Marc Treib <treib@chromium.org>
Cr-Commit-Position: refs/heads/master@{#607538}
parent dc348bc8
......@@ -6,35 +6,12 @@
#include <memory>
#include "components/prefs/testing_pref_service.h"
#include "components/sync/driver/fake_sync_service.h"
namespace ntp_snippets {
namespace test {
FakeSyncService::FakeSyncService()
: is_encrypt_everything_enabled_(false),
active_data_types_(syncer::HISTORY_DELETE_DIRECTIVES) {}
FakeSyncService::~FakeSyncService() = default;
int FakeSyncService::GetDisableReasons() const {
return DISABLE_REASON_NONE;
}
bool FakeSyncService::IsEncryptEverythingEnabled() const {
return is_encrypt_everything_enabled_;
}
syncer::ModelTypeSet FakeSyncService::GetActiveDataTypes() const {
return active_data_types_;
}
RemoteSuggestionsTestUtils::RemoteSuggestionsTestUtils()
: pref_service_(std::make_unique<TestingPrefServiceSyncable>()) {
fake_sync_service_ = std::make_unique<FakeSyncService>();
}
: pref_service_(std::make_unique<TestingPrefServiceSyncable>()) {}
RemoteSuggestionsTestUtils::~RemoteSuggestionsTestUtils() = default;
......
......@@ -6,11 +6,7 @@
#define COMPONENTS_NTP_SNIPPETS_REMOTE_TEST_UTILS_H_
#include <memory>
#include <string>
#include <vector>
#include "build/build_config.h"
#include "components/sync/driver/fake_sync_service.h"
#include "components/sync_preferences/testing_pref_service_syncable.h"
using sync_preferences::TestingPrefServiceSyncable;
......@@ -19,33 +15,15 @@ namespace ntp_snippets {
namespace test {
class FakeSyncService : public syncer::FakeSyncService {
public:
FakeSyncService();
~FakeSyncService() override;
int GetDisableReasons() const override;
bool IsEncryptEverythingEnabled() const override;
syncer::ModelTypeSet GetActiveDataTypes() const override;
bool is_encrypt_everything_enabled_;
syncer::ModelTypeSet active_data_types_;
};
// Common utilities for remote suggestion tests, handles initializing fakes for
// sync and signin.
// Common utilities for remote suggestion tests, handles initializing fakes.
class RemoteSuggestionsTestUtils {
public:
RemoteSuggestionsTestUtils();
~RemoteSuggestionsTestUtils();
void ResetSigninManager();
FakeSyncService* fake_sync_service() { return fake_sync_service_.get(); }
TestingPrefServiceSyncable* pref_service() { return pref_service_.get(); }
private:
std::unique_ptr<FakeSyncService> fake_sync_service_;
std::unique_ptr<TestingPrefServiceSyncable> pref_service_;
};
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment