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

Unified Diff: chrome/browser/drive/drive_notification_manager.cc

Issue 23441042: Refactor common invalidation framework types (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Move DEPS rule Created 7 years, 2 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/push_messaging_apitest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/drive/drive_notification_manager.cc
diff --git a/chrome/browser/drive/drive_notification_manager.cc b/chrome/browser/drive/drive_notification_manager.cc
index 198c0148ecb35690202e1c99743bd46bd230c328..d4141b0a83ea552701c9e38ce864509662481564 100644
--- a/chrome/browser/drive/drive_notification_manager.cc
+++ b/chrome/browser/drive/drive_notification_manager.cc
@@ -68,18 +68,18 @@ void DriveNotificationManager::OnInvalidatorStateChange(
void DriveNotificationManager::OnIncomingInvalidation(
const syncer::ObjectIdInvalidationMap& invalidation_map) {
DVLOG(2) << "XMPP Drive Notification Received";
- DCHECK_EQ(1U, invalidation_map.size());
+ syncer::ObjectIdSet ids = invalidation_map.GetObjectIds();
+ DCHECK_EQ(1U, ids.size());
const invalidation::ObjectId object_id(
ipc::invalidation::ObjectSource::COSMO_CHANGELOG,
kDriveInvalidationObjectId);
- DCHECK_EQ(1U, invalidation_map.count(object_id));
+ DCHECK_EQ(1U, ids.count(object_id));
// TODO(dcheng): Only acknowledge the invalidation once the fetch has
// completed. http://crbug.com/156843
DCHECK(invalidation_service_);
- invalidation_service_->AcknowledgeInvalidation(
- invalidation_map.begin()->first,
- invalidation_map.begin()->second.ack_handle);
+ syncer::Invalidation inv = invalidation_map.ForObject(object_id).back();
+ invalidation_service_->AcknowledgeInvalidation(object_id, inv.ack_handle());
NotifyObserversToUpdate(NOTIFICATION_XMPP);
}
« no previous file with comments | « no previous file | chrome/browser/extensions/api/push_messaging/push_messaging_apitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698