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

Side by Side Diff: chrome/browser/extensions/api/push_messaging/push_messaging_invalidation_handler.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/extensions/api/push_messaging/push_messaging_invalidati on_handler.h" 5 #include "chrome/browser/extensions/api/push_messaging/push_messaging_invalidati on_handler.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/strings/string_number_conversions.h" 10 #include "base/strings/string_number_conversions.h"
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 << extension_id << ", subchannel is " << subchannel 173 << extension_id << ", subchannel is " << subchannel
174 << ", and payload is " << max_invalidation.payload(); 174 << ", and payload is " << max_invalidation.payload();
175 delegate_->OnMessage(extension_id, 175 delegate_->OnMessage(extension_id,
176 subchannel, 176 subchannel,
177 max_invalidation.payload()); 177 max_invalidation.payload());
178 } 178 }
179 } 179 }
180 } 180 }
181 } 181 }
182 182
183 std::string PushMessagingInvalidationHandler::GetOwnerName() const {
184 return "PushMessagingApi";
185 }
186
183 void PushMessagingInvalidationHandler::UpdateRegistrations() { 187 void PushMessagingInvalidationHandler::UpdateRegistrations() {
184 syncer::ObjectIdSet ids; 188 syncer::ObjectIdSet ids;
185 for (std::set<std::string>::const_iterator it = 189 for (std::set<std::string>::const_iterator it =
186 registered_extensions_.begin(); it != registered_extensions_.end(); 190 registered_extensions_.begin(); it != registered_extensions_.end();
187 ++it) { 191 ++it) {
188 const syncer::ObjectIdSet& object_ids = ExtensionIdToObjectIds(*it); 192 const syncer::ObjectIdSet& object_ids = ExtensionIdToObjectIds(*it);
189 ids.insert(object_ids.begin(), object_ids.end()); 193 ids.insert(object_ids.begin(), object_ids.end());
190 } 194 }
191 service_->UpdateRegisteredInvalidationIds(this, ids); 195 service_->UpdateRegisteredInvalidationIds(this, ids);
192 } 196 }
193 197
194 } // namespace extensions 198 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698