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

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: Created 8 years, 10 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/test/integration/sync_test.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 and app setting sync is disabled by default. Register unless
akalin 2012/02/28 08:01:42 disabled -> enabled
not at google - send to devlin 2012/02/28 08:11:54 Done.
165 // explicitly enabled. 165 // explicitly 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 pss->RegisterDataTypeController( 170 pss->RegisterDataTypeController(
akalin 2012/02/28 08:01:42 please add separate switch for app settings
not at google - send to devlin 2012/02/28 08:11:54 Done.
171 new ExtensionSettingDataTypeController( 171 new ExtensionSettingDataTypeController(
172 syncable::APP_SETTINGS, this, profile_, pss)); 172 syncable::APP_SETTINGS, this, profile_, pss));
173 } 173 }
174 174
175 if (!command_line_->HasSwitch(switches::kDisableSyncAutofillProfile)) { 175 if (!command_line_->HasSwitch(switches::kDisableSyncAutofillProfile)) {
176 pss->RegisterDataTypeController( 176 pss->RegisterDataTypeController(
177 new AutofillProfileDataTypeController(this, profile_, pss)); 177 new AutofillProfileDataTypeController(this, profile_, pss));
178 } 178 }
179 179
180 // App notifications sync is enabled by default. Register only if 180 // App notifications sync is enabled by default. Register only if
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after
419 GenericChangeProcessor* change_processor = 419 GenericChangeProcessor* change_processor =
420 new GenericChangeProcessor(error_handler, 420 new GenericChangeProcessor(error_handler,
421 notif_sync_service, 421 notif_sync_service,
422 user_share); 422 user_share);
423 SyncableServiceAdapter* sync_service_adapter = 423 SyncableServiceAdapter* sync_service_adapter =
424 new SyncableServiceAdapter(syncable::APP_NOTIFICATIONS, 424 new SyncableServiceAdapter(syncable::APP_NOTIFICATIONS,
425 notif_sync_service, 425 notif_sync_service,
426 change_processor); 426 change_processor);
427 return SyncComponents(sync_service_adapter, change_processor); 427 return SyncComponents(sync_service_adapter, change_processor);
428 } 428 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/sync/test/integration/sync_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698