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 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
194 &null_invalidation_state_tracker, | 194 &null_invalidation_state_tracker, |
195 kClientInfo, | 195 kClientInfo, |
196 notifier_options.request_context_getter)); | 196 notifier_options.request_context_getter)); |
197 | 197 |
198 NotificationPrinter notification_printer; | 198 NotificationPrinter notification_printer; |
199 | 199 |
200 invalidator->UpdateCredentials(email, token); | 200 invalidator->UpdateCredentials(email, token); |
201 | 201 |
202 // Listen for notifications for all known types. | 202 // Listen for notifications for all known types. |
203 invalidator->RegisterHandler(¬ification_printer); | 203 invalidator->RegisterHandler(¬ification_printer); |
204 invalidator->UpdateRegisteredIds( | 204 CHECK(invalidator->UpdateRegisteredIds( |
205 ¬ification_printer, ModelTypeSetToObjectIdSet(ModelTypeSet::All())); | 205 ¬ification_printer, ModelTypeSetToObjectIdSet(ModelTypeSet::All()))); |
206 | 206 |
207 ui_loop.Run(); | 207 ui_loop.Run(); |
208 | 208 |
209 invalidator->UnregisterHandler(¬ification_printer); | 209 invalidator->UnregisterHandler(¬ification_printer); |
210 io_thread.Stop(); | 210 io_thread.Stop(); |
211 return 0; | 211 return 0; |
212 } | 212 } |
213 | 213 |
214 } // namespace | 214 } // namespace |
215 } // namespace syncer | 215 } // namespace syncer |
216 | 216 |
217 int main(int argc, char* argv[]) { | 217 int main(int argc, char* argv[]) { |
218 return syncer::SyncListenNotificationsMain(argc, argv); | 218 return syncer::SyncListenNotificationsMain(argc, argv); |
219 } | 219 } |
OLD | NEW |