Index: components/sync/device_info/device_info_service.cc |
diff --git a/components/sync/device_info/device_info_service.cc b/components/sync/device_info/device_info_service.cc |
index b13f1d4e5d4db5d372cac9ead0d2e6eff0882c77..f00c6c8ea4114464ca896f7c6488b179e61989b7 100644 |
--- a/components/sync/device_info/device_info_service.cc |
+++ b/components/sync/device_info/device_info_service.cc |
@@ -277,6 +277,12 @@ bool DeviceInfoService::DeleteSpecifics(const std::string& guid, |
} |
void DeviceInfoService::OnProviderInitialized() { |
+ // Now that the provider has initialized, remove the subscription. The service |
+ // should only need to give the processor metadata upon initialization. If |
+ // sync is disabled and enabled, our provider will try to retrigger this |
+ // event, but we do not want to send any more metadata to the processor. |
+ subscription_.reset(); |
+ |
has_provider_initialized_ = true; |
LoadMetadataIfReady(); |
} |