| 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 312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 323 kXmppAllowInsecureConnectionSwitch); | 323 kXmppAllowInsecureConnectionSwitch); |
| 324 return -1; | 324 return -1; |
| 325 } | 325 } |
| 326 | 326 |
| 327 // Set up objects that monitor the network. | 327 // Set up objects that monitor the network. |
| 328 scoped_ptr<net::NetworkChangeNotifier> network_change_notifier( | 328 scoped_ptr<net::NetworkChangeNotifier> network_change_notifier( |
| 329 net::NetworkChangeNotifier::Create()); | 329 net::NetworkChangeNotifier::Create()); |
| 330 | 330 |
| 331 // Set up sync notifier factory. | 331 // Set up sync notifier factory. |
| 332 const scoped_refptr<MyTestURLRequestContextGetter> context_getter = | 332 const scoped_refptr<MyTestURLRequestContextGetter> context_getter = |
| 333 new MyTestURLRequestContextGetter(io_thread.message_loop_proxy()); | 333 new MyTestURLRequestContextGetter(io_thread.task_runner()); |
| 334 const notifier::NotifierOptions& notifier_options = | 334 const notifier::NotifierOptions& notifier_options = |
| 335 ParseNotifierOptions(command_line, context_getter); | 335 ParseNotifierOptions(command_line, context_getter); |
| 336 syncer::NetworkChannelCreator network_channel_creator = | 336 syncer::NetworkChannelCreator network_channel_creator = |
| 337 syncer::NonBlockingInvalidator::MakePushClientChannelCreator( | 337 syncer::NonBlockingInvalidator::MakePushClientChannelCreator( |
| 338 notifier_options); | 338 notifier_options); |
| 339 const char kClientInfo[] = "standalone_sync_client"; | 339 const char kClientInfo[] = "standalone_sync_client"; |
| 340 std::string invalidator_id = base::RandBytesAsString(8); | 340 std::string invalidator_id = base::RandBytesAsString(8); |
| 341 NullInvalidationStateTracker null_invalidation_state_tracker; | 341 NullInvalidationStateTracker null_invalidation_state_tracker; |
| 342 scoped_ptr<Invalidator> invalidator(new NonBlockingInvalidator( | 342 scoped_ptr<Invalidator> invalidator(new NonBlockingInvalidator( |
| 343 network_channel_creator, | 343 network_channel_creator, |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 454 io_thread.Stop(); | 454 io_thread.Stop(); |
| 455 return 0; | 455 return 0; |
| 456 } | 456 } |
| 457 | 457 |
| 458 } // namespace | 458 } // namespace |
| 459 } // namespace syncer | 459 } // namespace syncer |
| 460 | 460 |
| 461 int main(int argc, char* argv[]) { | 461 int main(int argc, char* argv[]) { |
| 462 return syncer::SyncClientMain(argc, argv); | 462 return syncer::SyncClientMain(argc, argv); |
| 463 } | 463 } |
| OLD | NEW |