Index: chrome/browser/chrome_to_mobile_service.cc |
diff --git a/chrome/browser/chrome_to_mobile_service.cc b/chrome/browser/chrome_to_mobile_service.cc |
index 58435a8efa0d24c7698b9f8654087f383a61e7d7..790ffada1ac7c48a9b71ddeb7131c629a2748e36 100644 |
--- a/chrome/browser/chrome_to_mobile_service.cc |
+++ b/chrome/browser/chrome_to_mobile_service.cc |
@@ -409,6 +409,13 @@ void ChromeToMobileService::OnIncomingInvalidation( |
DCHECK_EQ(1U, id_state_map.count(invalidation::ObjectId( |
ipc::invalidation::ObjectSource::CHROME_COMPONENTS, |
kSyncInvalidationObjectIdChromeToMobileDeviceList))); |
+ // TODO(msw): Unit tests do not provide profiles; see http://crbug.com/122183 |
+ ProfileSyncService* profile_sync_service = |
+ profile_ ? ProfileSyncServiceFactory::GetForProfile(profile_) : NULL; |
+ if (profile_sync_service) { |
+ profile_sync_service->AcknowledgeInvalidation( |
+ id_state_map.begin()->first, id_state_map.begin()->second.ack_handle); |
+ } |
RequestDeviceSearch(); |
} |