1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "components/sync_driver/fake_sync_service.h"
7 namespace sync_driver
{
9 FakeSyncService::FakeSyncService() : error_(GoogleServiceAuthError::NONE
) {
12 FakeSyncService::~FakeSyncService() {
15 bool FakeSyncService::HasSyncSetupCompleted() const {
19 bool FakeSyncService::IsSyncAllowed() const {
23 bool FakeSyncService::IsSyncActive() const {
27 syncer::ModelTypeSet
FakeSyncService::GetActiveDataTypes() const {
28 return syncer::ModelTypeSet();
31 void FakeSyncService::AddObserver(SyncServiceObserver
* observer
) {
34 void FakeSyncService::RemoveObserver(SyncServiceObserver
* observer
) {
37 bool FakeSyncService::HasObserver(const SyncServiceObserver
* observer
) const {
41 bool FakeSyncService::CanSyncStart() const {
45 void FakeSyncService::OnDataTypeRequestsSyncStartup(syncer::ModelType type
) {
48 void FakeSyncService::RequestStop(
49 sync_driver::SyncService::SyncStopDataFate data_fate
) {
52 void FakeSyncService::RequestStart() {
55 syncer::ModelTypeSet
FakeSyncService::GetPreferredDataTypes() const {
56 return syncer::ModelTypeSet();
59 void FakeSyncService::OnUserChoseDatatypes(bool sync_everything
,
60 syncer::ModelTypeSet chosen_types
) {
63 void FakeSyncService::SetSyncSetupCompleted() {
66 bool FakeSyncService::FirstSetupInProgress() const {
70 void FakeSyncService::SetSetupInProgress(bool setup_in_progress
) {
73 bool FakeSyncService::setup_in_progress() const {
77 bool FakeSyncService::ConfigurationDone() const {
81 const GoogleServiceAuthError
& FakeSyncService::GetAuthError() const {
85 bool FakeSyncService::HasUnrecoverableError() const {
89 bool FakeSyncService::backend_initialized() const {
93 OpenTabsUIDelegate
* FakeSyncService::GetOpenTabsUIDelegate() {
97 bool FakeSyncService::IsPassphraseRequiredForDecryption() const {
101 base::Time
FakeSyncService::GetExplicitPassphraseTime() const {
105 bool FakeSyncService::IsUsingSecondaryPassphrase() const {
109 void FakeSyncService::EnableEncryptEverything() {
112 void FakeSyncService::SetEncryptionPassphrase(const std::string
& passphrase
,
113 PassphraseType type
) {
116 bool FakeSyncService::SetDecryptionPassphrase(const std::string
& passphrase
) {
120 bool FakeSyncService::IsPassphraseRequired() const {
124 syncer::ModelTypeSet
FakeSyncService::GetEncryptedDataTypes() const {
125 return syncer::ModelTypeSet();
128 } // namespace sync_driver