Index: chrome/browser/notifications/sync_notifier/chrome_notifier_service_unittest.cc |
diff --git a/chrome/browser/notifications/sync_notifier/chrome_notifier_service_unittest.cc b/chrome/browser/notifications/sync_notifier/chrome_notifier_service_unittest.cc |
index 5dddca5be2f4328cdcb018122fbe1b4c99d3cf87..7cb36181caaed6f6062e4cb4b2ec57ef3c50c3c1 100644 |
--- a/chrome/browser/notifications/sync_notifier/chrome_notifier_service_unittest.cc |
+++ b/chrome/browser/notifications/sync_notifier/chrome_notifier_service_unittest.cc |
@@ -24,6 +24,7 @@ |
#include "content/public/test/test_browser_thread_bundle.h" |
#include "sync/api/sync_change.h" |
#include "sync/api/sync_change_processor.h" |
+#include "sync/api/sync_change_processor_delegator.h" |
#include "sync/api/sync_error_factory.h" |
#include "sync/api/sync_error_factory_mock.h" |
#include "testing/gtest/include/gtest/gtest.h" |
@@ -34,6 +35,7 @@ using sync_pb::EntitySpecifics; |
using syncer::SyncData; |
using syncer::SyncChange; |
using syncer::SyncChangeList; |
+using syncer::SyncChangeProcessorDelegator; |
using syncer::SyncDataList; |
using syncer::SYNCED_NOTIFICATIONS; |
using notifier::SyncedNotification; |
@@ -97,38 +99,11 @@ class TestChangeProcessor : public syncer::SyncChangeProcessor { |
DISALLOW_COPY_AND_ASSIGN(TestChangeProcessor); |
}; |
-class SyncChangeProcessorDelegate : public syncer::SyncChangeProcessor { |
- public: |
- explicit SyncChangeProcessorDelegate(SyncChangeProcessor* recipient) |
- : recipient_(recipient) { |
- EXPECT_TRUE(recipient_); |
- } |
- virtual ~SyncChangeProcessorDelegate() {} |
- |
- // syncer::SyncChangeProcessor implementation. |
- virtual syncer::SyncError ProcessSyncChanges( |
- const tracked_objects::Location& from_here, |
- const SyncChangeList& change_list) OVERRIDE { |
- return recipient_->ProcessSyncChanges(from_here, change_list); |
- } |
- |
- virtual syncer::SyncDataList GetAllSyncData(syncer::ModelType type) const |
- OVERRIDE { |
- return recipient_->GetAllSyncData(type); |
- } |
- |
- private: |
- // The recipient of all sync changes. |
- SyncChangeProcessor* recipient_; |
- |
- DISALLOW_COPY_AND_ASSIGN(SyncChangeProcessorDelegate); |
-}; |
- |
class ChromeNotifierServiceTest : public testing::Test { |
public: |
ChromeNotifierServiceTest() |
: sync_processor_(new TestChangeProcessor), |
- sync_processor_delegate_(new SyncChangeProcessorDelegate( |
+ sync_processor_delegate_(new SyncChangeProcessorDelegator( |
sync_processor_.get())) {} |
virtual ~ChromeNotifierServiceTest() {} |