Index: components/sync_driver/device_info_service_unittest.cc |
diff --git a/components/sync_driver/device_info_service_unittest.cc b/components/sync_driver/device_info_service_unittest.cc |
index 4cd69c6e6db3d95cbd604986e490496148032718..35cbe0ec375c78d0e075253be3c10228cfd8409f 100644 |
--- a/components/sync_driver/device_info_service_unittest.cc |
+++ b/components/sync_driver/device_info_service_unittest.cc |
@@ -19,6 +19,7 @@ |
#include "sync/api/entity_data.h" |
#include "sync/api/metadata_batch.h" |
#include "sync/api/model_type_store.h" |
+#include "sync/internal_api/public/shared_model_type_processor.h" |
#include "sync/internal_api/public/test/model_type_store_test_util.h" |
#include "sync/protocol/data_type_state.pb.h" |
#include "testing/gtest/include/gtest/gtest.h" |
@@ -163,7 +164,12 @@ class DeviceInfoServiceTest : public testing::Test, |
void OnDeviceInfoChange() override { change_count_++; } |
- protected: |
+ scoped_ptr<ModelTypeChangeProcessor> CreateModelTypeChangeProcessor( |
+ ModelTypeService* service) { |
+ processor_ = new FakeModelTypeChangeProcessor(); |
+ return make_scoped_ptr(processor_); |
+ } |
+ |
DeviceInfoServiceTest() |
: change_count_(0), |
store_(ModelTypeStoreTestUtil::CreateInMemoryStoreForTest()), |
@@ -197,8 +203,9 @@ class DeviceInfoServiceTest : public testing::Test, |
// pump in this scenario because metadata is going to need to be loading from |
// the store and given to the processor, which is async. |
void SetProcessorAndPump() { |
- processor_ = new FakeModelTypeChangeProcessor(); |
- service()->set_change_processor(make_scoped_ptr(processor_)); |
+ service()->InitializeProcessor( |
+ base::Bind(&DeviceInfoServiceTest::CreateModelTypeChangeProcessor, |
+ base::Unretained(this))); |
base::RunLoop().RunUntilIdle(); |
} |