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 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
172 return -1; | 172 return -1; |
173 } | 173 } |
174 | 174 |
175 // Set up objects that monitor the network. | 175 // Set up objects that monitor the network. |
176 scoped_ptr<net::NetworkChangeNotifier> network_change_notifier( | 176 scoped_ptr<net::NetworkChangeNotifier> network_change_notifier( |
177 net::NetworkChangeNotifier::Create()); | 177 net::NetworkChangeNotifier::Create()); |
178 | 178 |
179 const notifier::NotifierOptions& notifier_options = | 179 const notifier::NotifierOptions& notifier_options = |
180 ParseNotifierOptions( | 180 ParseNotifierOptions( |
181 command_line, | 181 command_line, |
182 new MyTestURLRequestContextGetter(io_thread.message_loop_proxy())); | 182 new MyTestURLRequestContextGetter(io_thread.task_runner())); |
183 syncer::NetworkChannelCreator network_channel_creator = | 183 syncer::NetworkChannelCreator network_channel_creator = |
184 syncer::NonBlockingInvalidator::MakePushClientChannelCreator( | 184 syncer::NonBlockingInvalidator::MakePushClientChannelCreator( |
185 notifier_options); | 185 notifier_options); |
186 const char kClientInfo[] = "sync_listen_notifications"; | 186 const char kClientInfo[] = "sync_listen_notifications"; |
187 NullInvalidationStateTracker null_invalidation_state_tracker; | 187 NullInvalidationStateTracker null_invalidation_state_tracker; |
188 scoped_ptr<Invalidator> invalidator( | 188 scoped_ptr<Invalidator> invalidator( |
189 new NonBlockingInvalidator( | 189 new NonBlockingInvalidator( |
190 network_channel_creator, | 190 network_channel_creator, |
191 base::RandBytesAsString(8), | 191 base::RandBytesAsString(8), |
192 null_invalidation_state_tracker.GetSavedInvalidations(), | 192 null_invalidation_state_tracker.GetSavedInvalidations(), |
(...skipping 17 matching lines...) Expand all Loading... |
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 |