| 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/base64.h" | 10 #include "base/base64.h" |
| (...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 348 NullEncryptor null_encryptor; | 348 NullEncryptor null_encryptor; |
| 349 LoggingUnrecoverableErrorHandler unrecoverable_error_handler; | 349 LoggingUnrecoverableErrorHandler unrecoverable_error_handler; |
| 350 sync_manager->Init(database_dir.path(), | 350 sync_manager->Init(database_dir.path(), |
| 351 WeakHandle<JsEventHandler>( | 351 WeakHandle<JsEventHandler>( |
| 352 js_event_handler.AsWeakPtr()), | 352 js_event_handler.AsWeakPtr()), |
| 353 kSyncServerAndPath, | 353 kSyncServerAndPath, |
| 354 kSyncServerPort, | 354 kSyncServerPort, |
| 355 kUseSsl, | 355 kUseSsl, |
| 356 blocking_task_runner, | 356 blocking_task_runner, |
| 357 post_factory.Pass(), | 357 post_factory.Pass(), |
| 358 routing_info, | |
| 359 workers, | 358 workers, |
| 360 extensions_activity_monitor, | 359 extensions_activity_monitor, |
| 361 &change_delegate, | 360 &change_delegate, |
| 362 credentials, | 361 credentials, |
| 363 scoped_ptr<SyncNotifier>( | 362 scoped_ptr<SyncNotifier>( |
| 364 sync_notifier_factory.CreateSyncNotifier()), | 363 sync_notifier_factory.CreateSyncNotifier()), |
| 365 kRestoredKeyForBootstrapping, | 364 kRestoredKeyForBootstrapping, |
| 366 scoped_ptr<InternalComponentsFactory>( | 365 scoped_ptr<InternalComponentsFactory>( |
| 367 new InternalComponentsFactoryImpl()), | 366 new InternalComponentsFactoryImpl()), |
| 368 &null_encryptor, | 367 &null_encryptor, |
| 369 &unrecoverable_error_handler, | 368 &unrecoverable_error_handler, |
| 370 &LogUnrecoverableErrorContext); | 369 &LogUnrecoverableErrorContext); |
| 371 // TODO(akalin): Avoid passing in model parameters multiple times by | 370 // TODO(akalin): Avoid passing in model parameters multiple times by |
| 372 // organizing handling of model types. | 371 // organizing handling of model types. |
| 373 sync_manager->UpdateEnabledTypes(model_types); | 372 sync_manager->UpdateEnabledTypes(model_types); |
| 374 sync_manager->StartSyncingNormally(routing_info); | 373 sync_manager->StartSyncingNormally(routing_info); |
| 375 | 374 |
| 376 sync_loop.Run(); | 375 sync_loop.Run(); |
| 377 | 376 |
| 378 io_thread.Stop(); | 377 io_thread.Stop(); |
| 379 return 0; | 378 return 0; |
| 380 } | 379 } |
| 381 | 380 |
| 382 } // namespace | 381 } // namespace |
| 383 } // namespace syncer | 382 } // namespace syncer |
| 384 | 383 |
| 385 int main(int argc, char* argv[]) { | 384 int main(int argc, char* argv[]) { |
| 386 return syncer::SyncClientMain(argc, argv); | 385 return syncer::SyncClientMain(argc, argv); |
| 387 } | 386 } |
| OLD | NEW |