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

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

Issue 1275743002: [Sync] Remove backend unrecoverable error handler (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix leak Created 5 years, 4 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
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 417 matching lines...) Expand 10 before | Expand all | Expand 10 after
428 args.extensions_activity = extensions_activity; 428 args.extensions_activity = extensions_activity;
429 args.change_delegate = &change_delegate; 429 args.change_delegate = &change_delegate;
430 args.credentials = credentials; 430 args.credentials = credentials;
431 args.invalidator_client_id = invalidator_id; 431 args.invalidator_client_id = invalidator_id;
432 args.restored_key_for_bootstrapping = kRestoredKeyForBootstrapping; 432 args.restored_key_for_bootstrapping = kRestoredKeyForBootstrapping;
433 args.restored_keystore_key_for_bootstrapping = 433 args.restored_keystore_key_for_bootstrapping =
434 kRestoredKeystoreKeyForBootstrapping; 434 kRestoredKeystoreKeyForBootstrapping;
435 args.internal_components_factory.reset( 435 args.internal_components_factory.reset(
436 new InternalComponentsFactoryImpl(factory_switches)); 436 new InternalComponentsFactoryImpl(factory_switches));
437 args.encryptor = &null_encryptor; 437 args.encryptor = &null_encryptor;
438 args.unrecoverable_error_handler.reset(new LoggingUnrecoverableErrorHandler); 438 args.unrecoverable_error_handler = WeakHandle<UnrecoverableErrorHandler>();
439 args.report_unrecoverable_error_function = 439 args.report_unrecoverable_error_function =
440 base::Bind(LogUnrecoverableErrorContext); 440 base::Bind(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 CHECK(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 }
OLDNEW
« no previous file with comments | « sync/test/engine/test_directory_setter_upper.cc ('k') | sync/util/mock_unrecoverable_error_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698