summaryrefslogtreecommitdiffstats
path: root/sync/sessions
diff options
context:
space:
mode:
authormaxbogue <maxbogue@chromium.org>2015-09-09 02:13:18 -0700
committerCommit bot <commit-bot@chromium.org>2015-09-09 09:13:47 +0000
commit4824734c493af37e7602a27004bbc4a88aa04d6e (patch)
tree70a6d541c7e3aa8a27186c67e771db5986ecca1e /sync/sessions
parentffc4df78aec4cec783d52fc5a3390654e3d97dba (diff)
downloadchromium_src-4824734c493af37e7602a27004bbc4a88aa04d6e.zip
chromium_src-4824734c493af37e7602a27004bbc4a88aa04d6e.tar.gz
chromium_src-4824734c493af37e7602a27004bbc4a88aa04d6e.tar.bz2
[Sync] Use ModelTypeProcessor instead of ModelTypeProcessorImpl.
This CL doesn't touch ModelTypeProcessorImpl in DataTypeController because ModelTypeProcessor doesn't have the functionality for it. Those uses will be removed in a separate refactor. Also fixes a bunch of incorrect variable names. BUG=517953 Review URL: https://codereview.chromium.org/1321613003 Cr-Commit-Position: refs/heads/master@{#347880}
Diffstat (limited to 'sync/sessions')
-rw-r--r--sync/sessions/model_type_registry.cc12
-rw-r--r--sync/sessions/model_type_registry.h5
2 files changed, 9 insertions, 8 deletions
diff --git a/sync/sessions/model_type_registry.cc b/sync/sessions/model_type_registry.cc
index 552f4b1..f0375f7 100644
--- a/sync/sessions/model_type_registry.cc
+++ b/sync/sessions/model_type_registry.cc
@@ -191,27 +191,27 @@ void ModelTypeRegistry::ConnectSyncTypeToWorker(
const syncer_v2::DataTypeState& data_type_state,
const syncer_v2::UpdateResponseDataList& saved_pending_updates,
const scoped_refptr<base::SequencedTaskRunner>& type_task_runner,
- const base::WeakPtr<syncer_v2::ModelTypeProcessorImpl>& processor_impl) {
+ const base::WeakPtr<syncer_v2::ModelTypeProcessor>& type_processor) {
DVLOG(1) << "Enabling an off-thread sync type: " << ModelTypeToString(type);
// Initialize Worker -> Processor communication channel.
- scoped_ptr<syncer_v2::ModelTypeProcessor> processor(
- new ModelTypeProcessorProxy(processor_impl, type_task_runner));
+ scoped_ptr<syncer_v2::ModelTypeProcessor> processor_proxy(
+ new ModelTypeProcessorProxy(type_processor, type_task_runner));
scoped_ptr<Cryptographer> cryptographer_copy;
if (encrypted_types_.Has(type))
cryptographer_copy.reset(new Cryptographer(*cryptographer_));
scoped_ptr<syncer_v2::ModelTypeWorker> worker(new syncer_v2::ModelTypeWorker(
type, data_type_state, saved_pending_updates, cryptographer_copy.Pass(),
- nudge_handler_, processor.Pass()));
+ nudge_handler_, processor_proxy.Pass()));
// Initialize Processor -> Worker communication channel.
scoped_ptr<syncer_v2::CommitQueue> commit_queue_proxy(new CommitQueueProxy(
worker->AsWeakPtr(), scoped_refptr<base::SequencedTaskRunner>(
base::ThreadTaskRunnerHandle::Get())));
type_task_runner->PostTask(
- FROM_HERE, base::Bind(&syncer_v2::ModelTypeProcessorImpl::OnConnect,
- processor_impl, base::Passed(&commit_queue_proxy)));
+ FROM_HERE, base::Bind(&syncer_v2::ModelTypeProcessor::OnConnect,
+ type_processor, base::Passed(&commit_queue_proxy)));
DCHECK(update_handler_map_.find(type) == update_handler_map_.end());
DCHECK(commit_contributor_map_.find(type) == commit_contributor_map_.end());
diff --git a/sync/sessions/model_type_registry.h b/sync/sessions/model_type_registry.h
index a27468e..9e097cf 100644
--- a/sync/sessions/model_type_registry.h
+++ b/sync/sessions/model_type_registry.h
@@ -22,7 +22,7 @@
namespace syncer_v2 {
struct DataTypeState;
-class ModelTypeProcessorImpl;
+class ModelTypeProcessor;
class ModelTypeWorker;
}
@@ -66,7 +66,8 @@ class SYNC_EXPORT_PRIVATE ModelTypeRegistry
const syncer_v2::DataTypeState& data_type_state,
const syncer_v2::UpdateResponseDataList& saved_pending_updates,
const scoped_refptr<base::SequencedTaskRunner>& type_task_runner,
- const base::WeakPtr<syncer_v2::ModelTypeProcessorImpl>& proxy) override;
+ const base::WeakPtr<syncer_v2::ModelTypeProcessor>& type_processor)
+ override;
// Disables the syncing of an off-thread type.
//