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