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

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

Issue 2774603002: Removes the IsReadingListEnabled flags (Closed)
Patch Set: fix tests Created 3 years, 9 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 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 10 matching lines...) Expand all
21 #include "components/browser_sync/profile_sync_components_factory_impl.h" 21 #include "components/browser_sync/profile_sync_components_factory_impl.h"
22 #include "components/browser_sync/profile_sync_service.h" 22 #include "components/browser_sync/profile_sync_service.h"
23 #include "components/dom_distiller/core/dom_distiller_service.h" 23 #include "components/dom_distiller/core/dom_distiller_service.h"
24 #include "components/history/core/browser/history_model_worker.h" 24 #include "components/history/core/browser/history_model_worker.h"
25 #include "components/history/core/browser/history_service.h" 25 #include "components/history/core/browser/history_service.h"
26 #include "components/invalidation/impl/profile_invalidation_provider.h" 26 #include "components/invalidation/impl/profile_invalidation_provider.h"
27 #include "components/keyed_service/core/service_access_type.h" 27 #include "components/keyed_service/core/service_access_type.h"
28 #include "components/password_manager/core/browser/password_store.h" 28 #include "components/password_manager/core/browser/password_store.h"
29 #include "components/password_manager/sync/browser/password_model_worker.h" 29 #include "components/password_manager/sync/browser/password_model_worker.h"
30 #include "components/reading_list/core/reading_list_model.h" 30 #include "components/reading_list/core/reading_list_model.h"
31 #include "components/reading_list/core/reading_list_switches.h"
32 #include "components/search_engines/search_engine_data_type_controller.h" 31 #include "components/search_engines/search_engine_data_type_controller.h"
33 #include "components/signin/core/browser/profile_oauth2_token_service.h" 32 #include "components/signin/core/browser/profile_oauth2_token_service.h"
34 #include "components/sync/base/report_unrecoverable_error.h" 33 #include "components/sync/base/report_unrecoverable_error.h"
35 #include "components/sync/driver/sync_api_component_factory.h" 34 #include "components/sync/driver/sync_api_component_factory.h"
36 #include "components/sync/driver/sync_util.h" 35 #include "components/sync/driver/sync_util.h"
37 #include "components/sync/engine/browser_thread_model_worker.h" 36 #include "components/sync/engine/browser_thread_model_worker.h"
38 #include "components/sync/engine/passive_model_worker.h" 37 #include "components/sync/engine/passive_model_worker.h"
39 #include "components/sync/engine/ui_model_worker.h" 38 #include "components/sync/engine/ui_model_worker.h"
40 #include "components/sync_preferences/pref_service_syncable.h" 39 #include "components/sync_preferences/pref_service_syncable.h"
41 #include "components/sync_sessions/favicon_cache.h" 40 #include "components/sync_sessions/favicon_cache.h"
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after
345 344
346 base::WeakPtr<syncer::ModelTypeSyncBridge> 345 base::WeakPtr<syncer::ModelTypeSyncBridge>
347 IOSChromeSyncClient::GetSyncBridgeForModelType(syncer::ModelType type) { 346 IOSChromeSyncClient::GetSyncBridgeForModelType(syncer::ModelType type) {
348 switch (type) { 347 switch (type) {
349 case syncer::DEVICE_INFO: 348 case syncer::DEVICE_INFO:
350 return IOSChromeProfileSyncServiceFactory::GetForBrowserState( 349 return IOSChromeProfileSyncServiceFactory::GetForBrowserState(
351 browser_state_) 350 browser_state_)
352 ->GetDeviceInfoSyncBridge() 351 ->GetDeviceInfoSyncBridge()
353 ->AsWeakPtr(); 352 ->AsWeakPtr();
354 case syncer::READING_LIST: { 353 case syncer::READING_LIST: {
355 DCHECK(reading_list::switches::IsReadingListEnabled());
356 ReadingListModel* reading_list_model = 354 ReadingListModel* reading_list_model =
357 ReadingListModelFactory::GetForBrowserState(browser_state_); 355 ReadingListModelFactory::GetForBrowserState(browser_state_);
358 return reading_list_model->GetModelTypeSyncBridge()->AsWeakPtr(); 356 return reading_list_model->GetModelTypeSyncBridge()->AsWeakPtr();
359 } 357 }
360 case syncer::AUTOFILL: 358 case syncer::AUTOFILL:
361 return autofill::AutocompleteSyncBridge::FromWebDataService( 359 return autofill::AutocompleteSyncBridge::FromWebDataService(
362 web_data_service_.get()) 360 web_data_service_.get())
363 ->AsWeakPtr(); 361 ->AsWeakPtr();
364 default: 362 default:
365 NOTREACHED(); 363 NOTREACHED();
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
425 IOSChromeProfileSyncServiceFactory::GetForBrowserState(browser_state); 423 IOSChromeProfileSyncServiceFactory::GetForBrowserState(browser_state);
426 if (profile_sync_service != nullptr) { 424 if (profile_sync_service != nullptr) {
427 const syncer::DeviceInfoTracker* tracker = 425 const syncer::DeviceInfoTracker* tracker =
428 profile_sync_service->GetDeviceInfoTracker(); 426 profile_sync_service->GetDeviceInfoTracker();
429 if (tracker != nullptr) { 427 if (tracker != nullptr) {
430 trackers->push_back(tracker); 428 trackers->push_back(tracker);
431 } 429 }
432 } 430 }
433 } 431 }
434 } 432 }
OLDNEW
« no previous file with comments | « ios/chrome/browser/sync/ios_chrome_profile_sync_service_factory_unittest.cc ('k') | ios/chrome/browser/tabs/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698