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

Unified Diff: components/sync/driver/sync_frontend.h

Issue 2376123003: [Sync] Move //components/sync to the syncer namespace. (Closed)
Patch Set: Rebase. Created 4 years, 3 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/sync_error_controller.cc ('k') | components/sync/driver/sync_frontend.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/sync/driver/sync_frontend.h
diff --git a/components/sync/driver/sync_frontend.h b/components/sync/driver/sync_frontend.h
index ae2239a33223cb6abcb4ba87218bc518abcfe9b1..594f85740326fac8f423365f0daf2f7f64d7bb2a 100644
--- a/components/sync/driver/sync_frontend.h
+++ b/components/sync/driver/sync_frontend.h
@@ -13,20 +13,18 @@
#include "components/sync/core/sync_manager.h"
#include "components/sync/protocol/sync_protocol_error.h"
+namespace sync_pb {
+class EncryptedData;
+} // namespace sync_pb
+
namespace syncer {
+
class DataTypeDebugInfoListener;
class JsBackend;
class ProtocolEvent;
struct CommitCounters;
struct StatusCounters;
struct UpdateCounters;
-} // namespace syncer
-
-namespace sync_pb {
-class EncryptedData;
-} // namespace sync_pb
-
-namespace sync_driver {
// SyncFrontend is the interface used by SyncBackendHost to communicate with
// the entity that created it and, presumably, is interested in sync-related
@@ -46,9 +44,8 @@ class SyncFrontend {
// from the 'Backend' in 'OnBackendInitialized' (unfortunately). It
// is initialized only if |success| is true.
virtual void OnBackendInitialized(
- const syncer::WeakHandle<syncer::JsBackend>& js_backend,
- const syncer::WeakHandle<syncer::DataTypeDebugInfoListener>&
- debug_info_listener,
+ const WeakHandle<JsBackend>& js_backend,
+ const WeakHandle<DataTypeDebugInfoListener>& debug_info_listener,
const std::string& cache_guid,
bool success) = 0;
@@ -61,34 +58,34 @@ class SyncFrontend {
//
// It's disabld by default to avoid copying data across threads when no one
// is listening for it.
- virtual void OnProtocolEvent(const syncer::ProtocolEvent& event) = 0;
+ virtual void OnProtocolEvent(const ProtocolEvent& event) = 0;
// Called when we receive an updated commit counter for a directory type.
//
// Disabled by default. Enable by calling
// EnableDirectoryTypeDebugInfoForwarding() on the backend.
virtual void OnDirectoryTypeCommitCounterUpdated(
- syncer::ModelType type,
- const syncer::CommitCounters& counters) = 0;
+ ModelType type,
+ const CommitCounters& counters) = 0;
// Called when we receive an updated update counter for a directory type.
//
// Disabled by default. Enable by calling
// EnableDirectoryTypeDebugInfoForwarding() on the backend.
virtual void OnDirectoryTypeUpdateCounterUpdated(
- syncer::ModelType type,
- const syncer::UpdateCounters& counters) = 0;
+ ModelType type,
+ const UpdateCounters& counters) = 0;
// Called when we receive an updated status counter for a directory type.
//
// Disabled by default. Enable by calling
// EnableDirectoryTypeDebugInfoForwarding() on the backend.
virtual void OnDirectoryTypeStatusCounterUpdated(
- syncer::ModelType type,
- const syncer::StatusCounters& counters) = 0;
+ ModelType type,
+ const StatusCounters& counters) = 0;
// The status of the connection to the sync server has changed.
- virtual void OnConnectionStatusChange(syncer::ConnectionStatus status) = 0;
+ virtual void OnConnectionStatusChange(ConnectionStatus status) = 0;
// The syncer requires a passphrase to decrypt sensitive updates. This is
// called when the first sensitive data type is setup by the user and anytime
@@ -97,7 +94,7 @@ class SyncFrontend {
// cryptographer's pending keys to be passed on to the frontend in order to
// be cached.
virtual void OnPassphraseRequired(
- syncer::PassphraseRequiredReason reason,
+ PassphraseRequiredReason reason,
const sync_pb::EncryptedData& pending_keys) = 0;
// Called when the passphrase provided by the user is
@@ -111,13 +108,13 @@ class SyncFrontend {
// below).
//
// |encrypted_types| will always be a superset of
- // syncer::Cryptographer::SensitiveTypes(). If |encrypt_everything| is
+ // Cryptographer::SensitiveTypes(). If |encrypt_everything| is
// true, |encrypted_types| will be the set of all known types.
//
// Until this function is called, observers can assume that the set
- // of encrypted types is syncer::Cryptographer::SensitiveTypes() and that
+ // of encrypted types is Cryptographer::SensitiveTypes() and that
// the encrypt everything flag is false.
- virtual void OnEncryptedTypesChanged(syncer::ModelTypeSet encrypted_types,
+ virtual void OnEncryptedTypesChanged(ModelTypeSet encrypted_types,
bool encrypt_everything) = 0;
// Called after we finish encrypting the current set of encrypted
@@ -125,13 +122,13 @@ class SyncFrontend {
virtual void OnEncryptionComplete() = 0;
// Called to perform migration of |types|.
- virtual void OnMigrationNeededForTypes(syncer::ModelTypeSet types) = 0;
+ virtual void OnMigrationNeededForTypes(ModelTypeSet types) = 0;
// Inform the Frontend that new datatypes are available for registration.
- virtual void OnExperimentsChanged(const syncer::Experiments& experiments) = 0;
+ virtual void OnExperimentsChanged(const Experiments& experiments) = 0;
// Called when the sync cycle returns there is an user actionable error.
- virtual void OnActionableError(const syncer::SyncProtocolError& error) = 0;
+ virtual void OnActionableError(const SyncProtocolError& error) = 0;
// Called when the user of this device enables passphrase encryption.
//
@@ -139,9 +136,9 @@ class SyncFrontend {
// and can be used to restore SyncEncryptionHandler's state across sync
// backend instances. See also SyncEncryptionHandlerImpl::RestoreNigori.
virtual void OnLocalSetPassphraseEncryption(
- const syncer::SyncEncryptionHandler::NigoriState& nigori_state) = 0;
+ const SyncEncryptionHandler::NigoriState& nigori_state) = 0;
};
-} // namespace sync_driver
+} // namespace syncer
#endif // COMPONENTS_SYNC_DRIVER_SYNC_FRONTEND_H_
« no previous file with comments | « components/sync/driver/sync_error_controller.cc ('k') | components/sync/driver/sync_frontend.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698