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

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

Issue 2944993002: Remove dependency on BrowserThread::FILE from Sync code (Closed)
Patch Set: More explicit about returning nullptr ModelSafeWorker for FILE group on Android and iOS 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 | « chrome/browser/sync/test/integration/extension_settings_helper.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 365 matching lines...) Expand 10 before | Expand all | Expand 10 after
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: 385 case syncer::GROUP_FILE:
386 return new syncer::SequencedModelWorker( 386 // Not supported on iOS.
387 web::WebThread::GetTaskRunnerForThread(web::WebThread::FILE), 387 return nullptr;
388 syncer::GROUP_FILE);
389 case syncer::GROUP_UI: 388 case syncer::GROUP_UI:
390 return new syncer::UIModelWorker( 389 return new syncer::UIModelWorker(
391 web::WebThread::GetTaskRunnerForThread(web::WebThread::UI)); 390 web::WebThread::GetTaskRunnerForThread(web::WebThread::UI));
392 case syncer::GROUP_PASSIVE: 391 case syncer::GROUP_PASSIVE:
393 return new syncer::PassiveModelWorker(); 392 return new syncer::PassiveModelWorker();
394 case syncer::GROUP_HISTORY: { 393 case syncer::GROUP_HISTORY: {
395 history::HistoryService* history_service = GetHistoryService(); 394 history::HistoryService* history_service = GetHistoryService();
396 if (!history_service) 395 if (!history_service)
397 return nullptr; 396 return nullptr;
398 return new browser_sync::HistoryModelWorker( 397 return new browser_sync::HistoryModelWorker(
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
432 IOSChromeProfileSyncServiceFactory::GetForBrowserState(browser_state); 431 IOSChromeProfileSyncServiceFactory::GetForBrowserState(browser_state);
433 if (profile_sync_service != nullptr) { 432 if (profile_sync_service != nullptr) {
434 const syncer::DeviceInfoTracker* tracker = 433 const syncer::DeviceInfoTracker* tracker =
435 profile_sync_service->GetDeviceInfoTracker(); 434 profile_sync_service->GetDeviceInfoTracker();
436 if (tracker != nullptr) { 435 if (tracker != nullptr) {
437 trackers->push_back(tracker); 436 trackers->push_back(tracker);
438 } 437 }
439 } 438 }
440 } 439 }
441 } 440 }
OLDNEW
« no previous file with comments | « chrome/browser/sync/test/integration/extension_settings_helper.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698