| OLD | NEW |
| 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 Loading... |
| 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 |
| OLD | NEW |