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

Side by Side Diff: sync/tools/sync_listen_notifications.cc

Issue 12114012: Remove syncer::IncomingInvalidationSource (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove comment Created 7 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 | Annotate | Revision Log
« no previous file with comments | « sync/notifier/p2p_invalidator_unittest.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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 public: 52 public:
53 NotificationPrinter() {} 53 NotificationPrinter() {}
54 virtual ~NotificationPrinter() {} 54 virtual ~NotificationPrinter() {}
55 55
56 virtual void OnInvalidatorStateChange(InvalidatorState state) OVERRIDE { 56 virtual void OnInvalidatorStateChange(InvalidatorState state) OVERRIDE {
57 LOG(INFO) << "Invalidator state changed to " 57 LOG(INFO) << "Invalidator state changed to "
58 << InvalidatorStateToString(state); 58 << InvalidatorStateToString(state);
59 } 59 }
60 60
61 virtual void OnIncomingInvalidation( 61 virtual void OnIncomingInvalidation(
62 const ObjectIdInvalidationMap& invalidation_map, 62 const ObjectIdInvalidationMap& invalidation_map) OVERRIDE {
63 IncomingInvalidationSource source) OVERRIDE {
64 const ModelTypeInvalidationMap& type_invalidation_map = 63 const ModelTypeInvalidationMap& type_invalidation_map =
65 ObjectIdInvalidationMapToModelTypeInvalidationMap(invalidation_map); 64 ObjectIdInvalidationMapToModelTypeInvalidationMap(invalidation_map);
66 for (ModelTypeInvalidationMap::const_iterator it = 65 for (ModelTypeInvalidationMap::const_iterator it =
67 type_invalidation_map.begin(); it != type_invalidation_map.end(); 66 type_invalidation_map.begin(); it != type_invalidation_map.end();
68 ++it) { 67 ++it) {
69 LOG(INFO) << (source == REMOTE_INVALIDATION ? "Remote" : "Local") 68 LOG(INFO) << "Remote invalidation: type = "
70 << " Invalidation: type = "
71 << ModelTypeToString(it->first) 69 << ModelTypeToString(it->first)
72 << ", payload = " << it->second.payload; 70 << ", payload = " << it->second.payload;
73 } 71 }
74 } 72 }
75 73
76 private: 74 private:
77 DISALLOW_COPY_AND_ASSIGN(NotificationPrinter); 75 DISALLOW_COPY_AND_ASSIGN(NotificationPrinter);
78 }; 76 };
79 77
80 // Needed to use a real host resolver. 78 // Needed to use a real host resolver.
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 io_thread.Stop(); 216 io_thread.Stop();
219 return 0; 217 return 0;
220 } 218 }
221 219
222 } // namespace 220 } // namespace
223 } // namespace syncer 221 } // namespace syncer
224 222
225 int main(int argc, char* argv[]) { 223 int main(int argc, char* argv[]) {
226 return syncer::SyncListenNotificationsMain(argc, argv); 224 return syncer::SyncListenNotificationsMain(argc, argv);
227 } 225 }
OLDNEW
« no previous file with comments | « sync/notifier/p2p_invalidator_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698