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

Side by Side Diff: chrome/browser/extensions/api/push_messaging/push_messaging_invalidation_handler.cc

Issue 387733004: Move sync/notifier to components/invalidation (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: (GN) Comment out dependency on internal target Created 6 years, 5 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 | Annotate | Revision Log
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"
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 "components/invalidation/invalidation_service.h" 13 #include "components/invalidation/invalidation_service.h"
14 #include "components/invalidation/object_id_invalidation_map.h"
14 #include "extensions/common/extension.h" 15 #include "extensions/common/extension.h"
15 #include "google/cacheinvalidation/types.pb.h" 16 #include "google/cacheinvalidation/types.pb.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:
25 // <format type>/<GAIA ID>/<extension ID>/<subchannel> 25 // <format type>/<GAIA ID>/<extension ID>/<subchannel>
26 // <format type> must be 'U', and <GAIA ID> is handled server-side so the client 26 // <format type> must be 'U', and <GAIA ID> is handled server-side so the client
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 for (std::set<std::string>::const_iterator it = 189 for (std::set<std::string>::const_iterator it =
190 registered_extensions_.begin(); it != registered_extensions_.end(); 190 registered_extensions_.begin(); it != registered_extensions_.end();
191 ++it) { 191 ++it) {
192 const syncer::ObjectIdSet& object_ids = ExtensionIdToObjectIds(*it); 192 const syncer::ObjectIdSet& object_ids = ExtensionIdToObjectIds(*it);
193 ids.insert(object_ids.begin(), object_ids.end()); 193 ids.insert(object_ids.begin(), object_ids.end());
194 } 194 }
195 service_->UpdateRegisteredInvalidationIds(this, ids); 195 service_->UpdateRegisteredInvalidationIds(this, ids);
196 } 196 }
197 197
198 } // namespace extensions 198 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698