Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4)

Side by Side Diff: sync/tools/sync_client.cc

Issue 1144443004: Revert of [Sync] Refactoring polling to be reliable. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « sync/test/engine/fake_sync_scheduler.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 429 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 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);
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 }
OLDNEW
« no previous file with comments | « sync/test/engine/fake_sync_scheduler.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698