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

Side by Side Diff: sync/tools/sync_listen_notifications.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
« no previous file with comments | « sync/notifier/non_blocking_invalidator.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <cstddef> 5 #include <cstddef>
6 #include <cstdio> 6 #include <cstdio>
7 #include <string> 7 #include <string>
8 8
9 #include "base/at_exit.h" 9 #include "base/at_exit.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 60
61 virtual void OnIncomingInvalidation( 61 virtual void OnIncomingInvalidation(
62 const ObjectIdInvalidationMap& invalidation_map) OVERRIDE { 62 const ObjectIdInvalidationMap& invalidation_map) OVERRIDE {
63 ObjectIdSet ids = invalidation_map.GetObjectIds(); 63 ObjectIdSet ids = invalidation_map.GetObjectIds();
64 for (ObjectIdSet::const_iterator it = ids.begin(); it != ids.end(); ++it) { 64 for (ObjectIdSet::const_iterator it = ids.begin(); it != ids.end(); ++it) {
65 LOG(INFO) << "Remote invalidation: " 65 LOG(INFO) << "Remote invalidation: "
66 << invalidation_map.ToString(); 66 << invalidation_map.ToString();
67 } 67 }
68 } 68 }
69 69
70 virtual std::string GetOwnerName() const OVERRIDE {
71 return "NotificationPrinter";
72 }
73
70 private: 74 private:
71 DISALLOW_COPY_AND_ASSIGN(NotificationPrinter); 75 DISALLOW_COPY_AND_ASSIGN(NotificationPrinter);
72 }; 76 };
73 77
74 // Needed to use a real host resolver. 78 // Needed to use a real host resolver.
75 class MyTestURLRequestContext : public net::TestURLRequestContext { 79 class MyTestURLRequestContext : public net::TestURLRequestContext {
76 public: 80 public:
77 MyTestURLRequestContext() : TestURLRequestContext(true) { 81 MyTestURLRequestContext() : TestURLRequestContext(true) {
78 context_storage_.set_host_resolver( 82 context_storage_.set_host_resolver(
79 net::HostResolver::CreateDefaultResolver(NULL)); 83 net::HostResolver::CreateDefaultResolver(NULL));
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 io_thread.Stop(); 212 io_thread.Stop();
209 return 0; 213 return 0;
210 } 214 }
211 215
212 } // namespace 216 } // namespace
213 } // namespace syncer 217 } // namespace syncer
214 218
215 int main(int argc, char* argv[]) { 219 int main(int argc, char* argv[]) {
216 return syncer::SyncListenNotificationsMain(argc, argv); 220 return syncer::SyncListenNotificationsMain(argc, argv);
217 } 221 }
OLDNEW
« no previous file with comments | « sync/notifier/non_blocking_invalidator.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698