| 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" |
| 11 #include "base/strings/string_split.h" | 11 #include "base/strings/string_split.h" |
| 12 #include "chrome/browser/extensions/api/push_messaging/push_messaging_invalidati
on_handler_delegate.h" | 12 #include "chrome/browser/extensions/api/push_messaging/push_messaging_invalidati
on_handler_delegate.h" |
| 13 #include "chrome/browser/invalidation/invalidation_service.h" | 13 #include "chrome/browser/invalidation/invalidation_service.h" |
| 14 #include "chrome/common/extensions/extension.h" | 14 #include "extensions/common/extension.h" |
| 15 #include "google/cacheinvalidation/types.pb.h" | 15 #include "google/cacheinvalidation/types.pb.h" |
| 16 #include "sync/notifier/object_id_invalidation_map.h" | 16 #include "sync/notifier/object_id_invalidation_map.h" |
| 17 | 17 |
| 18 namespace extensions { | 18 namespace extensions { |
| 19 | 19 |
| 20 namespace { | 20 namespace { |
| 21 | 21 |
| 22 const int kNumberOfSubchannels = 4; | 22 const int kNumberOfSubchannels = 4; |
| 23 | 23 |
| 24 // Chrome push messaging object IDs currently have the following format: | 24 // Chrome push messaging object IDs currently have the following format: |
| (...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 166 for (std::set<std::string>::const_iterator it = | 166 for (std::set<std::string>::const_iterator it = |
| 167 registered_extensions_.begin(); it != registered_extensions_.end(); | 167 registered_extensions_.begin(); it != registered_extensions_.end(); |
| 168 ++it) { | 168 ++it) { |
| 169 const syncer::ObjectIdSet& object_ids = ExtensionIdToObjectIds(*it); | 169 const syncer::ObjectIdSet& object_ids = ExtensionIdToObjectIds(*it); |
| 170 ids.insert(object_ids.begin(), object_ids.end()); | 170 ids.insert(object_ids.begin(), object_ids.end()); |
| 171 } | 171 } |
| 172 service_->UpdateRegisteredInvalidationIds(this, ids); | 172 service_->UpdateRegisteredInvalidationIds(this, ids); |
| 173 } | 173 } |
| 174 | 174 |
| 175 } // namespace extensions | 175 } // namespace extensions |
| OLD | NEW |