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

Side by Side Diff: ios/chrome/browser/sync/ios_chrome_sync_client.mm

Issue 2942773002: Task Scheduler API migration: change BrowserThreadModelWorker to SequencedModelWorker (Closed)
Patch Set: Updated more comments to reflect thread -> sequence migration. Created 3 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
« no previous file with comments | « components/sync/test/engine/fake_model_worker.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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "ios/chrome/browser/sync/ios_chrome_sync_client.h" 5 #include "ios/chrome/browser/sync/ios_chrome_sync_client.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 17 matching lines...) Expand all
28 #include "components/invalidation/impl/profile_invalidation_provider.h" 28 #include "components/invalidation/impl/profile_invalidation_provider.h"
29 #include "components/keyed_service/core/service_access_type.h" 29 #include "components/keyed_service/core/service_access_type.h"
30 #include "components/password_manager/core/browser/password_store.h" 30 #include "components/password_manager/core/browser/password_store.h"
31 #include "components/password_manager/sync/browser/password_model_worker.h" 31 #include "components/password_manager/sync/browser/password_model_worker.h"
32 #include "components/reading_list/core/reading_list_model.h" 32 #include "components/reading_list/core/reading_list_model.h"
33 #include "components/search_engines/search_engine_data_type_controller.h" 33 #include "components/search_engines/search_engine_data_type_controller.h"
34 #include "components/signin/core/browser/profile_oauth2_token_service.h" 34 #include "components/signin/core/browser/profile_oauth2_token_service.h"
35 #include "components/sync/base/report_unrecoverable_error.h" 35 #include "components/sync/base/report_unrecoverable_error.h"
36 #include "components/sync/driver/sync_api_component_factory.h" 36 #include "components/sync/driver/sync_api_component_factory.h"
37 #include "components/sync/driver/sync_util.h" 37 #include "components/sync/driver/sync_util.h"
38 #include "components/sync/engine/browser_thread_model_worker.h"
39 #include "components/sync/engine/passive_model_worker.h" 38 #include "components/sync/engine/passive_model_worker.h"
39 #include "components/sync/engine/sequenced_model_worker.h"
40 #include "components/sync/engine/ui_model_worker.h" 40 #include "components/sync/engine/ui_model_worker.h"
41 #include "components/sync_preferences/pref_service_syncable.h" 41 #include "components/sync_preferences/pref_service_syncable.h"
42 #include "components/sync_sessions/favicon_cache.h" 42 #include "components/sync_sessions/favicon_cache.h"
43 #include "components/sync_sessions/local_session_event_router.h" 43 #include "components/sync_sessions/local_session_event_router.h"
44 #include "components/sync_sessions/sync_sessions_client.h" 44 #include "components/sync_sessions/sync_sessions_client.h"
45 #include "components/sync_sessions/synced_window_delegates_getter.h" 45 #include "components/sync_sessions/synced_window_delegates_getter.h"
46 #include "ios/chrome/browser/application_context.h" 46 #include "ios/chrome/browser/application_context.h"
47 #include "ios/chrome/browser/autofill/personal_data_manager_factory.h" 47 #include "ios/chrome/browser/autofill/personal_data_manager_factory.h"
48 #include "ios/chrome/browser/bookmarks/bookmark_model_factory.h" 48 #include "ios/chrome/browser/bookmarks/bookmark_model_factory.h"
49 #include "ios/chrome/browser/browser_state/chrome_browser_state.h" 49 #include "ios/chrome/browser/browser_state/chrome_browser_state.h"
(...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after
372 NOTREACHED(); 372 NOTREACHED();
373 return base::WeakPtr<syncer::ModelTypeSyncBridge>(); 373 return base::WeakPtr<syncer::ModelTypeSyncBridge>();
374 } 374 }
375 } 375 }
376 376
377 scoped_refptr<syncer::ModelSafeWorker> 377 scoped_refptr<syncer::ModelSafeWorker>
378 IOSChromeSyncClient::CreateModelWorkerForGroup(syncer::ModelSafeGroup group) { 378 IOSChromeSyncClient::CreateModelWorkerForGroup(syncer::ModelSafeGroup group) {
379 DCHECK_CURRENTLY_ON(web::WebThread::UI); 379 DCHECK_CURRENTLY_ON(web::WebThread::UI);
380 switch (group) { 380 switch (group) {
381 case syncer::GROUP_DB: 381 case syncer::GROUP_DB:
382 return new syncer::BrowserThreadModelWorker( 382 return new syncer::SequencedModelWorker(
383 web::WebThread::GetTaskRunnerForThread(web::WebThread::DB), 383 web::WebThread::GetTaskRunnerForThread(web::WebThread::DB),
384 syncer::GROUP_DB); 384 syncer::GROUP_DB);
385 case syncer::GROUP_FILE: 385 case syncer::GROUP_FILE:
386 return new syncer::BrowserThreadModelWorker( 386 return new syncer::SequencedModelWorker(
387 web::WebThread::GetTaskRunnerForThread(web::WebThread::FILE), 387 web::WebThread::GetTaskRunnerForThread(web::WebThread::FILE),
388 syncer::GROUP_FILE); 388 syncer::GROUP_FILE);
389 case syncer::GROUP_UI: 389 case syncer::GROUP_UI:
390 return new syncer::UIModelWorker( 390 return new syncer::UIModelWorker(
391 web::WebThread::GetTaskRunnerForThread(web::WebThread::UI)); 391 web::WebThread::GetTaskRunnerForThread(web::WebThread::UI));
392 case syncer::GROUP_PASSIVE: 392 case syncer::GROUP_PASSIVE:
393 return new syncer::PassiveModelWorker(); 393 return new syncer::PassiveModelWorker();
394 case syncer::GROUP_HISTORY: { 394 case syncer::GROUP_HISTORY: {
395 history::HistoryService* history_service = GetHistoryService(); 395 history::HistoryService* history_service = GetHistoryService();
396 if (!history_service) 396 if (!history_service)
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
432 IOSChromeProfileSyncServiceFactory::GetForBrowserState(browser_state); 432 IOSChromeProfileSyncServiceFactory::GetForBrowserState(browser_state);
433 if (profile_sync_service != nullptr) { 433 if (profile_sync_service != nullptr) {
434 const syncer::DeviceInfoTracker* tracker = 434 const syncer::DeviceInfoTracker* tracker =
435 profile_sync_service->GetDeviceInfoTracker(); 435 profile_sync_service->GetDeviceInfoTracker();
436 if (tracker != nullptr) { 436 if (tracker != nullptr) {
437 trackers->push_back(tracker); 437 trackers->push_back(tracker);
438 } 438 }
439 } 439 }
440 } 440 }
441 } 441 }
OLDNEW
« no previous file with comments | « components/sync/test/engine/fake_model_worker.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698