Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(813)

Unified Diff: components/sync_driver/fake_sync_service.cc

Issue 1158223003: [iOS] Add FakeSyncService and factory for testing (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: components/sync_driver/fake_sync_service.cc
diff --git a/components/sync_driver/fake_sync_service.cc b/components/sync_driver/fake_sync_service.cc
new file mode 100644
index 0000000000000000000000000000000000000000..b2283262548e46935d6ac85921d9f343176f3e95
--- /dev/null
+++ b/components/sync_driver/fake_sync_service.cc
@@ -0,0 +1,123 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "components/sync_driver/fake_sync_service.h"
+
+#include "components/sync_driver/data_type_manager.h"
Nicolas Zea 2015/06/09 21:27:20 is this necessary?
droger 2015/06/10 09:31:56 Removed.
+
+namespace sync_driver {
+
+FakeSyncService::FakeSyncService() : error_(GoogleServiceAuthError::NONE) {
+}
+
+FakeSyncService::~FakeSyncService() {
+}
+
+bool FakeSyncService::HasSyncSetupCompleted() const {
+ return false;
+}
+
+bool FakeSyncService::IsSyncActive() const {
+ return false;
+}
+
+syncer::ModelTypeSet FakeSyncService::GetActiveDataTypes() const {
+ return syncer::ModelTypeSet();
+}
+
+void FakeSyncService::AddObserver(sync_driver::SyncServiceObserver* observer) {
+}
+
+void FakeSyncService::RemoveObserver(
+ sync_driver::SyncServiceObserver* observer) {
+}
+
+bool FakeSyncService::HasObserver(
+ const sync_driver::SyncServiceObserver* observer) const {
+ return false;
+}
+
+bool FakeSyncService::IsSyncEnabledAndLoggedIn() {
+ return false;
+}
+
+void FakeSyncService::DisableForUser() {
+}
+
+void FakeSyncService::RequestStop() {
+}
+
+void FakeSyncService::RequestStart() {
+}
+
+syncer::ModelTypeSet FakeSyncService::GetPreferredDataTypes() const {
+ return syncer::ModelTypeSet();
+}
+
+void FakeSyncService::OnUserChoseDatatypes(bool sync_everything,
+ syncer::ModelTypeSet chosen_types) {
+}
+
+void FakeSyncService::SetSyncSetupCompleted() {
+}
+
+bool FakeSyncService::FirstSetupInProgress() const {
+ return false;
+}
+
+void FakeSyncService::SetSetupInProgress(bool setup_in_progress) {
+}
+
+bool FakeSyncService::setup_in_progress() const {
+ return false;
+}
+
+bool FakeSyncService::ConfigurationDone() const {
+ return false;
+}
+
+const GoogleServiceAuthError& FakeSyncService::GetAuthError() const {
+ return error_;
+}
+
+bool FakeSyncService::HasUnrecoverableError() const {
+ return false;
+}
+
+bool FakeSyncService::backend_initialized() const {
+ return false;
+}
+
+bool FakeSyncService::IsPassphraseRequiredForDecryption() const {
+ return false;
+}
+
+base::Time FakeSyncService::GetExplicitPassphraseTime() const {
+ return base::Time();
+}
+
+bool FakeSyncService::IsUsingSecondaryPassphrase() const {
+ return false;
+}
+
+void FakeSyncService::EnableEncryptEverything() {
+}
+
+void FakeSyncService::SetEncryptionPassphrase(const std::string& passphrase,
+ PassphraseType type) {
+}
+
+bool FakeSyncService::SetDecryptionPassphrase(const std::string& passphrase) {
+ return false;
+}
+
+bool FakeSyncService::IsPassphraseRequired() const {
+ return false;
+}
+
+syncer::ModelTypeSet FakeSyncService::GetEncryptedDataTypes() const {
+ return syncer::ModelTypeSet();
+}
+
+} // namespace sync_driver

Powered by Google App Engine
This is Rietveld 408576698