| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "chrome/browser/extensions/extension_service.h" | 6 #include "chrome/browser/extensions/extension_service.h" |
| 7 #include "chrome/browser/profiles/profile.h" | 7 #include "chrome/browser/profiles/profile.h" |
| 8 #include "chrome/browser/search_engines/template_url_service.h" | 8 #include "chrome/browser/search_engines/template_url_service.h" |
| 9 #include "chrome/browser/search_engines/template_url_service_factory.h" | 9 #include "chrome/browser/search_engines/template_url_service_factory.h" |
| 10 #include "chrome/browser/sync/api/syncable_service.h" | 10 #include "chrome/browser/sync/api/syncable_service.h" |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 143 // TypedUrl sync is enabled by default. Register unless explicitly disabled, | 143 // TypedUrl sync is enabled by default. Register unless explicitly disabled, |
| 144 // or if saving history is disabled. | 144 // or if saving history is disabled. |
| 145 if (!profile_->GetPrefs()->GetBoolean(prefs::kSavingBrowserHistoryDisabled) && | 145 if (!profile_->GetPrefs()->GetBoolean(prefs::kSavingBrowserHistoryDisabled) && |
| 146 !command_line_->HasSwitch(switches::kDisableSyncTypedUrls)) { | 146 !command_line_->HasSwitch(switches::kDisableSyncTypedUrls)) { |
| 147 pss->RegisterDataTypeController( | 147 pss->RegisterDataTypeController( |
| 148 new TypedUrlDataTypeController(this, profile_)); | 148 new TypedUrlDataTypeController(this, profile_)); |
| 149 } | 149 } |
| 150 | 150 |
| 151 // Session sync is disabled by default. Register only if explicitly | 151 // Session sync is disabled by default. Register only if explicitly |
| 152 // enabled. | 152 // enabled. |
| 153 if (command_line_->HasSwitch(switches::kEnableSyncSessions)) { | 153 if (command_line_->HasSwitch(switches::kEnableSyncTabs)) { |
| 154 pss->RegisterDataTypeController( | 154 pss->RegisterDataTypeController( |
| 155 new SessionDataTypeController(this, profile_, pss)); | 155 new SessionDataTypeController(this, profile_, pss)); |
| 156 } | 156 } |
| 157 | 157 |
| 158 if (!command_line_->HasSwitch(switches::kDisableSyncAutofillProfile)) { | 158 if (!command_line_->HasSwitch(switches::kDisableSyncAutofillProfile)) { |
| 159 pss->RegisterDataTypeController( | 159 pss->RegisterDataTypeController( |
| 160 new AutofillProfileDataTypeController(this, profile_)); | 160 new AutofillProfileDataTypeController(this, profile_)); |
| 161 } | 161 } |
| 162 | 162 |
| 163 // Search Engine sync is disabled by default. Register only if explicitly | 163 // Search Engine sync is disabled by default. Register only if explicitly |
| (...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 339 DCHECK(se_sync_service); | 339 DCHECK(se_sync_service); |
| 340 sync_api::UserShare* user_share = profile_sync_service->GetUserShare(); | 340 sync_api::UserShare* user_share = profile_sync_service->GetUserShare(); |
| 341 GenericChangeProcessor* change_processor = | 341 GenericChangeProcessor* change_processor = |
| 342 new GenericChangeProcessor(se_sync_service, error_handler, user_share); | 342 new GenericChangeProcessor(se_sync_service, error_handler, user_share); |
| 343 SyncableServiceAdapter* sync_service_adapter = | 343 SyncableServiceAdapter* sync_service_adapter = |
| 344 new SyncableServiceAdapter(syncable::SEARCH_ENGINES, | 344 new SyncableServiceAdapter(syncable::SEARCH_ENGINES, |
| 345 se_sync_service, | 345 se_sync_service, |
| 346 change_processor); | 346 change_processor); |
| 347 return SyncComponents(sync_service_adapter, change_processor); | 347 return SyncComponents(sync_service_adapter, change_processor); |
| 348 } | 348 } |
| OLD | NEW |