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

Unified Diff: chrome/browser/sync/profile_sync_components_factory_impl.cc

Issue 12033093: sync: Implementation of Priority Preferences. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix tests Created 7 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/sync/profile_sync_components_factory_impl.cc
diff --git a/chrome/browser/sync/profile_sync_components_factory_impl.cc b/chrome/browser/sync/profile_sync_components_factory_impl.cc
index bb5944578b4a81e1814e5bb0fa9cb05c18ed4aec..669e612ba230a0b40fc7d0a18eba709a52a179c9 100644
--- a/chrome/browser/sync/profile_sync_components_factory_impl.cc
+++ b/chrome/browser/sync/profile_sync_components_factory_impl.cc
@@ -206,6 +206,13 @@ void ProfileSyncComponentsFactoryImpl::RegisterDesktopDataTypes(
if (!command_line_->HasSwitch(switches::kDisableSyncPreferences)) {
pss->RegisterDataTypeController(
new UIDataTypeController(syncer::PREFERENCES, this, profile_, pss));
+
+ }
+
+ if (!command_line_->HasSwitch(switches::kDisableSyncPriorityPreferences)) {
+ pss->RegisterDataTypeController(
+ new UIDataTypeController(syncer::PRIORITY_PREFERENCES,
+ this, profile_, pss));
}
#if defined(ENABLE_THEMES)
@@ -302,7 +309,10 @@ base::WeakPtr<syncer::SyncableService> ProfileSyncComponentsFactoryImpl::
switch (type) {
case syncer::PREFERENCES:
return PrefServiceSyncable::FromProfile(
- profile_)->GetSyncableService()->AsWeakPtr();
+ profile_)->GetSyncableService(syncer::PREFERENCES)->AsWeakPtr();
+ case syncer::PRIORITY_PREFERENCES:
+ return PrefServiceSyncable::FromProfile(profile_)->GetSyncableService(
+ syncer::PRIORITY_PREFERENCES)->AsWeakPtr();
case syncer::AUTOFILL:
case syncer::AUTOFILL_PROFILE: {
if (!web_data_service_.get())
« no previous file with comments | « chrome/browser/prefs/pref_service_syncable.cc ('k') | 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