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

Unified Diff: chrome/browser/sync/glue/sync_backend_host_mock.h

Issue 1433473007: [NOT FOR REVIEW] Copy of Max's CL with conflicts fixed (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@pss_strings
Patch Set: Created 5 years, 1 month 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: chrome/browser/sync/glue/sync_backend_host_mock.h
diff --git a/chrome/browser/sync/glue/sync_backend_host_mock.h b/chrome/browser/sync/glue/sync_backend_host_mock.h
deleted file mode 100644
index 913ad6006933c413f1542cc188c4f66c327e4b77..0000000000000000000000000000000000000000
--- a/chrome/browser/sync/glue/sync_backend_host_mock.h
+++ /dev/null
@@ -1,131 +0,0 @@
-// Copyright 2013 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.
-
-#ifndef CHROME_BROWSER_SYNC_GLUE_SYNC_BACKEND_HOST_MOCK_H_
-#define CHROME_BROWSER_SYNC_GLUE_SYNC_BACKEND_HOST_MOCK_H_
-
-#include <string>
-
-#include "base/callback.h"
-#include "base/compiler_specific.h"
-#include "chrome/browser/sync/glue/sync_backend_host.h"
-#include "sync/internal_api/public/util/weak_handle.h"
-
-namespace browser_sync {
-
-// A mock of the SyncBackendHost.
-//
-// This class implements the bare minimum required for the ProfileSyncService to
-// get through initialization. It often returns NULL pointers or nonesense
-// values; it is not intended to be used in tests that depend on SyncBackendHost
-// behavior.
-class SyncBackendHostMock : public SyncBackendHost {
- public:
- SyncBackendHostMock();
- ~SyncBackendHostMock() override;
-
- void Initialize(
- sync_driver::SyncFrontend* frontend,
- scoped_ptr<base::Thread> sync_thread,
- const scoped_refptr<base::SingleThreadTaskRunner>& db_thread,
- const scoped_refptr<base::SingleThreadTaskRunner>& file_thread,
- const syncer::WeakHandle<syncer::JsEventHandler>& event_handler,
- const GURL& service_url,
- const std::string& sync_user_agent,
- const syncer::SyncCredentials& credentials,
- bool delete_sync_data_folder,
- scoped_ptr<syncer::SyncManagerFactory> sync_manager_factory,
- const syncer::WeakHandle<syncer::UnrecoverableErrorHandler>&
- unrecoverable_error_handler,
- const base::Closure& report_unrecoverable_error_function,
- const HttpPostProviderFactoryGetter& http_post_provider_factory_getter,
- scoped_ptr<syncer::SyncEncryptionHandler::NigoriState> saved_nigori_state)
- override;
-
- void TriggerRefresh(const syncer::ModelTypeSet& types) override;
-
- void UpdateCredentials(const syncer::SyncCredentials& credentials) override;
-
- void StartSyncingWithServer() override;
-
- void SetEncryptionPassphrase(const std::string& passphrase,
- bool is_explicit) override;
-
- bool SetDecryptionPassphrase(const std::string& passphrase) override;
-
- void StopSyncingForShutdown() override;
-
- scoped_ptr<base::Thread> Shutdown(syncer::ShutdownReason reason) override;
-
- void UnregisterInvalidationIds() override;
-
- syncer::ModelTypeSet ConfigureDataTypes(
- syncer::ConfigureReason reason,
- const DataTypeConfigStateMap& config_state_map,
- const base::Callback<void(syncer::ModelTypeSet, syncer::ModelTypeSet)>&
- ready_task,
- const base::Callback<void()>& retry_callback) override;
-
- void EnableEncryptEverything() override;
-
- void ActivateDirectoryDataType(
- syncer::ModelType type,
- syncer::ModelSafeGroup group,
- sync_driver::ChangeProcessor* change_processor) override;
- void DeactivateDirectoryDataType(syncer::ModelType type) override;
-
- void ActivateNonBlockingDataType(
- syncer::ModelType type,
- scoped_ptr<syncer_v2::ActivationContext>) override;
- void DeactivateNonBlockingDataType(syncer::ModelType type) override;
-
- syncer::UserShare* GetUserShare() const override;
-
- Status GetDetailedStatus() override;
-
- syncer::sessions::SyncSessionSnapshot GetLastSessionSnapshot() const override;
-
- bool HasUnsyncedItems() const override;
-
- bool IsNigoriEnabled() const override;
-
- syncer::PassphraseType GetPassphraseType() const override;
-
- base::Time GetExplicitPassphraseTime() const override;
-
- bool IsCryptographerReady(
- const syncer::BaseTransaction* trans) const override;
-
- void GetModelSafeRoutingInfo(
- syncer::ModelSafeRoutingInfo* out) const override;
-
- void FlushDirectory() const override;
-
- void RequestBufferedProtocolEventsAndEnableForwarding() override;
- void DisableProtocolEventForwarding() override;
-
- void EnableDirectoryTypeDebugInfoForwarding() override;
- void DisableDirectoryTypeDebugInfoForwarding() override;
-
- void GetAllNodesForTypes(
- syncer::ModelTypeSet types,
- base::Callback<void(const std::vector<syncer::ModelType>& type,
- ScopedVector<base::ListValue>)> callback) override;
-
- base::MessageLoop* GetSyncLoopForTesting() override;
-
- void RefreshTypesForTest(syncer::ModelTypeSet types) override;
-
- void ClearServerData(
- const syncer::SyncManager::ClearServerDataCallback& callback) override;
-
- void set_fail_initial_download(bool should_fail);
-
- private:
- bool fail_initial_download_;
-};
-
-} // namespace browser_sync
-
-#endif // CHROME_BROWSER_SYNC_GLUE_SYNC_BACKEND_HOST_MOCK_H_
« no previous file with comments | « chrome/browser/sync/glue/sync_backend_host_impl_unittest.cc ('k') | chrome/browser/sync/glue/sync_backend_host_mock.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698