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

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

Issue 2471183003: Do not observe MessageLoop destruction from ModelSafeWorker. (Closed)
Patch Set: CR maxbogue #23 Created 4 years, 1 month 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>
(...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after
376 model_types.Put(PRIORITY_PREFERENCES); 376 model_types.Put(PRIORITY_PREFERENCES);
377 model_types.Put(DICTIONARY); 377 model_types.Put(DICTIONARY);
378 model_types.Put(FAVICON_IMAGES); 378 model_types.Put(FAVICON_IMAGES);
379 model_types.Put(FAVICON_TRACKING); 379 model_types.Put(FAVICON_TRACKING);
380 380
381 ModelSafeRoutingInfo routing_info; 381 ModelSafeRoutingInfo routing_info;
382 for (ModelTypeSet::Iterator it = model_types.First(); it.Good(); it.Inc()) { 382 for (ModelTypeSet::Iterator it = model_types.First(); it.Good(); it.Inc()) {
383 routing_info[it.Get()] = GROUP_PASSIVE; 383 routing_info[it.Get()] = GROUP_PASSIVE;
384 } 384 }
385 scoped_refptr<PassiveModelWorker> passive_model_safe_worker = 385 scoped_refptr<PassiveModelWorker> passive_model_safe_worker =
386 new PassiveModelWorker(nullptr); 386 new PassiveModelWorker();
387 std::vector<scoped_refptr<ModelSafeWorker>> workers; 387 std::vector<scoped_refptr<ModelSafeWorker>> workers;
388 workers.push_back(passive_model_safe_worker); 388 workers.push_back(passive_model_safe_worker);
389 389
390 // Set up sync manager. 390 // Set up sync manager.
391 SyncManagerFactory sync_manager_factory; 391 SyncManagerFactory sync_manager_factory;
392 std::unique_ptr<SyncManager> sync_manager = 392 std::unique_ptr<SyncManager> sync_manager =
393 sync_manager_factory.CreateSyncManager("sync_client manager"); 393 sync_manager_factory.CreateSyncManager("sync_client manager");
394 LoggingJsEventHandler js_event_handler; 394 LoggingJsEventHandler js_event_handler;
395 // Used only by InitialProcessMetadata(), so it's okay to leave this as null. 395 // Used only by InitialProcessMetadata(), so it's okay to leave this as null.
396 const scoped_refptr<base::TaskRunner> blocking_task_runner = nullptr; 396 const scoped_refptr<base::TaskRunner> blocking_task_runner = nullptr;
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
449 io_thread.Stop(); 449 io_thread.Stop();
450 return 0; 450 return 0;
451 } 451 }
452 452
453 } // namespace 453 } // namespace
454 } // namespace syncer 454 } // namespace syncer
455 455
456 int main(int argc, char* argv[]) { 456 int main(int argc, char* argv[]) {
457 return syncer::SyncClientMain(argc, argv); 457 return syncer::SyncClientMain(argc, argv);
458 } 458 }
OLDNEW
« no previous file with comments | « components/sync/test/engine/fake_model_worker.cc ('k') | ios/chrome/browser/sync/ios_chrome_sync_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698