Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5)

Unified Diff: chrome/browser/chrome_to_mobile_service.cc

Issue 10911084: Implement Invalidator::Acknowledge (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Adapt patch to new TickClock interface Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/extensions/api/push_messaging/DEPS » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 bf9856f20c710078e2345ac20fed4277e20a34c9..3f98026b1a755c8cf4aa20f0154b618adfb4dc9e 100644
--- a/chrome/browser/chrome_to_mobile_service.cc
+++ b/chrome/browser/chrome_to_mobile_service.cc
@@ -479,6 +479,16 @@ void ChromeToMobileService::OnIncomingInvalidation(
DCHECK_EQ(1U, invalidation_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) {
+ // TODO(dcheng): Only acknowledge the invalidation once the device search
+ // has finished. http://crbug.com/156843.
+ profile_sync_service->AcknowledgeInvalidation(
+ invalidation_map.begin()->first,
+ invalidation_map.begin()->second.ack_handle);
+ }
RequestDeviceSearch();
}
« no previous file with comments | « no previous file | chrome/browser/extensions/api/push_messaging/DEPS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698