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

Unified Diff: sync/sessions/model_type_registry_unittest.cc

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/sessions/model_type_registry.cc ('k') | sync/sync_core.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/sessions/model_type_registry_unittest.cc
diff --git a/sync/sessions/model_type_registry_unittest.cc b/sync/sessions/model_type_registry_unittest.cc
index 2d42215c79d237af0c775d6f1ec2be67be71bcdd..d9d314eca6291f0f32b37ae9ef8b32492144e606 100644
--- a/sync/sessions/model_type_registry_unittest.cc
+++ b/sync/sessions/model_type_registry_unittest.cc
@@ -6,7 +6,7 @@
#include "base/deferred_sequenced_task_runner.h"
#include "base/message_loop/message_loop.h"
-#include "sync/engine/non_blocking_type_processor.h"
+#include "sync/engine/model_type_sync_proxy_impl.h"
#include "sync/internal_api/public/base/model_type.h"
#include "sync/sessions/model_type_registry.h"
#include "sync/test/engine/fake_model_worker.h"
@@ -140,8 +140,8 @@ TEST_F(ModelTypeRegistryTest, SetEnabledDirectoryTypes_OffAndOn) {
}
TEST_F(ModelTypeRegistryTest, NonBlockingTypes) {
- NonBlockingTypeProcessor themes_processor(syncer::THEMES);
- NonBlockingTypeProcessor sessions_processor(syncer::SESSIONS);
+ ModelTypeSyncProxyImpl themes_sync_proxy(syncer::THEMES);
+ ModelTypeSyncProxyImpl sessions_sync_proxy(syncer::SESSIONS);
scoped_refptr<base::DeferredSequencedTaskRunner> task_runner =
new base::DeferredSequencedTaskRunner(base::MessageLoopProxy::current());
@@ -150,14 +150,14 @@ TEST_F(ModelTypeRegistryTest, NonBlockingTypes) {
registry()->InitializeNonBlockingType(syncer::THEMES,
MakeInitialDataTypeState(THEMES),
task_runner,
- themes_processor.AsWeakPtrForUI());
+ themes_sync_proxy.AsWeakPtrForUI());
EXPECT_TRUE(registry()->GetEnabledTypes().Equals(
ModelTypeSet(syncer::THEMES)));
registry()->InitializeNonBlockingType(syncer::SESSIONS,
MakeInitialDataTypeState(SESSIONS),
task_runner,
- sessions_processor.AsWeakPtrForUI());
+ sessions_sync_proxy.AsWeakPtrForUI());
EXPECT_TRUE(registry()->GetEnabledTypes().Equals(
ModelTypeSet(syncer::THEMES, syncer::SESSIONS)));
@@ -166,12 +166,12 @@ TEST_F(ModelTypeRegistryTest, NonBlockingTypes) {
ModelTypeSet(syncer::SESSIONS)));
// Allow ModelTypeRegistry destruction to delete the
- // Sessions' NonBlockingTypeProcessorCore.
+ // Sessions' ModelTypeSyncWorker.
}
TEST_F(ModelTypeRegistryTest, NonBlockingTypesWithDirectoryTypes) {
- NonBlockingTypeProcessor themes_processor(syncer::THEMES);
- NonBlockingTypeProcessor sessions_processor(syncer::SESSIONS);
+ ModelTypeSyncProxyImpl themes_sync_proxy(syncer::THEMES);
+ ModelTypeSyncProxyImpl sessions_sync_proxy(syncer::SESSIONS);
scoped_refptr<base::DeferredSequencedTaskRunner> task_runner =
new base::DeferredSequencedTaskRunner(base::MessageLoopProxy::current());
@@ -187,7 +187,7 @@ TEST_F(ModelTypeRegistryTest, NonBlockingTypesWithDirectoryTypes) {
registry()->InitializeNonBlockingType(syncer::THEMES,
MakeInitialDataTypeState(THEMES),
task_runner,
- themes_processor.AsWeakPtrForUI());
+ themes_sync_proxy.AsWeakPtrForUI());
current_types.Put(syncer::THEMES);
EXPECT_TRUE(registry()->GetEnabledTypes().Equals(current_types));
@@ -200,7 +200,7 @@ TEST_F(ModelTypeRegistryTest, NonBlockingTypesWithDirectoryTypes) {
registry()->InitializeNonBlockingType(syncer::SESSIONS,
MakeInitialDataTypeState(SESSIONS),
task_runner,
- sessions_processor.AsWeakPtrForUI());
+ sessions_sync_proxy.AsWeakPtrForUI());
current_types.Put(syncer::SESSIONS);
EXPECT_TRUE(registry()->GetEnabledTypes().Equals(current_types));
@@ -217,10 +217,10 @@ TEST_F(ModelTypeRegistryTest, NonBlockingTypesWithDirectoryTypes) {
}
TEST_F(ModelTypeRegistryTest, DeletionOrdering) {
- scoped_ptr<NonBlockingTypeProcessor> themes_processor(
- new NonBlockingTypeProcessor(syncer::THEMES));
- scoped_ptr<NonBlockingTypeProcessor> sessions_processor(
- new NonBlockingTypeProcessor(syncer::SESSIONS));
+ scoped_ptr<ModelTypeSyncProxyImpl> themes_sync_proxy(
+ new ModelTypeSyncProxyImpl(syncer::THEMES));
+ scoped_ptr<ModelTypeSyncProxyImpl> sessions_sync_proxy(
+ new ModelTypeSyncProxyImpl(syncer::SESSIONS));
scoped_refptr<base::DeferredSequencedTaskRunner> task_runner =
new base::DeferredSequencedTaskRunner(base::MessageLoopProxy::current());
@@ -229,20 +229,20 @@ TEST_F(ModelTypeRegistryTest, DeletionOrdering) {
registry()->InitializeNonBlockingType(syncer::THEMES,
MakeInitialDataTypeState(THEMES),
task_runner,
- themes_processor->AsWeakPtrForUI());
+ themes_sync_proxy->AsWeakPtrForUI());
registry()->InitializeNonBlockingType(syncer::SESSIONS,
MakeInitialDataTypeState(SESSIONS),
task_runner,
- sessions_processor->AsWeakPtrForUI());
+ sessions_sync_proxy->AsWeakPtrForUI());
EXPECT_TRUE(registry()->GetEnabledTypes().Equals(
ModelTypeSet(syncer::THEMES, syncer::SESSIONS)));
- // Tear down themes processing, starting with the ProcessorCore.
+ // Tear down themes processing, starting with the worker.
registry()->RemoveNonBlockingType(syncer::THEMES);
- themes_processor.reset();
+ themes_sync_proxy.reset();
- // Tear down sessions processing, starting with the Processor.
- sessions_processor.reset();
+ // Tear down sessions processing, starting with the type sync proxy.
+ sessions_sync_proxy.reset();
registry()->RemoveNonBlockingType(syncer::SESSIONS);
EXPECT_TRUE(registry()->GetEnabledTypes().Empty());
« no previous file with comments | « sync/sessions/model_type_registry.cc ('k') | sync/sync_core.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698