summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--components/sync_driver/non_blocking_data_type_controller.h4
-rw-r--r--components/sync_driver/non_blocking_data_type_controller_unittest.cc134
-rw-r--r--sync/engine/model_type_processor_impl_unittest.cc49
-rw-r--r--sync/internal_api/public/sync_context.h4
-rw-r--r--sync/internal_api/public/sync_context_proxy.h4
-rw-r--r--sync/internal_api/public/test/null_sync_context_proxy.h4
-rw-r--r--sync/internal_api/sync_context_proxy_impl.cc4
-rw-r--r--sync/internal_api/sync_context_proxy_impl.h4
-rw-r--r--sync/internal_api/test/null_sync_context_proxy.cc2
-rw-r--r--sync/sessions/model_type_registry.cc12
-rw-r--r--sync/sessions/model_type_registry.h5
-rw-r--r--sync/test/engine/injectable_sync_context_proxy.cc6
-rw-r--r--sync/test/engine/injectable_sync_context_proxy.h6
13 files changed, 119 insertions, 119 deletions
diff --git a/components/sync_driver/non_blocking_data_type_controller.h b/components/sync_driver/non_blocking_data_type_controller.h
index cddf2af..5faa79f 100644
--- a/components/sync_driver/non_blocking_data_type_controller.h
+++ b/components/sync_driver/non_blocking_data_type_controller.h
@@ -11,8 +11,8 @@
#include "sync/internal_api/public/base/model_type.h"
#include "sync/internal_api/public/sync_context_proxy.h"
-namespace syncer {
-class ModelTypeProcessor;
+namespace syncer_v2 {
+class ModelTypeProcessorImpl;
}
namespace sync_driver_v2 {
diff --git a/components/sync_driver/non_blocking_data_type_controller_unittest.cc b/components/sync_driver/non_blocking_data_type_controller_unittest.cc
index 02871ac..c0e0ecb 100644
--- a/components/sync_driver/non_blocking_data_type_controller_unittest.cc
+++ b/components/sync_driver/non_blocking_data_type_controller_unittest.cc
@@ -47,11 +47,11 @@ class MockSyncContext {
void Connect(
syncer::ModelType type,
const scoped_refptr<base::SingleThreadTaskRunner>& model_task_runner,
- const base::WeakPtr<syncer_v2::ModelTypeProcessorImpl>& type_proxy) {
+ const base::WeakPtr<syncer_v2::ModelTypeProcessor>& type_processor) {
enabled_types_.Put(type);
model_task_runner->PostTask(
FROM_HERE,
- base::Bind(&syncer_v2::ModelTypeProcessorImpl::OnConnect, type_proxy,
+ base::Bind(&syncer_v2::ModelTypeProcessor::OnConnect, type_processor,
base::Passed(scoped_ptr<syncer_v2::CommitQueue>(
new NullCommitQueue())
.Pass())));
@@ -83,7 +83,7 @@ class MockSyncContextProxy : public syncer_v2::SyncContextProxy {
syncer::ModelType type,
const syncer_v2::DataTypeState& data_type_state,
const syncer_v2::UpdateResponseDataList& saved_pending_updates,
- const base::WeakPtr<syncer_v2::ModelTypeProcessorImpl>& type_proxy)
+ const base::WeakPtr<syncer_v2::ModelTypeProcessor>& type_processor)
override {
// Normally we'd use ThreadTaskRunnerHandle::Get() as the TaskRunner
// argument
@@ -94,7 +94,7 @@ class MockSyncContextProxy : public syncer_v2::SyncContextProxy {
base::Unretained(mock_sync_context_),
type,
model_task_runner_,
- type_proxy));
+ type_processor));
}
void Disconnect(syncer::ModelType type) override {
@@ -120,7 +120,7 @@ class MockSyncContextProxy : public syncer_v2::SyncContextProxy {
class NonBlockingDataTypeControllerTest : public testing::Test {
public:
NonBlockingDataTypeControllerTest()
- : type_sync_proxy_(syncer::DICTIONARY),
+ : type_processor_(syncer::DICTIONARY),
model_thread_(new base::TestSimpleTaskRunner()),
sync_thread_(new base::TestSimpleTaskRunner()),
controller_(syncer::DICTIONARY, true),
@@ -132,7 +132,7 @@ class NonBlockingDataTypeControllerTest : public testing::Test {
// Connects the sync type proxy to the NonBlockingDataTypeController.
void InitTypeSyncProxy() {
controller_.InitializeType(model_thread_,
- type_sync_proxy_.AsWeakPtrForUI());
+ type_processor_.AsWeakPtrForUI());
if (auto_run_tasks_) {
RunAllTasks();
}
@@ -182,7 +182,7 @@ class NonBlockingDataTypeControllerTest : public testing::Test {
}
protected:
- syncer_v2::ModelTypeProcessorImpl type_sync_proxy_;
+ syncer_v2::ModelTypeProcessorImpl type_processor_;
scoped_refptr<base::TestSimpleTaskRunner> model_thread_;
scoped_refptr<base::TestSimpleTaskRunner> sync_thread_;
@@ -200,45 +200,45 @@ TEST_F(NonBlockingDataTypeControllerTest, UserDisabled) {
InitTypeSyncProxy();
InitSyncBackend();
- EXPECT_FALSE(type_sync_proxy_.IsPreferred());
- EXPECT_FALSE(type_sync_proxy_.IsConnected());
+ EXPECT_FALSE(type_processor_.IsPreferred());
+ EXPECT_FALSE(type_processor_.IsConnected());
UninitializeSyncBackend();
- EXPECT_FALSE(type_sync_proxy_.IsPreferred());
- EXPECT_FALSE(type_sync_proxy_.IsConnected());
+ EXPECT_FALSE(type_processor_.IsPreferred());
+ EXPECT_FALSE(type_processor_.IsConnected());
}
// Init the sync backend then the type sync proxy.
TEST_F(NonBlockingDataTypeControllerTest, Enabled_SyncFirst) {
SetIsPreferred(true);
InitSyncBackend();
- EXPECT_FALSE(type_sync_proxy_.IsPreferred());
- EXPECT_FALSE(type_sync_proxy_.IsConnected());
+ EXPECT_FALSE(type_processor_.IsPreferred());
+ EXPECT_FALSE(type_processor_.IsConnected());
InitTypeSyncProxy();
- EXPECT_TRUE(type_sync_proxy_.IsPreferred());
- EXPECT_TRUE(type_sync_proxy_.IsConnected());
+ EXPECT_TRUE(type_processor_.IsPreferred());
+ EXPECT_TRUE(type_processor_.IsConnected());
UninitializeSyncBackend();
- EXPECT_TRUE(type_sync_proxy_.IsPreferred());
- EXPECT_FALSE(type_sync_proxy_.IsConnected());
+ EXPECT_TRUE(type_processor_.IsPreferred());
+ EXPECT_FALSE(type_processor_.IsConnected());
}
// Init the type sync proxy then the sync backend.
TEST_F(NonBlockingDataTypeControllerTest, Enabled_ProcessorFirst) {
SetIsPreferred(true);
InitTypeSyncProxy();
- EXPECT_FALSE(type_sync_proxy_.IsPreferred());
- EXPECT_FALSE(type_sync_proxy_.IsConnected());
+ EXPECT_FALSE(type_processor_.IsPreferred());
+ EXPECT_FALSE(type_processor_.IsConnected());
InitSyncBackend();
- EXPECT_TRUE(type_sync_proxy_.IsPreferred());
- EXPECT_TRUE(type_sync_proxy_.IsConnected());
+ EXPECT_TRUE(type_processor_.IsPreferred());
+ EXPECT_TRUE(type_processor_.IsConnected());
UninitializeSyncBackend();
- EXPECT_TRUE(type_sync_proxy_.IsPreferred());
- EXPECT_FALSE(type_sync_proxy_.IsConnected());
+ EXPECT_TRUE(type_processor_.IsPreferred());
+ EXPECT_FALSE(type_processor_.IsConnected());
}
// Initialize sync then disable it with a pref change.
@@ -247,12 +247,12 @@ TEST_F(NonBlockingDataTypeControllerTest, PreferThenNot) {
InitTypeSyncProxy();
InitSyncBackend();
- EXPECT_TRUE(type_sync_proxy_.IsPreferred());
- EXPECT_TRUE(type_sync_proxy_.IsConnected());
+ EXPECT_TRUE(type_processor_.IsPreferred());
+ EXPECT_TRUE(type_processor_.IsConnected());
SetIsPreferred(false);
- EXPECT_FALSE(type_sync_proxy_.IsPreferred());
- EXPECT_FALSE(type_sync_proxy_.IsConnected());
+ EXPECT_FALSE(type_processor_.IsPreferred());
+ EXPECT_FALSE(type_processor_.IsConnected());
}
// Connect type sync proxy and sync backend, then toggle prefs repeatedly.
@@ -260,24 +260,24 @@ TEST_F(NonBlockingDataTypeControllerTest, RepeatedTogglePreference) {
SetIsPreferred(false);
InitTypeSyncProxy();
InitSyncBackend();
- EXPECT_FALSE(type_sync_proxy_.IsPreferred());
- EXPECT_FALSE(type_sync_proxy_.IsConnected());
+ EXPECT_FALSE(type_processor_.IsPreferred());
+ EXPECT_FALSE(type_processor_.IsConnected());
SetIsPreferred(true);
- EXPECT_TRUE(type_sync_proxy_.IsPreferred());
- EXPECT_TRUE(type_sync_proxy_.IsConnected());
+ EXPECT_TRUE(type_processor_.IsPreferred());
+ EXPECT_TRUE(type_processor_.IsConnected());
SetIsPreferred(false);
- EXPECT_FALSE(type_sync_proxy_.IsPreferred());
- EXPECT_FALSE(type_sync_proxy_.IsConnected());
+ EXPECT_FALSE(type_processor_.IsPreferred());
+ EXPECT_FALSE(type_processor_.IsConnected());
SetIsPreferred(true);
- EXPECT_TRUE(type_sync_proxy_.IsPreferred());
- EXPECT_TRUE(type_sync_proxy_.IsConnected());
+ EXPECT_TRUE(type_processor_.IsPreferred());
+ EXPECT_TRUE(type_processor_.IsConnected());
SetIsPreferred(false);
- EXPECT_FALSE(type_sync_proxy_.IsPreferred());
- EXPECT_FALSE(type_sync_proxy_.IsConnected());
+ EXPECT_FALSE(type_processor_.IsPreferred());
+ EXPECT_FALSE(type_processor_.IsConnected());
}
// Test sync backend getting restarted while processor is connected.
@@ -285,18 +285,18 @@ TEST_F(NonBlockingDataTypeControllerTest, RestartSyncBackend) {
SetIsPreferred(true);
InitTypeSyncProxy();
InitSyncBackend();
- EXPECT_TRUE(type_sync_proxy_.IsPreferred());
- EXPECT_TRUE(type_sync_proxy_.IsConnected());
+ EXPECT_TRUE(type_processor_.IsPreferred());
+ EXPECT_TRUE(type_processor_.IsConnected());
// Shutting down sync backend should disconnect but not disable the type.
UninitializeSyncBackend();
- EXPECT_TRUE(type_sync_proxy_.IsPreferred());
- EXPECT_FALSE(type_sync_proxy_.IsConnected());
+ EXPECT_TRUE(type_processor_.IsPreferred());
+ EXPECT_FALSE(type_processor_.IsConnected());
// Brining the backend back should reconnect the type.
InitSyncBackend();
- EXPECT_TRUE(type_sync_proxy_.IsPreferred());
- EXPECT_TRUE(type_sync_proxy_.IsConnected());
+ EXPECT_TRUE(type_processor_.IsPreferred());
+ EXPECT_TRUE(type_processor_.IsConnected());
}
// Test sync backend being restarted before processor connects.
@@ -305,15 +305,15 @@ TEST_F(NonBlockingDataTypeControllerTest, RestartSyncBackendEarly) {
// Toggle sync off and on before the type sync proxy is available.
InitSyncBackend();
- EXPECT_FALSE(type_sync_proxy_.IsConnected());
+ EXPECT_FALSE(type_processor_.IsConnected());
UninitializeSyncBackend();
- EXPECT_FALSE(type_sync_proxy_.IsConnected());
+ EXPECT_FALSE(type_processor_.IsConnected());
InitSyncBackend();
- EXPECT_FALSE(type_sync_proxy_.IsConnected());
+ EXPECT_FALSE(type_processor_.IsConnected());
// Introduce the processor.
InitTypeSyncProxy();
- EXPECT_TRUE(type_sync_proxy_.IsConnected());
+ EXPECT_TRUE(type_processor_.IsConnected());
}
// Test pref toggling before the sync backend has connected.
@@ -323,18 +323,18 @@ TEST_F(NonBlockingDataTypeControllerTest, TogglePreferenceWithoutBackend) {
// This should emit a disable signal.
SetIsPreferred(false);
- EXPECT_FALSE(type_sync_proxy_.IsConnected());
- EXPECT_FALSE(type_sync_proxy_.IsPreferred());
+ EXPECT_FALSE(type_processor_.IsConnected());
+ EXPECT_FALSE(type_processor_.IsPreferred());
// This won't enable us, since we don't have a sync backend.
SetIsPreferred(true);
- EXPECT_FALSE(type_sync_proxy_.IsConnected());
- EXPECT_FALSE(type_sync_proxy_.IsPreferred());
+ EXPECT_FALSE(type_processor_.IsConnected());
+ EXPECT_FALSE(type_processor_.IsPreferred());
// Only now do we start sending enable signals.
InitSyncBackend();
- EXPECT_TRUE(type_sync_proxy_.IsConnected());
- EXPECT_TRUE(type_sync_proxy_.IsPreferred());
+ EXPECT_TRUE(type_processor_.IsConnected());
+ EXPECT_TRUE(type_processor_.IsPreferred());
}
// Turns off auto-task-running to test the effects of delaying a connection
@@ -355,16 +355,16 @@ TEST_F(NonBlockingDataTypeControllerTest, DelayedConnect) {
// That should result in a request to connect, but it won't be
// executed right away.
- EXPECT_FALSE(type_sync_proxy_.IsConnected());
- EXPECT_TRUE(type_sync_proxy_.IsPreferred());
+ EXPECT_FALSE(type_processor_.IsConnected());
+ EXPECT_TRUE(type_processor_.IsPreferred());
// Let the sync thread process the request and the model thread handle its
// response.
RunQueuedSyncThreadTasks();
RunQueuedModelThreadTasks();
- EXPECT_TRUE(type_sync_proxy_.IsConnected());
- EXPECT_TRUE(type_sync_proxy_.IsPreferred());
+ EXPECT_TRUE(type_processor_.IsConnected());
+ EXPECT_TRUE(type_processor_.IsPreferred());
}
// Send Disable signal while a connection request is in progress.
@@ -380,8 +380,8 @@ TEST_F(NonBlockingDataTypeControllerTest, DisableRacesWithOnConnect) {
// That should result in a request to connect, but it won't be
// executed right away.
- EXPECT_FALSE(type_sync_proxy_.IsConnected());
- EXPECT_TRUE(type_sync_proxy_.IsPreferred());
+ EXPECT_FALSE(type_processor_.IsConnected());
+ EXPECT_TRUE(type_processor_.IsPreferred());
// Send and execute a disable signal before the OnConnect callback returns.
SetIsPreferred(false);
@@ -396,8 +396,8 @@ TEST_F(NonBlockingDataTypeControllerTest, DisableRacesWithOnConnect) {
// from the UI thread earlier. We need to make sure that doesn't happen.
RunQueuedModelThreadTasks();
- EXPECT_FALSE(type_sync_proxy_.IsPreferred());
- EXPECT_FALSE(type_sync_proxy_.IsConnected());
+ EXPECT_FALSE(type_processor_.IsPreferred());
+ EXPECT_FALSE(type_processor_.IsConnected());
}
// Send a request to enable, then disable, then re-enable the data type.
@@ -413,18 +413,18 @@ TEST_F(NonBlockingDataTypeControllerTest, EnableDisableEnableRace) {
RunQueuedModelThreadTasks();
// That was the first enable.
- EXPECT_FALSE(type_sync_proxy_.IsConnected());
- EXPECT_TRUE(type_sync_proxy_.IsPreferred());
+ EXPECT_FALSE(type_processor_.IsConnected());
+ EXPECT_TRUE(type_processor_.IsPreferred());
// Now disable.
SetIsPreferred(false);
RunQueuedModelThreadTasks();
- EXPECT_FALSE(type_sync_proxy_.IsPreferred());
+ EXPECT_FALSE(type_processor_.IsPreferred());
// And re-enable.
SetIsPreferred(true);
RunQueuedModelThreadTasks();
- EXPECT_TRUE(type_sync_proxy_.IsPreferred());
+ EXPECT_TRUE(type_processor_.IsPreferred());
// The sync thread has three messages related to those enables and
// disables sittin in its queue. Let's allow it to process them.
@@ -432,8 +432,8 @@ TEST_F(NonBlockingDataTypeControllerTest, EnableDisableEnableRace) {
// Let the model thread process any messages from the sync thread.
RunQueuedModelThreadTasks();
- EXPECT_TRUE(type_sync_proxy_.IsPreferred());
- EXPECT_TRUE(type_sync_proxy_.IsConnected());
+ EXPECT_TRUE(type_processor_.IsPreferred());
+ EXPECT_TRUE(type_processor_.IsConnected());
}
} // namespace sync_driver_v2
diff --git a/sync/engine/model_type_processor_impl_unittest.cc b/sync/engine/model_type_processor_impl_unittest.cc
index 2c019a7..c1b6b88 100644
--- a/sync/engine/model_type_processor_impl_unittest.cc
+++ b/sync/engine/model_type_processor_impl_unittest.cc
@@ -126,7 +126,7 @@ class ModelTypeProcessorImplTest : public ::testing::Test {
MockCommitQueue* mock_queue_;
scoped_ptr<InjectableSyncContextProxy> injectable_sync_context_proxy_;
- scoped_ptr<ModelTypeProcessorImpl> type_sync_proxy_;
+ scoped_ptr<ModelTypeProcessorImpl> type_processor_;
DataTypeState data_type_state_;
};
@@ -135,39 +135,38 @@ ModelTypeProcessorImplTest::ModelTypeProcessorImplTest()
: mock_queue_(new MockCommitQueue()),
injectable_sync_context_proxy_(
new InjectableSyncContextProxy(mock_queue_)),
- type_sync_proxy_(new ModelTypeProcessorImpl(kModelType)) {
-}
+ type_processor_(new ModelTypeProcessorImpl(kModelType)) {}
ModelTypeProcessorImplTest::~ModelTypeProcessorImplTest() {
}
void ModelTypeProcessorImplTest::FirstTimeInitialize() {
- type_sync_proxy_->Enable(injectable_sync_context_proxy_->Clone());
+ type_processor_->Enable(injectable_sync_context_proxy_->Clone());
}
void ModelTypeProcessorImplTest::InitializeToReadyState() {
// TODO(rlarocque): This should be updated to inject on-disk state.
// At the time this code was written, there was no support for on-disk
// state so this was the only way to inject a data_type_state into
- // the |type_sync_proxy_|.
+ // the |type_processor_|.
FirstTimeInitialize();
OnInitialSyncDone();
}
void ModelTypeProcessorImplTest::Disconnect() {
- type_sync_proxy_->Disconnect();
+ type_processor_->Disconnect();
injectable_sync_context_proxy_.reset();
mock_queue_ = NULL;
}
void ModelTypeProcessorImplTest::Disable() {
- type_sync_proxy_->Disable();
+ type_processor_->Disable();
injectable_sync_context_proxy_.reset();
mock_queue_ = NULL;
}
void ModelTypeProcessorImplTest::ReEnable() {
- DCHECK(!type_sync_proxy_->IsConnected());
+ DCHECK(!type_processor_->IsConnected());
// Prepare a new MockCommitQueue instance, just as we would
// if this happened in the real world.
@@ -176,25 +175,25 @@ void ModelTypeProcessorImplTest::ReEnable() {
new InjectableSyncContextProxy(mock_queue_));
// Re-enable sync with the new CommitQueue.
- type_sync_proxy_->Enable(injectable_sync_context_proxy_->Clone());
+ type_processor_->Enable(injectable_sync_context_proxy_->Clone());
}
void ModelTypeProcessorImplTest::WriteItem(const std::string& tag,
const std::string& value) {
const std::string tag_hash = GenerateTagHash(tag);
- type_sync_proxy_->Put(tag, GenerateSpecifics(tag, value));
+ type_processor_->Put(tag, GenerateSpecifics(tag, value));
}
void ModelTypeProcessorImplTest::DeleteItem(const std::string& tag) {
- type_sync_proxy_->Delete(tag);
+ type_processor_->Delete(tag);
}
void ModelTypeProcessorImplTest::OnInitialSyncDone() {
data_type_state_.initial_sync_done = true;
UpdateResponseDataList empty_update_list;
- type_sync_proxy_->OnUpdateReceived(
- data_type_state_, empty_update_list, empty_update_list);
+ type_processor_->OnUpdateReceived(data_type_state_, empty_update_list,
+ empty_update_list);
}
void ModelTypeProcessorImplTest::UpdateFromServer(int64 version_offset,
@@ -206,8 +205,8 @@ void ModelTypeProcessorImplTest::UpdateFromServer(int64 version_offset,
UpdateResponseDataList list;
list.push_back(data);
- type_sync_proxy_->OnUpdateReceived(data_type_state_, list,
- UpdateResponseDataList());
+ type_processor_->OnUpdateReceived(data_type_state_, list,
+ UpdateResponseDataList());
}
void ModelTypeProcessorImplTest::PendingUpdateFromServer(
@@ -222,8 +221,8 @@ void ModelTypeProcessorImplTest::PendingUpdateFromServer(
UpdateResponseDataList list;
list.push_back(data);
- type_sync_proxy_->OnUpdateReceived(data_type_state_, UpdateResponseDataList(),
- list);
+ type_processor_->OnUpdateReceived(data_type_state_, UpdateResponseDataList(),
+ list);
}
void ModelTypeProcessorImplTest::TombstoneFromServer(int64 version_offset,
@@ -236,14 +235,14 @@ void ModelTypeProcessorImplTest::TombstoneFromServer(int64 version_offset,
UpdateResponseDataList list;
list.push_back(data);
- type_sync_proxy_->OnUpdateReceived(data_type_state_, list,
- UpdateResponseDataList());
+ type_processor_->OnUpdateReceived(data_type_state_, list,
+ UpdateResponseDataList());
}
bool ModelTypeProcessorImplTest::HasPendingUpdate(
const std::string& tag) const {
const std::string client_tag_hash = GenerateTagHash(tag);
- const UpdateResponseDataList list = type_sync_proxy_->GetPendingUpdates();
+ const UpdateResponseDataList list = type_processor_->GetPendingUpdates();
for (UpdateResponseDataList::const_iterator it = list.begin();
it != list.end(); ++it) {
if (it->client_tag_hash == client_tag_hash)
@@ -256,7 +255,7 @@ UpdateResponseData ModelTypeProcessorImplTest::GetPendingUpdate(
const std::string& tag) const {
DCHECK(HasPendingUpdate(tag));
const std::string client_tag_hash = GenerateTagHash(tag);
- const UpdateResponseDataList list = type_sync_proxy_->GetPendingUpdates();
+ const UpdateResponseDataList list = type_processor_->GetPendingUpdates();
for (UpdateResponseDataList::const_iterator it = list.begin();
it != list.end(); ++it) {
if (it->client_tag_hash == client_tag_hash)
@@ -267,21 +266,21 @@ UpdateResponseData ModelTypeProcessorImplTest::GetPendingUpdate(
}
size_t ModelTypeProcessorImplTest::GetNumPendingUpdates() const {
- return type_sync_proxy_->GetPendingUpdates().size();
+ return type_processor_->GetPendingUpdates().size();
}
void ModelTypeProcessorImplTest::SuccessfulCommitResponse(
const CommitRequestData& request_data) {
CommitResponseDataList list;
list.push_back(mock_queue_->SuccessfulCommitResponse(request_data));
- type_sync_proxy_->OnCommitCompleted(data_type_state_, list);
+ type_processor_->OnCommitCompleted(data_type_state_, list);
}
void ModelTypeProcessorImplTest::UpdateDesiredEncryptionKey(
const std::string& key_name) {
data_type_state_.encryption_key_name = key_name;
- type_sync_proxy_->OnUpdateReceived(data_type_state_, UpdateResponseDataList(),
- UpdateResponseDataList());
+ type_processor_->OnUpdateReceived(data_type_state_, UpdateResponseDataList(),
+ UpdateResponseDataList());
}
void ModelTypeProcessorImplTest::SetServerEncryptionKey(
diff --git a/sync/internal_api/public/sync_context.h b/sync/internal_api/public/sync_context.h
index 3eaa5be..2ca15d4 100644
--- a/sync/internal_api/public/sync_context.h
+++ b/sync/internal_api/public/sync_context.h
@@ -13,7 +13,7 @@
#include "sync/internal_api/public/non_blocking_sync_common.h"
namespace syncer_v2 {
-class ModelTypeProcessorImpl;
+class ModelTypeProcessor;
// An interface of the core parts of sync.
//
@@ -36,7 +36,7 @@ class SYNC_EXPORT_PRIVATE SyncContext {
const DataTypeState& data_type_state,
const UpdateResponseDataList& saved_pending_updates,
const scoped_refptr<base::SequencedTaskRunner>& datatype_task_runner,
- const base::WeakPtr<ModelTypeProcessorImpl>& type_sync_proxy) = 0;
+ const base::WeakPtr<ModelTypeProcessor>& type_processor) = 0;
// Disconnects the syncer from the model and stops syncing the type.
//
diff --git a/sync/internal_api/public/sync_context_proxy.h b/sync/internal_api/public/sync_context_proxy.h
index 5293ef7..5d20be9 100644
--- a/sync/internal_api/public/sync_context_proxy.h
+++ b/sync/internal_api/public/sync_context_proxy.h
@@ -10,7 +10,7 @@
#include "sync/internal_api/public/non_blocking_sync_common.h"
namespace syncer_v2 {
-class ModelTypeProcessorImpl;
+class ModelTypeProcessor;
// Interface for the datatype integration logic from non-sync threads.
//
@@ -27,7 +27,7 @@ class SYNC_EXPORT_PRIVATE SyncContextProxy {
syncer::ModelType type,
const DataTypeState& data_type_state,
const UpdateResponseDataList& saved_pending_updates,
- const base::WeakPtr<ModelTypeProcessorImpl>& type_sync_proxy) = 0;
+ const base::WeakPtr<ModelTypeProcessor>& type_processor) = 0;
// Tells the syncer that we're no longer interested in syncing this type.
//
diff --git a/sync/internal_api/public/test/null_sync_context_proxy.h b/sync/internal_api/public/test/null_sync_context_proxy.h
index 9c40f22..899331f 100644
--- a/sync/internal_api/public/test/null_sync_context_proxy.h
+++ b/sync/internal_api/public/test/null_sync_context_proxy.h
@@ -10,7 +10,7 @@
#include "sync/internal_api/public/sync_context_proxy.h"
namespace syncer_v2 {
-class ModelTypeProcessorImpl;
+class ModelTypeProcessor;
// A non-functional implementation of SyncContextProxy.
//
@@ -24,7 +24,7 @@ class NullSyncContextProxy : public SyncContextProxy {
syncer::ModelType type,
const DataTypeState& data_type_state,
const UpdateResponseDataList& saved_pending_updates,
- const base::WeakPtr<ModelTypeProcessorImpl>& type_sync_proxy) override;
+ const base::WeakPtr<ModelTypeProcessor>& type_processor) override;
void Disconnect(syncer::ModelType type) override;
scoped_ptr<SyncContextProxy> Clone() const override;
};
diff --git a/sync/internal_api/sync_context_proxy_impl.cc b/sync/internal_api/sync_context_proxy_impl.cc
index 41bcd3f..9d8c290 100644
--- a/sync/internal_api/sync_context_proxy_impl.cc
+++ b/sync/internal_api/sync_context_proxy_impl.cc
@@ -26,7 +26,7 @@ void SyncContextProxyImpl::ConnectTypeToSync(
syncer::ModelType type,
const DataTypeState& data_type_state,
const UpdateResponseDataList& saved_pending_updates,
- const base::WeakPtr<ModelTypeProcessorImpl>& type_sync_proxy) {
+ const base::WeakPtr<ModelTypeProcessor>& type_processor) {
VLOG(1) << "ConnectTypeToSync: " << ModelTypeToString(type);
sync_task_runner_->PostTask(FROM_HERE,
base::Bind(&SyncContext::ConnectSyncTypeToWorker,
@@ -35,7 +35,7 @@ void SyncContextProxyImpl::ConnectTypeToSync(
data_type_state,
saved_pending_updates,
base::ThreadTaskRunnerHandle::Get(),
- type_sync_proxy));
+ type_processor));
}
void SyncContextProxyImpl::Disconnect(syncer::ModelType type) {
diff --git a/sync/internal_api/sync_context_proxy_impl.h b/sync/internal_api/sync_context_proxy_impl.h
index 88a5b40..9d2ac8d 100644
--- a/sync/internal_api/sync_context_proxy_impl.h
+++ b/sync/internal_api/sync_context_proxy_impl.h
@@ -13,7 +13,7 @@
#include "sync/internal_api/public/sync_context_proxy.h"
namespace syncer_v2 {
-class ModelTypeProcessorImpl;
+class ModelTypeProcessor;
class SyncContext;
struct DataTypeState;
@@ -40,7 +40,7 @@ class SYNC_EXPORT_PRIVATE SyncContextProxyImpl : public SyncContextProxy {
syncer::ModelType type,
const DataTypeState& data_type_state,
const UpdateResponseDataList& pending_updates,
- const base::WeakPtr<ModelTypeProcessorImpl>& sync_proxy_impl) override;
+ const base::WeakPtr<ModelTypeProcessor>& type_processor) override;
// Disables syncing for the given type on the sync thread.
void Disconnect(syncer::ModelType type) override;
diff --git a/sync/internal_api/test/null_sync_context_proxy.cc b/sync/internal_api/test/null_sync_context_proxy.cc
index 7d967ec..9beb2f4 100644
--- a/sync/internal_api/test/null_sync_context_proxy.cc
+++ b/sync/internal_api/test/null_sync_context_proxy.cc
@@ -16,7 +16,7 @@ void NullSyncContextProxy::ConnectTypeToSync(
syncer::ModelType type,
const DataTypeState& data_type_state,
const UpdateResponseDataList& saved_pending_updates,
- const base::WeakPtr<ModelTypeProcessorImpl>& type_sync_proxy) {
+ const base::WeakPtr<ModelTypeProcessor>& type_processor) {
NOTREACHED() << "NullSyncContextProxy is not meant to be used";
}
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.
//
diff --git a/sync/test/engine/injectable_sync_context_proxy.cc b/sync/test/engine/injectable_sync_context_proxy.cc
index e3094e2..e194f26 100644
--- a/sync/test/engine/injectable_sync_context_proxy.cc
+++ b/sync/test/engine/injectable_sync_context_proxy.cc
@@ -21,16 +21,16 @@ void InjectableSyncContextProxy::ConnectTypeToSync(
syncer::ModelType type,
const DataTypeState& data_type_state,
const UpdateResponseDataList& response_list,
- const base::WeakPtr<ModelTypeProcessorImpl>& type_sync_proxy) {
+ const base::WeakPtr<ModelTypeProcessor>& type_processor) {
// This class is allowed to participate in only one connection.
DCHECK(!is_worker_connected_);
is_worker_connected_ = true;
- // Hands off ownership of our member to the type_sync_proxy, while keeping
+ // Hands off ownership of our member to the type_processor, while keeping
// an unsafe pointer to it. This is why we can only connect once.
scoped_ptr<CommitQueue> queue(queue_);
- type_sync_proxy->OnConnect(queue.Pass());
+ type_processor->OnConnect(queue.Pass());
}
void InjectableSyncContextProxy::Disconnect(syncer::ModelType type) {
diff --git a/sync/test/engine/injectable_sync_context_proxy.h b/sync/test/engine/injectable_sync_context_proxy.h
index 4f19d9c..4ec38e66 100644
--- a/sync/test/engine/injectable_sync_context_proxy.h
+++ b/sync/test/engine/injectable_sync_context_proxy.h
@@ -11,11 +11,11 @@
namespace syncer_v2 {
-class ModelTypeProcessorImpl;
+class ModelTypeProcessor;
class CommitQueue;
// A SyncContextProxy implementation that, when a connection request is made,
-// initalizes a connection to a previously injected ModelTypeProcessorImpl.
+// initalizes a connection to a previously injected ModelTypeProcessor.
class InjectableSyncContextProxy : public SyncContextProxy {
public:
explicit InjectableSyncContextProxy(CommitQueue* queue);
@@ -25,7 +25,7 @@ class InjectableSyncContextProxy : public SyncContextProxy {
syncer::ModelType type,
const DataTypeState& data_type_state,
const UpdateResponseDataList& pending_updates,
- const base::WeakPtr<ModelTypeProcessorImpl>& type_sync_proxy) override;
+ const base::WeakPtr<ModelTypeProcessor>& type_processor) override;
void Disconnect(syncer::ModelType type) override;
scoped_ptr<SyncContextProxy> Clone() const override;