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

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: Review comments 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
« no previous file with comments | « components/sync_driver/fake_sync_service.h ('k') | ios/ios_tests.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..81aeed6cd6bff2a5ce1d38f01d1212828884820d
--- /dev/null
+++ b/components/sync_driver/fake_sync_service.cc
@@ -0,0 +1,121 @@
+// 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"
+
+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
« no previous file with comments | « components/sync_driver/fake_sync_service.h ('k') | ios/ios_tests.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698