[Sync] Add ProfileSyncService::IsSyncAllowed().
[chromium-blink-merge.git] / components / sync_driver / fake_sync_service.cc
blob51d0f0908ab834729c7cbc4cd6d4221e149ceb3d
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 {
16 return false;
19 bool FakeSyncService::IsSyncAllowed() const {
20 return false;
23 bool FakeSyncService::IsSyncActive() const {
24 return false;
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 {
40 return false;
43 bool FakeSyncService::IsSyncEnabledAndLoggedIn() {
44 return false;
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 {
68 return false;
71 void FakeSyncService::SetSetupInProgress(bool setup_in_progress) {
74 bool FakeSyncService::setup_in_progress() const {
75 return false;
78 bool FakeSyncService::ConfigurationDone() const {
79 return false;
82 const GoogleServiceAuthError& FakeSyncService::GetAuthError() const {
83 return error_;
86 bool FakeSyncService::HasUnrecoverableError() const {
87 return false;
90 bool FakeSyncService::backend_initialized() const {
91 return false;
94 bool FakeSyncService::IsPassphraseRequiredForDecryption() const {
95 return false;
98 base::Time FakeSyncService::GetExplicitPassphraseTime() const {
99 return base::Time();
102 bool FakeSyncService::IsUsingSecondaryPassphrase() const {
103 return false;
106 void FakeSyncService::EnableEncryptEverything() {
109 void FakeSyncService::SetEncryptionPassphrase(const std::string& passphrase,
110 PassphraseType type) {
113 bool FakeSyncService::SetDecryptionPassphrase(const std::string& passphrase) {
114 return false;
117 bool FakeSyncService::IsPassphraseRequired() const {
118 return false;
121 syncer::ModelTypeSet FakeSyncService::GetEncryptedDataTypes() const {
122 return syncer::ModelTypeSet();
125 } // namespace sync_driver