Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 "base/command_line.h" | 5 #include "base/command_line.h" |
| 6 #include "build/build_config.h" | 6 #include "build/build_config.h" |
| 7 #include "chrome/browser/bookmarks/bookmark_model_factory.h" | 7 #include "chrome/browser/bookmarks/bookmark_model_factory.h" |
| 8 #include "chrome/browser/bookmarks/enhanced_bookmarks_features.h" | 8 #include "chrome/browser/bookmarks/enhanced_bookmarks_features.h" |
| 9 #include "chrome/browser/dom_distiller/dom_distiller_service_factory.h" | 9 #include "chrome/browser/dom_distiller/dom_distiller_service_factory.h" |
| 10 #include "chrome/browser/history/history_service.h" | 10 #include "chrome/browser/history/history_service.h" |
| (...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 219 new UIDataTypeController( | 219 new UIDataTypeController( |
| 220 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI), | 220 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI), |
| 221 base::Bind(&ChromeReportUnrecoverableError), | 221 base::Bind(&ChromeReportUnrecoverableError), |
| 222 syncer::HISTORY_DELETE_DIRECTIVES, | 222 syncer::HISTORY_DELETE_DIRECTIVES, |
| 223 this)); | 223 this)); |
| 224 } | 224 } |
| 225 | 225 |
| 226 // Session sync is enabled by default. Register unless explicitly disabled. | 226 // Session sync is enabled by default. Register unless explicitly disabled. |
| 227 if (!disabled_types.Has(syncer::PROXY_TABS)) { | 227 if (!disabled_types.Has(syncer::PROXY_TABS)) { |
| 228 pss->RegisterDataTypeController(new ProxyDataTypeController( | 228 pss->RegisterDataTypeController(new ProxyDataTypeController( |
| 229 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI), | 229 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI), |
|
Andrew T Wilson (Slow)
2014/08/21 14:10:37
Move this inside the if(pref) below?
Joao da Silva
2014/08/26 16:06:51
Done.
| |
| 230 syncer::PROXY_TABS)); | 230 syncer::PROXY_TABS)); |
| 231 pss->RegisterDataTypeController( | 231 if (!profile_->GetPrefs()->GetBoolean( |
| 232 new SessionDataTypeController(this, | 232 prefs::kSavingBrowserHistoryDisabled)) { |
| 233 profile_, | 233 pss->RegisterDataTypeController( |
| 234 pss->GetSyncedWindowDelegatesGetter(), | 234 new SessionDataTypeController(this, |
| 235 pss->GetLocalDeviceInfoProvider())); | 235 profile_, |
| 236 pss->GetSyncedWindowDelegatesGetter(), | |
| 237 pss->GetLocalDeviceInfoProvider())); | |
| 238 } | |
| 236 } | 239 } |
| 237 | 240 |
| 238 // Favicon sync is enabled by default. Register unless explicitly disabled. | 241 // Favicon sync is enabled by default. Register unless explicitly disabled. |
| 239 if (!disabled_types.Has(syncer::FAVICON_IMAGES) && | 242 if (!disabled_types.Has(syncer::FAVICON_IMAGES) && |
| 240 !disabled_types.Has(syncer::FAVICON_TRACKING)) { | 243 !disabled_types.Has(syncer::FAVICON_TRACKING)) { |
| 241 pss->RegisterDataTypeController( | 244 pss->RegisterDataTypeController( |
| 242 new UIDataTypeController( | 245 new UIDataTypeController( |
| 243 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI), | 246 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI), |
| 244 base::Bind(&ChromeReportUnrecoverableError), | 247 base::Bind(&ChromeReportUnrecoverableError), |
| 245 syncer::FAVICON_IMAGES, | 248 syncer::FAVICON_IMAGES, |
| (...skipping 427 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 673 new TypedUrlModelAssociator(profile_sync_service, | 676 new TypedUrlModelAssociator(profile_sync_service, |
| 674 history_backend, | 677 history_backend, |
| 675 error_handler); | 678 error_handler); |
| 676 TypedUrlChangeProcessor* change_processor = | 679 TypedUrlChangeProcessor* change_processor = |
| 677 new TypedUrlChangeProcessor(profile_, | 680 new TypedUrlChangeProcessor(profile_, |
| 678 model_associator, | 681 model_associator, |
| 679 history_backend, | 682 history_backend, |
| 680 error_handler); | 683 error_handler); |
| 681 return SyncComponents(model_associator, change_processor); | 684 return SyncComponents(model_associator, change_processor); |
| 682 } | 685 } |
| OLD | NEW |