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

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

Issue 2086363002: Remove calls to deprecated MessageLoop methods in sync. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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 <stdint.h> 5 #include <stdint.h>
6 6
7 #include <cstddef> 7 #include <cstddef>
8 #include <cstdio> 8 #include <cstdio>
9 #include <memory> 9 #include <memory>
10 #include <string> 10 #include <string>
11 #include <utility> 11 #include <utility>
12 12
13 #include "base/at_exit.h" 13 #include "base/at_exit.h"
14 #include "base/command_line.h" 14 #include "base/command_line.h"
15 #include "base/compiler_specific.h" 15 #include "base/compiler_specific.h"
16 #include "base/debug/stack_trace.h" 16 #include "base/debug/stack_trace.h"
17 #include "base/files/scoped_temp_dir.h" 17 #include "base/files/scoped_temp_dir.h"
18 #include "base/json/json_writer.h" 18 #include "base/json/json_writer.h"
19 #include "base/logging.h" 19 #include "base/logging.h"
20 #include "base/memory/ptr_util.h" 20 #include "base/memory/ptr_util.h"
21 #include "base/memory/ref_counted.h" 21 #include "base/memory/ref_counted.h"
22 #include "base/memory/weak_ptr.h" 22 #include "base/memory/weak_ptr.h"
23 #include "base/message_loop/message_loop.h" 23 #include "base/message_loop/message_loop.h"
24 #include "base/rand_util.h" 24 #include "base/rand_util.h"
25 #include "base/run_loop.h"
25 #include "base/task_runner.h" 26 #include "base/task_runner.h"
26 #include "base/threading/thread.h" 27 #include "base/threading/thread.h"
27 #include "build/build_config.h" 28 #include "build/build_config.h"
28 #include "components/invalidation/impl/non_blocking_invalidator.h" 29 #include "components/invalidation/impl/non_blocking_invalidator.h"
29 #include "components/invalidation/public/object_id_invalidation_map.h" 30 #include "components/invalidation/public/object_id_invalidation_map.h"
30 #include "components/sync_driver/invalidation_helper.h" 31 #include "components/sync_driver/invalidation_helper.h"
31 #include "jingle/notifier/base/notification_method.h" 32 #include "jingle/notifier/base/notification_method.h"
32 #include "jingle/notifier/base/notifier_options.h" 33 #include "jingle/notifier/base/notifier_options.h"
33 #include "net/base/host_port_pair.h" 34 #include "net/base/host_port_pair.h"
34 #include "net/base/network_change_notifier.h" 35 #include "net/base/network_change_notifier.h"
(...skipping 412 matching lines...) Expand 10 before | Expand all | Expand 10 after
447 // TODO(akalin): Avoid passing in model parameters multiple times by 448 // TODO(akalin): Avoid passing in model parameters multiple times by
448 // organizing handling of model types. 449 // organizing handling of model types.
449 invalidator->UpdateCredentials(credentials.email, credentials.sync_token); 450 invalidator->UpdateCredentials(credentials.email, credentials.sync_token);
450 std::unique_ptr<InvalidatorShim> shim( 451 std::unique_ptr<InvalidatorShim> shim(
451 new InvalidatorShim(sync_manager.get())); 452 new InvalidatorShim(sync_manager.get()));
452 invalidator->RegisterHandler(shim.get()); 453 invalidator->RegisterHandler(shim.get());
453 CHECK(invalidator->UpdateRegisteredIds( 454 CHECK(invalidator->UpdateRegisteredIds(
454 shim.get(), ModelTypeSetToObjectIdSet(model_types))); 455 shim.get(), ModelTypeSetToObjectIdSet(model_types)));
455 sync_manager->StartSyncingNormally(routing_info, base::Time()); 456 sync_manager->StartSyncingNormally(routing_info, base::Time());
456 457
457 sync_loop.Run(); 458 base::RunLoop().Run();
458 459
459 io_thread.Stop(); 460 io_thread.Stop();
460 return 0; 461 return 0;
461 } 462 }
462 463
463 } // namespace 464 } // namespace
464 } // namespace syncer 465 } // namespace syncer
465 466
466 int main(int argc, char* argv[]) { 467 int main(int argc, char* argv[]) {
467 return syncer::SyncClientMain(argc, argv); 468 return syncer::SyncClientMain(argc, argv);
468 } 469 }
OLDNEW
« no previous file with comments | « sync/internal_api/syncapi_server_connection_manager_unittest.cc ('k') | sync/tools/sync_listen_notifications.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698