| 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 427 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 438 args.encryptor = &null_encryptor; | 438 args.encryptor = &null_encryptor; |
| 439 args.unrecoverable_error_handler.reset(new LoggingUnrecoverableErrorHandler); | 439 args.unrecoverable_error_handler.reset(new LoggingUnrecoverableErrorHandler); |
| 440 args.report_unrecoverable_error_function = &LogUnrecoverableErrorContext; | 440 args.report_unrecoverable_error_function = &LogUnrecoverableErrorContext; |
| 441 args.cancelation_signal = &scm_cancelation_signal; | 441 args.cancelation_signal = &scm_cancelation_signal; |
| 442 sync_manager->Init(&args); | 442 sync_manager->Init(&args); |
| 443 // TODO(akalin): Avoid passing in model parameters multiple times by | 443 // TODO(akalin): Avoid passing in model parameters multiple times by |
| 444 // organizing handling of model types. | 444 // organizing handling of model types. |
| 445 invalidator->UpdateCredentials(credentials.email, credentials.sync_token); | 445 invalidator->UpdateCredentials(credentials.email, credentials.sync_token); |
| 446 scoped_ptr<InvalidatorShim> shim(new InvalidatorShim(sync_manager.get())); | 446 scoped_ptr<InvalidatorShim> shim(new InvalidatorShim(sync_manager.get())); |
| 447 invalidator->RegisterHandler(shim.get()); | 447 invalidator->RegisterHandler(shim.get()); |
| 448 invalidator->UpdateRegisteredIds( | 448 CHECK(invalidator->UpdateRegisteredIds( |
| 449 shim.get(), ModelTypeSetToObjectIdSet(model_types)); | 449 shim.get(), ModelTypeSetToObjectIdSet(model_types))); |
| 450 sync_manager->StartSyncingNormally(routing_info, base::Time()); | 450 sync_manager->StartSyncingNormally(routing_info, base::Time()); |
| 451 | 451 |
| 452 sync_loop.Run(); | 452 sync_loop.Run(); |
| 453 | 453 |
| 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 |