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

Unified Diff: sync/engine/model_type_processor_impl.h

Issue 1325453003: [Sync] rename USS processor / worker interfaces (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 4 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
Index: sync/engine/model_type_processor_impl.h
diff --git a/sync/engine/model_type_sync_proxy_impl.h b/sync/engine/model_type_processor_impl.h
similarity index 86%
rename from sync/engine/model_type_sync_proxy_impl.h
rename to sync/engine/model_type_processor_impl.h
index 4346e2c76e6ac0b566e6ed01fecd0d4731f9036c..eb6ed2c5f889f59ddf342fb13a234bfde3b093b1 100644
--- a/sync/engine/model_type_sync_proxy_impl.h
+++ b/sync/engine/model_type_processor_impl.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 SYNC_ENGINE_MODEL_TYPE_SYNC_PROXY_IMPL_H_
-#define SYNC_ENGINE_MODEL_TYPE_SYNC_PROXY_IMPL_H_
+#ifndef SYNC_ENGINE_MODEL_TYPE_PROCESSOR_IMPL_H_
+#define SYNC_ENGINE_MODEL_TYPE_PROCESSOR_IMPL_H_
#include "base/containers/scoped_ptr_map.h"
#include "base/memory/scoped_ptr.h"
@@ -17,14 +17,14 @@
namespace syncer_v2 {
class SyncContextProxy;
class ModelTypeEntity;
-class ModelTypeSyncWorker;
+class CommitQueue;
// A sync component embedded on the synced type's thread that helps to handle
// communication between sync and model type threads.
-class SYNC_EXPORT_PRIVATE ModelTypeSyncProxyImpl : base::NonThreadSafe {
+class SYNC_EXPORT_PRIVATE ModelTypeProcessorImpl : base::NonThreadSafe {
public:
- ModelTypeSyncProxyImpl(syncer::ModelType type);
- virtual ~ModelTypeSyncProxyImpl();
+ ModelTypeProcessorImpl(syncer::ModelType type);
+ virtual ~ModelTypeProcessorImpl();
// Returns true if this object believes that sync is preferred for this type.
//
@@ -56,7 +56,7 @@ class SYNC_EXPORT_PRIVATE ModelTypeSyncProxyImpl : base::NonThreadSafe {
void Disconnect();
// Callback used to process the handshake response.
- void OnConnect(scoped_ptr<ModelTypeSyncWorker> worker);
+ void OnConnect(scoped_ptr<CommitQueue> worker);
// Requests that an item be stored in sync.
void Put(const std::string& client_tag,
@@ -86,7 +86,7 @@ class SYNC_EXPORT_PRIVATE ModelTypeSyncProxyImpl : base::NonThreadSafe {
// Returns the long-lived WeakPtr that is intended to be registered with the
// ProfileSyncService.
- base::WeakPtr<ModelTypeSyncProxyImpl> AsWeakPtrForUI();
+ base::WeakPtr<ModelTypeProcessorImpl> AsWeakPtrForUI();
private:
typedef base::ScopedPtrMap<std::string, scoped_ptr<ModelTypeEntity>>
@@ -98,7 +98,7 @@ class SYNC_EXPORT_PRIVATE ModelTypeSyncProxyImpl : base::NonThreadSafe {
void FlushPendingCommitRequests();
// Clears any state related to outstanding communications with the
- // ModelTypeSyncWorker. Used when we want to disconnect from
+ // CommitQueue. Used when we want to disconnect from
// the current worker.
void ClearTransientSyncState();
@@ -124,12 +124,12 @@ class SYNC_EXPORT_PRIVATE ModelTypeSyncProxyImpl : base::NonThreadSafe {
// connected to sync.
scoped_ptr<SyncContextProxy> sync_context_proxy_;
- // Reference to the ModelTypeSyncWorker.
+ // Reference to the CommitQueue.
//
// The interface hides the posting of tasks across threads as well as the
- // ModelTypeSyncWorker's implementation. Both of these features are
+ // CommitQueue's implementation. Both of these features are
// useful in tests.
- scoped_ptr<ModelTypeSyncWorker> worker_;
+ scoped_ptr<CommitQueue> worker_;
// The set of sync entities known to this object.
EntityMap entities_;
@@ -144,10 +144,10 @@ class SYNC_EXPORT_PRIVATE ModelTypeSyncProxyImpl : base::NonThreadSafe {
// thread, we want to make sure that no tasks generated as part of the
// now-obsolete connection to affect us. But we also want the WeakPtr we
// sent to the UI thread to remain valid.
- base::WeakPtrFactory<ModelTypeSyncProxyImpl> weak_ptr_factory_for_ui_;
- base::WeakPtrFactory<ModelTypeSyncProxyImpl> weak_ptr_factory_for_sync_;
+ base::WeakPtrFactory<ModelTypeProcessorImpl> weak_ptr_factory_for_ui_;
+ base::WeakPtrFactory<ModelTypeProcessorImpl> weak_ptr_factory_for_sync_;
};
} // namespace syncer
-#endif // SYNC_ENGINE_MODEL_TYPE_SYNC_PROXY_IMPL_H_
+#endif // SYNC_ENGINE_MODEL_TYPE_PROCESSOR_IMPL_H_

Powered by Google App Engine
This is Rietveld 408576698