Infobar material design refresh: bg color
[chromium-blink-merge.git] / components / sync_driver / fake_sync_service.cc
blob371d735f9939f82c398238e12c71138ed8c41140
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 #include "base/values.h"
8 #include "sync/internal_api/public/base_transaction.h"
9 #include "sync/internal_api/public/sessions/sync_session_snapshot.h"
10 #include "sync/internal_api/public/user_share.h"
12 namespace sync_driver {
14 FakeSyncService::FakeSyncService() : error_(GoogleServiceAuthError::NONE) {
17 FakeSyncService::~FakeSyncService() {
20 bool FakeSyncService::HasSyncSetupCompleted() const {
21 return false;
24 bool FakeSyncService::IsSyncAllowed() const {
25 return false;
28 bool FakeSyncService::IsSyncActive() const {
29 return false;
32 syncer::ModelTypeSet FakeSyncService::GetActiveDataTypes() const {
33 return syncer::ModelTypeSet();
36 void FakeSyncService::AddObserver(SyncServiceObserver* observer) {
39 void FakeSyncService::RemoveObserver(SyncServiceObserver* observer) {
42 bool FakeSyncService::HasObserver(const SyncServiceObserver* observer) const {
43 return false;
46 bool FakeSyncService::CanSyncStart() const {
47 return false;
50 void FakeSyncService::OnDataTypeRequestsSyncStartup(syncer::ModelType type) {
53 void FakeSyncService::RequestStop(
54 sync_driver::SyncService::SyncStopDataFate data_fate) {
57 void FakeSyncService::RequestStart() {
60 syncer::ModelTypeSet FakeSyncService::GetPreferredDataTypes() const {
61 return syncer::ModelTypeSet();
64 void FakeSyncService::OnUserChoseDatatypes(bool sync_everything,
65 syncer::ModelTypeSet chosen_types) {
68 void FakeSyncService::SetSyncSetupCompleted() {
71 bool FakeSyncService::FirstSetupInProgress() const {
72 return false;
75 void FakeSyncService::SetSetupInProgress(bool setup_in_progress) {
78 bool FakeSyncService::setup_in_progress() const {
79 return false;
82 bool FakeSyncService::ConfigurationDone() const {
83 return false;
86 const GoogleServiceAuthError& FakeSyncService::GetAuthError() const {
87 return error_;
90 bool FakeSyncService::HasUnrecoverableError() const {
91 return false;
94 bool FakeSyncService::backend_initialized() const {
95 return false;
98 OpenTabsUIDelegate* FakeSyncService::GetOpenTabsUIDelegate() {
99 return nullptr;
102 bool FakeSyncService::IsPassphraseRequiredForDecryption() const {
103 return false;
106 base::Time FakeSyncService::GetExplicitPassphraseTime() const {
107 return base::Time();
110 bool FakeSyncService::IsUsingSecondaryPassphrase() const {
111 return false;
114 void FakeSyncService::EnableEncryptEverything() {
117 bool FakeSyncService::EncryptEverythingEnabled() const {
118 return false;
121 void FakeSyncService::SetEncryptionPassphrase(const std::string& passphrase,
122 PassphraseType type) {
125 bool FakeSyncService::SetDecryptionPassphrase(const std::string& passphrase) {
126 return false;
129 bool FakeSyncService::IsCryptographerReady(
130 const syncer::BaseTransaction* trans) const {
131 return false;
134 syncer::UserShare* FakeSyncService::GetUserShare() const {
135 return new syncer::UserShare();
138 LocalDeviceInfoProvider* FakeSyncService::GetLocalDeviceInfoProvider() const {
139 return nullptr;
142 void FakeSyncService::RegisterDataTypeController(
143 sync_driver::DataTypeController* data_type_controller) {
146 void FakeSyncService::ReenableDatatype(syncer::ModelType type) {}
148 void FakeSyncService::DeactivateDataType(syncer::ModelType type) {}
150 bool FakeSyncService::IsPassphraseRequired() const {
151 return false;
154 syncer::ModelTypeSet FakeSyncService::GetEncryptedDataTypes() const {
155 return syncer::ModelTypeSet();
158 FakeSyncService::SyncTokenStatus FakeSyncService::GetSyncTokenStatus() const {
159 return FakeSyncService::SyncTokenStatus();
162 std::string FakeSyncService::QuerySyncStatusSummaryString() {
163 return "";
166 bool FakeSyncService::QueryDetailedSyncStatus(syncer::SyncStatus* result) {
167 return false;
170 base::string16 FakeSyncService::GetLastSyncedTimeString() const {
171 return base::string16();
174 std::string FakeSyncService::GetBackendInitializationStateString() const {
175 return std::string();
178 syncer::sessions::SyncSessionSnapshot FakeSyncService::GetLastSessionSnapshot()
179 const {
180 return syncer::sessions::SyncSessionSnapshot();
183 base::Value* FakeSyncService::GetTypeStatusMap() const {
184 return new base::ListValue();
187 const GURL& FakeSyncService::sync_service_url() const {
188 return sync_service_url_;
191 std::string FakeSyncService::unrecoverable_error_message() const {
192 return unrecoverable_error_message_;
195 tracked_objects::Location FakeSyncService::unrecoverable_error_location()
196 const {
197 return tracked_objects::Location();
200 } // namespace sync_driver