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(sync_driver::SyncServiceObserver
* observer
) {
34 void FakeSyncService::RemoveObserver(
35 sync_driver::SyncServiceObserver
* observer
) {
38 bool FakeSyncService::HasObserver(
39 const sync_driver::SyncServiceObserver
* observer
) const {
43 bool FakeSyncService::IsSyncEnabledAndLoggedIn() {
47 void FakeSyncService::DisableForUser() {
50 void FakeSyncService::RequestStop() {
53 void FakeSyncService::RequestStart() {
56 syncer::ModelTypeSet
FakeSyncService::GetPreferredDataTypes() const {
57 return syncer::ModelTypeSet();
60 void FakeSyncService::OnUserChoseDatatypes(bool sync_everything
,
61 syncer::ModelTypeSet chosen_types
) {
64 void FakeSyncService::SetSyncSetupCompleted() {
67 bool FakeSyncService::FirstSetupInProgress() const {
71 void FakeSyncService::SetSetupInProgress(bool setup_in_progress
) {
74 bool FakeSyncService::setup_in_progress() const {
78 bool FakeSyncService::ConfigurationDone() const {
82 const GoogleServiceAuthError
& FakeSyncService::GetAuthError() const {
86 bool FakeSyncService::HasUnrecoverableError() const {
90 bool FakeSyncService::backend_initialized() const {
94 bool FakeSyncService::IsPassphraseRequiredForDecryption() const {
98 base::Time
FakeSyncService::GetExplicitPassphraseTime() const {
102 bool FakeSyncService::IsUsingSecondaryPassphrase() const {
106 void FakeSyncService::EnableEncryptEverything() {
109 void FakeSyncService::SetEncryptionPassphrase(const std::string
& passphrase
,
110 PassphraseType type
) {
113 bool FakeSyncService::SetDecryptionPassphrase(const std::string
& passphrase
) {
117 bool FakeSyncService::IsPassphraseRequired() const {
121 syncer::ModelTypeSet
FakeSyncService::GetEncryptedDataTypes() const {
122 return syncer::ModelTypeSet();
125 } // namespace sync_driver