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

Unified Diff: sync/internal_api/sync_context.h

Issue 351523003: sync: Mass rename of non-blocking sync classes (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: const ref some smart pointers Created 6 years, 6 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 | « sync/internal_api/public/test/null_sync_core_proxy.h ('k') | sync/internal_api/sync_context.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/internal_api/sync_context.h
diff --git a/sync/internal_api/sync_core.h b/sync/internal_api/sync_context.h
similarity index 63%
rename from sync/internal_api/sync_core.h
rename to sync/internal_api/sync_context.h
index 417a296510e961dfb58dc4f5e4ac0b649633d0e3..3dc2ae0de9e914de8a478c814a4e17fbe69bc319 100644
--- a/sync/internal_api/sync_core.h
+++ b/sync/internal_api/sync_context.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_INTERNAL_API_PUBLIC_SYNC_CORE_H_
-#define SYNC_INTERNAL_API_PUBLIC_SYNC_CORE_H_
+#ifndef SYNC_INTERNAL_API_PUBLIC_SYNC_CONTEXT_H_
+#define SYNC_INTERNAL_API_PUBLIC_SYNC_CONTEXT_H_
#include "base/basictypes.h"
#include "base/memory/weak_ptr.h"
@@ -14,7 +14,7 @@
namespace syncer {
class ModelTypeRegistry;
-class NonBlockingTypeProcessor;
+class ModelTypeSyncProxyImpl;
struct DataTypeState;
// An interface of the core parts of sync.
@@ -25,40 +25,40 @@ struct DataTypeState;
// functionality to other classes, and most of the interface is exposed not
// directly here but instead through a per-ModelType class that this class helps
// instantiate.
-class SYNC_EXPORT_PRIVATE SyncCore {
+class SYNC_EXPORT_PRIVATE SyncContext {
public:
- explicit SyncCore(ModelTypeRegistry* model_type_registry);
- ~SyncCore();
+ explicit SyncContext(ModelTypeRegistry* model_type_registry);
+ ~SyncContext();
- // Initializes the connection between the sync core and its delegate on the
- // sync client's thread.
- void ConnectSyncTypeToCore(
+ // Initializes the connection between the sync context on the sync thread and
+ // a proxy for the specified non-blocking sync type that lives on the data
+ // type's thread.
+ void ConnectSyncTypeToWorker(
syncer::ModelType type,
const DataTypeState& data_type_state,
- scoped_refptr<base::SequencedTaskRunner> datatype_task_runner,
- base::WeakPtr<NonBlockingTypeProcessor> sync_client);
+ const scoped_refptr<base::SequencedTaskRunner>& datatype_task_runner,
+ const base::WeakPtr<ModelTypeSyncProxyImpl>& type_sync_proxy);
// Disconnects the syncer from the model and stops syncing the type.
//
// By the time this is called, the model thread should have already
// invalidated the WeakPtr it sent to us in the connect request. Any
- // messages sent to that NonBlockingTypeProcessor will not be recived.
+ // messages sent to that ModelTypeSyncProxy will not be recived.
//
// This is the sync thread's chance to clear state associated with the type.
// It also causes the syncer to stop requesting updates for this type, and to
// abort any in-progress commit requests.
void Disconnect(ModelType type);
- base::WeakPtr<SyncCore> AsWeakPtr();
+ base::WeakPtr<SyncContext> AsWeakPtr();
private:
ModelTypeRegistry* model_type_registry_;
- base::WeakPtrFactory<SyncCore> weak_ptr_factory_;
+ base::WeakPtrFactory<SyncContext> weak_ptr_factory_;
- DISALLOW_COPY_AND_ASSIGN(SyncCore);
+ DISALLOW_COPY_AND_ASSIGN(SyncContext);
};
} // namespace syncer
-#endif // SYNC_INTERNAL_API_PUBLIC_SYNC_CORE_H_
-
+#endif // SYNC_INTERNAL_API_PUBLIC_SYNC_CONTEXT_H_
« no previous file with comments | « sync/internal_api/public/test/null_sync_core_proxy.h ('k') | sync/internal_api/sync_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698