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

Unified Diff: components/sync/engine/sync_engine_host.h

Issue 2533083002: [Sync] SyncEngine refactor part 1: interfaces. (Closed)
Patch Set: Rebase. Created 4 years 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/engine/sync_engine_host.h
diff --git a/components/sync/driver/sync_frontend.h b/components/sync/engine/sync_engine_host.h
similarity index 88%
rename from components/sync/driver/sync_frontend.h
rename to components/sync/engine/sync_engine_host.h
index c68b96a8801b606e9a8289bec10c9a2cc34fdfe4..408fbbc99551fbe04fa03e61defad5f45c6c15e8 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,15 @@ 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
skym 2016/12/02 20:54:55 Line breaks here should get cleaned up.
maxbogue 2016/12/02 23:59:28 Done.
+// that created it and, presumably, is interested in sync-related activity.
+// NOTE: All methods will be invoked by a SyncEngine on the same thread used to
skym 2016/12/02 20:54:55 I worry that this comment is pretty confusing if y
maxbogue 2016/12/02 23:59:28 Changed it, PTAL.
+// create that SyncEngine.
+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
@@ -54,7 +54,7 @@ class SyncFrontend {
// Informs the frontned of some network event. These notifications are
skym 2016/12/02 20:54:55 This misspelling evaded you!
maxbogue 2016/12/02 23:59:28 I'm personally offended by its audacity.
// disabled by default and must be enabled through an explicit request to the
- // SyncBackendHost.
+ // SyncEngine.
//
// It's disabld by default to avoid copying data across threads when no one
// is listening for it.
@@ -91,7 +91,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 +124,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.
+ // Inform the host that new datatypes are available for registration.
skym 2016/12/02 20:54:55 I like the 'Called when...' phrasing more than thi
maxbogue 2016/12/02 23:59:28 Done.
virtual void OnExperimentsChanged(const Experiments& experiments) = 0;
// Called when the sync cycle returns there is an user actionable error.
@@ -141,4 +141,4 @@ class SyncFrontend {
} // namespace syncer
-#endif // COMPONENTS_SYNC_DRIVER_SYNC_FRONTEND_H_
+#endif // COMPONENTS_SYNC_ENGINE_SYNC_ENGINE_HOST_H_

Powered by Google App Engine
This is Rietveld 408576698