Index: sync/internal_api/sync_manager_impl_unittest.cc |
diff --git a/sync/internal_api/sync_manager_impl_unittest.cc b/sync/internal_api/sync_manager_impl_unittest.cc |
index b64ecc3916354497b85cbbc48a4f59a91939310b..2d133a142940638ff5052bd71949948dff45920c 100644 |
--- a/sync/internal_api/sync_manager_impl_unittest.cc |
+++ b/sync/internal_api/sync_manager_impl_unittest.cc |
@@ -44,10 +44,10 @@ |
#include "sync/js/js_event_handler.h" |
#include "sync/js/js_reply_handler.h" |
#include "sync/js/js_test_util.h" |
-#include "sync/notifier/fake_sync_notifier.h" |
-#include "sync/notifier/fake_sync_notifier_observer.h" |
-#include "sync/notifier/sync_notifier.h" |
-#include "sync/notifier/sync_notifier_observer.h" |
+#include "sync/notifier/fake_invalidation_handler.h" |
+#include "sync/notifier/fake_invalidator.h" |
+#include "sync/notifier/invalidation_handler.h" |
+#include "sync/notifier/invalidator.h" |
#include "sync/protocol/bookmark_specifics.pb.h" |
#include "sync/protocol/encryption.pb.h" |
#include "sync/protocol/extension_specifics.pb.h" |
@@ -718,14 +718,14 @@ class SyncManagerTest : public testing::Test, |
}; |
SyncManagerTest() |
- : fake_notifier_(NULL), |
+ : fake_invalidator_(NULL), |
sync_manager_("Test sync manager") { |
switches_.encryption_method = |
InternalComponentsFactory::ENCRYPTION_KEYSTORE; |
} |
virtual ~SyncManagerTest() { |
- EXPECT_FALSE(fake_notifier_); |
+ EXPECT_FALSE(fake_invalidator_); |
} |
// Test implementation. |
@@ -736,7 +736,7 @@ class SyncManagerTest : public testing::Test, |
credentials.email = "foo@bar.com"; |
credentials.sync_token = "sometoken"; |
- fake_notifier_ = new FakeSyncNotifier(); |
+ fake_invalidator_ = new FakeInvalidator(); |
sync_manager_.AddObserver(&manager_observer_); |
EXPECT_CALL(manager_observer_, OnInitializationComplete(_, _, _)). |
@@ -748,7 +748,7 @@ class SyncManagerTest : public testing::Test, |
ModelSafeRoutingInfo routing_info; |
GetModelSafeRoutingInfo(&routing_info); |
- // Takes ownership of |fake_notifier_|. |
+ // Takes ownership of |fake_invalidator_|. |
sync_manager_.Init(temp_dir_.path(), |
WeakHandle<JsEventHandler>(), |
"bogus", 0, false, |
@@ -757,7 +757,7 @@ class SyncManagerTest : public testing::Test, |
new TestHttpPostProviderFactory()), |
workers, &extensions_activity_monitor_, this, |
credentials, |
- scoped_ptr<SyncNotifier>(fake_notifier_), |
+ scoped_ptr<Invalidator>(fake_invalidator_), |
"", "", // bootstrap tokens |
scoped_ptr<InternalComponentsFactory>(GetFactory()), |
&encryptor_, |
@@ -775,16 +775,16 @@ class SyncManagerTest : public testing::Test, |
} |
PumpLoop(); |
- EXPECT_TRUE(fake_notifier_->IsHandlerRegistered(&sync_manager_)); |
+ EXPECT_TRUE(fake_invalidator_->IsHandlerRegistered(&sync_manager_)); |
} |
void TearDown() { |
sync_manager_.RemoveObserver(&manager_observer_); |
sync_manager_.ShutdownOnSyncThread(); |
// We can't assert that |sync_manager_| isn't registered with |
- // |fake_notifier_| anymore because |fake_notifier_| is now |
+ // |fake_invalidator_| anymore because |fake_invalidator_| is now |
// destroyed. |
- fake_notifier_ = NULL; |
+ fake_invalidator_ = NULL; |
PumpLoop(); |
} |
@@ -957,7 +957,7 @@ class SyncManagerTest : public testing::Test, |
protected: |
FakeEncryptor encryptor_; |
TestUnrecoverableErrorHandler handler_; |
- FakeSyncNotifier* fake_notifier_; |
+ FakeInvalidator* fake_invalidator_; |
SyncManagerImpl sync_manager_; |
WeakHandle<JsBackend> js_backend_; |
StrictMock<SyncManagerObserverMock> manager_observer_; |
@@ -971,21 +971,21 @@ TEST_F(SyncManagerTest, UpdateEnabledTypes) { |
const ModelTypeSet enabled_types = GetRoutingInfoTypes(routes); |
sync_manager_.UpdateEnabledTypes(enabled_types); |
EXPECT_EQ(ModelTypeSetToObjectIdSet(enabled_types), |
- fake_notifier_->GetRegisteredIds(&sync_manager_)); |
+ fake_invalidator_->GetRegisteredIds(&sync_manager_)); |
} |
TEST_F(SyncManagerTest, RegisterInvalidationHandler) { |
- FakeSyncNotifierObserver fake_observer; |
- sync_manager_.RegisterInvalidationHandler(&fake_observer); |
- EXPECT_TRUE(fake_notifier_->IsHandlerRegistered(&fake_observer)); |
+ FakeInvalidationHandler fake_handler; |
+ sync_manager_.RegisterInvalidationHandler(&fake_handler); |
+ EXPECT_TRUE(fake_invalidator_->IsHandlerRegistered(&fake_handler)); |
const ObjectIdSet& ids = |
ModelTypeSetToObjectIdSet(ModelTypeSet(BOOKMARKS, PREFERENCES)); |
- sync_manager_.UpdateRegisteredInvalidationIds(&fake_observer, ids); |
- EXPECT_EQ(ids, fake_notifier_->GetRegisteredIds(&fake_observer)); |
+ sync_manager_.UpdateRegisteredInvalidationIds(&fake_handler, ids); |
+ EXPECT_EQ(ids, fake_invalidator_->GetRegisteredIds(&fake_handler)); |
- sync_manager_.UnregisterInvalidationHandler(&fake_observer); |
- EXPECT_FALSE(fake_notifier_->IsHandlerRegistered(&fake_observer)); |
+ sync_manager_.UnregisterInvalidationHandler(&fake_handler); |
+ EXPECT_FALSE(fake_invalidator_->IsHandlerRegistered(&fake_handler)); |
} |
TEST_F(SyncManagerTest, ProcessJsMessage) { |