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 27 matching lines...) Expand all Loading... |
38 // listens to any received notifications. | 38 // listens to any received notifications. |
39 | 39 |
40 namespace syncer { | 40 namespace syncer { |
41 namespace { | 41 namespace { |
42 | 42 |
43 const char kEmailSwitch[] = "email"; | 43 const char kEmailSwitch[] = "email"; |
44 const char kTokenSwitch[] = "token"; | 44 const char kTokenSwitch[] = "token"; |
45 const char kHostPortSwitch[] = "host-port"; | 45 const char kHostPortSwitch[] = "host-port"; |
46 const char kTrySslTcpFirstSwitch[] = "try-ssltcp-first"; | 46 const char kTrySslTcpFirstSwitch[] = "try-ssltcp-first"; |
47 const char kAllowInsecureConnectionSwitch[] = "allow-insecure-connection"; | 47 const char kAllowInsecureConnectionSwitch[] = "allow-insecure-connection"; |
48 const char kNotificationMethodSwitch[] = "notification-method"; | |
49 | 48 |
50 // Class to print received notifications events. | 49 // Class to print received notifications events. |
51 class NotificationPrinter : public InvalidationHandler { | 50 class NotificationPrinter : public InvalidationHandler { |
52 public: | 51 public: |
53 NotificationPrinter() {} | 52 NotificationPrinter() {} |
54 virtual ~NotificationPrinter() {} | 53 virtual ~NotificationPrinter() {} |
55 | 54 |
56 virtual void OnInvalidatorStateChange(InvalidatorState state) OVERRIDE { | 55 virtual void OnInvalidatorStateChange(InvalidatorState state) OVERRIDE { |
57 LOG(INFO) << "Invalidator state changed to " | 56 LOG(INFO) << "Invalidator state changed to " |
58 << InvalidatorStateToString(state); | 57 << InvalidatorStateToString(state); |
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
206 io_thread.Stop(); | 205 io_thread.Stop(); |
207 return 0; | 206 return 0; |
208 } | 207 } |
209 | 208 |
210 } // namespace | 209 } // namespace |
211 } // namespace syncer | 210 } // namespace syncer |
212 | 211 |
213 int main(int argc, char* argv[]) { | 212 int main(int argc, char* argv[]) { |
214 return syncer::SyncListenNotificationsMain(argc, argv); | 213 return syncer::SyncListenNotificationsMain(argc, argv); |
215 } | 214 } |
OLD | NEW |