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

Side by Side Diff: chrome/browser/sync/profile_sync_components_factory_impl.cc

Issue 9489002: Enable the syncing of extension and app settings by default. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix unit tests Created 8 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/sync/profile_sync_components_factory_impl_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "chrome/browser/extensions/app_notification_manager.h" 6 #include "chrome/browser/extensions/app_notification_manager.h"
7 #include "chrome/browser/extensions/extension_service.h" 7 #include "chrome/browser/extensions/extension_service.h"
8 #include "chrome/browser/extensions/settings/settings_frontend.h" 8 #include "chrome/browser/extensions/settings/settings_frontend.h"
9 #include "chrome/browser/prefs/pref_model_associator.h" 9 #include "chrome/browser/prefs/pref_model_associator.h"
10 #include "chrome/browser/profiles/profile.h" 10 #include "chrome/browser/profiles/profile.h"
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 new SearchEngineDataTypeController(this, profile_, pss)); 154 new SearchEngineDataTypeController(this, profile_, pss));
155 } 155 }
156 156
157 // Session sync is disabled by default. Register only if explicitly 157 // Session sync is disabled by default. Register only if explicitly
158 // enabled. 158 // enabled.
159 if (command_line_->HasSwitch(switches::kEnableSyncTabs)) { 159 if (command_line_->HasSwitch(switches::kEnableSyncTabs)) {
160 pss->RegisterDataTypeController( 160 pss->RegisterDataTypeController(
161 new SessionDataTypeController(this, profile_, pss)); 161 new SessionDataTypeController(this, profile_, pss));
162 } 162 }
163 163
164 // Extension setting sync is disabled by default. Register only if 164 // Extension setting sync is enabled by default. Register unless explicitly
165 // explicitly enabled. 165 // disabled.
166 if (command_line_->HasSwitch(switches::kEnableSyncExtensionSettings)) { 166 if (!command_line_->HasSwitch(switches::kDisableSyncExtensionSettings)) {
167 pss->RegisterDataTypeController( 167 pss->RegisterDataTypeController(
168 new ExtensionSettingDataTypeController( 168 new ExtensionSettingDataTypeController(
169 syncable::EXTENSION_SETTINGS, this, profile_, pss)); 169 syncable::EXTENSION_SETTINGS, this, profile_, pss));
170 }
171
172 // App setting sync is enabled by default. Register unless explicitly
173 // disabled.
174 if (!command_line_->HasSwitch(switches::kDisableSyncAppSettings)) {
170 pss->RegisterDataTypeController( 175 pss->RegisterDataTypeController(
171 new ExtensionSettingDataTypeController( 176 new ExtensionSettingDataTypeController(
172 syncable::APP_SETTINGS, this, profile_, pss)); 177 syncable::APP_SETTINGS, this, profile_, pss));
173 } 178 }
174 179
175 if (!command_line_->HasSwitch(switches::kDisableSyncAutofillProfile)) { 180 if (!command_line_->HasSwitch(switches::kDisableSyncAutofillProfile)) {
176 pss->RegisterDataTypeController( 181 pss->RegisterDataTypeController(
177 new AutofillProfileDataTypeController(this, profile_, pss)); 182 new AutofillProfileDataTypeController(this, profile_, pss));
178 } 183 }
179 184
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
419 GenericChangeProcessor* change_processor = 424 GenericChangeProcessor* change_processor =
420 new GenericChangeProcessor(error_handler, 425 new GenericChangeProcessor(error_handler,
421 notif_sync_service, 426 notif_sync_service,
422 user_share); 427 user_share);
423 SyncableServiceAdapter* sync_service_adapter = 428 SyncableServiceAdapter* sync_service_adapter =
424 new SyncableServiceAdapter(syncable::APP_NOTIFICATIONS, 429 new SyncableServiceAdapter(syncable::APP_NOTIFICATIONS,
425 notif_sync_service, 430 notif_sync_service,
426 change_processor); 431 change_processor);
427 return SyncComponents(sync_service_adapter, change_processor); 432 return SyncComponents(sync_service_adapter, change_processor);
428 } 433 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/sync/profile_sync_components_factory_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698