| Index: components/sync/engine/sync_engine_host.h
|
| diff --git a/components/sync/driver/sync_frontend.h b/components/sync/engine/sync_engine_host.h
|
| similarity index 84%
|
| rename from components/sync/driver/sync_frontend.h
|
| rename to components/sync/engine/sync_engine_host.h
|
| index c68b96a8801b606e9a8289bec10c9a2cc34fdfe4..55b670b5717333e5c51c707ba363d357aae94e60 100644
|
| --- a/components/sync/driver/sync_frontend.h
|
| +++ b/components/sync/engine/sync_engine_host.h
|
| @@ -2,8 +2,8 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| -#ifndef COMPONENTS_SYNC_DRIVER_SYNC_FRONTEND_H_
|
| -#define COMPONENTS_SYNC_DRIVER_SYNC_FRONTEND_H_
|
| +#ifndef COMPONENTS_SYNC_ENGINE_SYNC_ENGINE_HOST_H_
|
| +#define COMPONENTS_SYNC_ENGINE_SYNC_ENGINE_HOST_H_
|
|
|
| #include <string>
|
|
|
| @@ -26,15 +26,13 @@ struct CommitCounters;
|
| struct StatusCounters;
|
| struct UpdateCounters;
|
|
|
| -// SyncFrontend is the interface used by SyncBackendHost to communicate with
|
| -// the entity that created it and, presumably, is interested in sync-related
|
| -// activity.
|
| -// NOTE: All methods will be invoked by a SyncBackendHost on the same thread
|
| -// used to create that SyncBackendHost.
|
| -class SyncFrontend {
|
| +// SyncEngineHost is the interface used by SyncEngine to communicate with the
|
| +// entity that created it. It's essentially an observer interface except the
|
| +// SyncEngine always has exactly one.
|
| +class SyncEngineHost {
|
| public:
|
| - SyncFrontend();
|
| - virtual ~SyncFrontend();
|
| + SyncEngineHost();
|
| + virtual ~SyncEngineHost();
|
|
|
| // The backend has completed initialization and it is now ready to
|
| // accept and process changes. If success is false, initialization
|
| @@ -52,11 +50,10 @@ class SyncFrontend {
|
| // The backend queried the server recently and received some updates.
|
| virtual void OnSyncCycleCompleted() = 0;
|
|
|
| - // Informs the frontned of some network event. These notifications are
|
| - // disabled by default and must be enabled through an explicit request to the
|
| - // SyncBackendHost.
|
| + // Informs the host of some network event. These notifications are disabled by
|
| + // default and must be enabled through an explicit request to the SyncEngine.
|
| //
|
| - // It's disabld by default to avoid copying data across threads when no one
|
| + // It's disabled by default to avoid copying data across threads when no one
|
| // is listening for it.
|
| virtual void OnProtocolEvent(const ProtocolEvent& event) = 0;
|
|
|
| @@ -91,7 +88,7 @@ class SyncFrontend {
|
| // called when the first sensitive data type is setup by the user and anytime
|
| // the passphrase is changed by another synced client. |reason| denotes why
|
| // the passphrase was required. |pending_keys| is a copy of the
|
| - // cryptographer's pending keys to be passed on to the frontend in order to
|
| + // cryptographer's pending keys to be passed on to the host in order to
|
| // be cached.
|
| virtual void OnPassphraseRequired(
|
| PassphraseRequiredReason reason,
|
| @@ -124,7 +121,7 @@ class SyncFrontend {
|
| // Called to perform migration of |types|.
|
| virtual void OnMigrationNeededForTypes(ModelTypeSet types) = 0;
|
|
|
| - // Inform the Frontend that new datatypes are available for registration.
|
| + // Called when new datatypes are available for registration.
|
| virtual void OnExperimentsChanged(const Experiments& experiments) = 0;
|
|
|
| // Called when the sync cycle returns there is an user actionable error.
|
| @@ -141,4 +138,4 @@ class SyncFrontend {
|
|
|
| } // namespace syncer
|
|
|
| -#endif // COMPONENTS_SYNC_DRIVER_SYNC_FRONTEND_H_
|
| +#endif // COMPONENTS_SYNC_ENGINE_SYNC_ENGINE_HOST_H_
|
|
|