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

Side by Side Diff: chrome/browser/drive/drive_notification_manager.cc

Issue 159773006: [invalidations] Added table with registered objectsIds (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@about_invalidations_clean
Patch Set: Change constness of iterators for android clang Created 6 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/drive/drive_notification_manager.h" 5 #include "chrome/browser/drive/drive_notification_manager.h"
6 6
7 #include "base/metrics/histogram.h" 7 #include "base/metrics/histogram.h"
8 #include "chrome/browser/drive/drive_notification_observer.h" 8 #include "chrome/browser/drive/drive_notification_observer.h"
9 #include "chrome/browser/invalidation/invalidation_service.h" 9 #include "chrome/browser/invalidation/invalidation_service.h"
10 #include "chrome/browser/invalidation/invalidation_service_factory.h" 10 #include "chrome/browser/invalidation/invalidation_service_factory.h"
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 kDriveInvalidationObjectId); 76 kDriveInvalidationObjectId);
77 DCHECK_EQ(1U, ids.count(object_id)); 77 DCHECK_EQ(1U, ids.count(object_id));
78 78
79 // This effectively disables 'local acks'. It tells the invalidations system 79 // This effectively disables 'local acks'. It tells the invalidations system
80 // to not bother saving invalidations across restarts for us. 80 // to not bother saving invalidations across restarts for us.
81 // See crbug.com/320878. 81 // See crbug.com/320878.
82 invalidation_map.AcknowledgeAll(); 82 invalidation_map.AcknowledgeAll();
83 NotifyObserversToUpdate(NOTIFICATION_XMPP); 83 NotifyObserversToUpdate(NOTIFICATION_XMPP);
84 } 84 }
85 85
86 std::string DriveNotificationManager::GetOwnerName() const { return "Drive"; }
87
86 void DriveNotificationManager::AddObserver( 88 void DriveNotificationManager::AddObserver(
87 DriveNotificationObserver* observer) { 89 DriveNotificationObserver* observer) {
88 observers_.AddObserver(observer); 90 observers_.AddObserver(observer);
89 } 91 }
90 92
91 void DriveNotificationManager::RemoveObserver( 93 void DriveNotificationManager::RemoveObserver(
92 DriveNotificationObserver* observer) { 94 DriveNotificationObserver* observer) {
93 observers_.RemoveObserver(observer); 95 observers_.RemoveObserver(observer);
94 } 96 }
95 97
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 return "NOTIFICATION_XMPP"; 152 return "NOTIFICATION_XMPP";
151 case NOTIFICATION_POLLING: 153 case NOTIFICATION_POLLING:
152 return "NOTIFICATION_POLLING"; 154 return "NOTIFICATION_POLLING";
153 } 155 }
154 156
155 NOTREACHED(); 157 NOTREACHED();
156 return ""; 158 return "";
157 } 159 }
158 160
159 } // namespace drive 161 } // namespace drive
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698