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

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

Issue 56113003: Implement new invalidations ack tracking system (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Modify drive TODO comment + rebase Created 7 years, 1 month 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/drive/drive_notification_manager.cc
diff --git a/chrome/browser/drive/drive_notification_manager.cc b/chrome/browser/drive/drive_notification_manager.cc
index d4141b0a83ea552701c9e38ce864509662481564..a3dcf3411ba641bdf9e2cf2c3995dffc534c07eb 100644
--- a/chrome/browser/drive/drive_notification_manager.cc
+++ b/chrome/browser/drive/drive_notification_manager.cc
@@ -9,6 +9,7 @@
#include "chrome/browser/invalidation/invalidation_service.h"
#include "chrome/browser/invalidation/invalidation_service_factory.h"
#include "google/cacheinvalidation/types.pb.h"
+#include "sync/notifier/object_id_invalidation_map.h"
namespace drive {
@@ -75,12 +76,10 @@ void DriveNotificationManager::OnIncomingInvalidation(
kDriveInvalidationObjectId);
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_);
- syncer::Invalidation inv = invalidation_map.ForObject(object_id).back();
- invalidation_service_->AcknowledgeInvalidation(object_id, inv.ack_handle());
-
+ // This effectively disables 'local acks'. It tells the invalidations system
+ // to not bother saving invalidations across restarts for us.
+ // See crbug.com/320878.
+ invalidation_map.AcknowledgeAll();
NotifyObserversToUpdate(NOTIFICATION_XMPP);
}
« 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