| OLD | NEW |
| 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 364 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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::SequencedModelWorker( | 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: | |
| 386 return new syncer::SequencedModelWorker( | |
| 387 web::WebThread::GetTaskRunnerForThread(web::WebThread::FILE), | |
| 388 syncer::GROUP_FILE); | |
| 389 case syncer::GROUP_UI: | 385 case syncer::GROUP_UI: |
| 390 return new syncer::UIModelWorker( | 386 return new syncer::UIModelWorker( |
| 391 web::WebThread::GetTaskRunnerForThread(web::WebThread::UI)); | 387 web::WebThread::GetTaskRunnerForThread(web::WebThread::UI)); |
| 392 case syncer::GROUP_PASSIVE: | 388 case syncer::GROUP_PASSIVE: |
| 393 return new syncer::PassiveModelWorker(); | 389 return new syncer::PassiveModelWorker(); |
| 394 case syncer::GROUP_HISTORY: { | 390 case syncer::GROUP_HISTORY: { |
| 395 history::HistoryService* history_service = GetHistoryService(); | 391 history::HistoryService* history_service = GetHistoryService(); |
| 396 if (!history_service) | 392 if (!history_service) |
| 397 return nullptr; | 393 return nullptr; |
| 398 return new browser_sync::HistoryModelWorker( | 394 return new browser_sync::HistoryModelWorker( |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 432 IOSChromeProfileSyncServiceFactory::GetForBrowserState(browser_state); | 428 IOSChromeProfileSyncServiceFactory::GetForBrowserState(browser_state); |
| 433 if (profile_sync_service != nullptr) { | 429 if (profile_sync_service != nullptr) { |
| 434 const syncer::DeviceInfoTracker* tracker = | 430 const syncer::DeviceInfoTracker* tracker = |
| 435 profile_sync_service->GetDeviceInfoTracker(); | 431 profile_sync_service->GetDeviceInfoTracker(); |
| 436 if (tracker != nullptr) { | 432 if (tracker != nullptr) { |
| 437 trackers->push_back(tracker); | 433 trackers->push_back(tracker); |
| 438 } | 434 } |
| 439 } | 435 } |
| 440 } | 436 } |
| 441 } | 437 } |
| OLD | NEW |