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 acdefbaa24fc86cbe8ceaecdcadce613d759b717..dabefb5d3ee8697d2e436ce48b2e406fbd64f285 100644 |
--- a/chrome/browser/sync/profile_sync_components_factory_impl.cc |
+++ b/chrome/browser/sync/profile_sync_components_factory_impl.cc |
@@ -131,6 +131,22 @@ void ProfileSyncComponentsFactoryImpl::RegisterCommonDataTypes( |
pss->RegisterDataTypeController( |
new SessionDataTypeController(this, profile_, pss)); |
} |
+ |
+ // Password sync is enabled by default. Register unless explicitly |
+ // disabled. |
+ if (!command_line_->HasSwitch(switches::kDisableSyncPasswords)) { |
+#if !defined(OS_ANDROID) |
+ pss->RegisterDataTypeController( |
+ new PasswordDataTypeController(this, profile_, pss)); |
+#else |
+ // On Android, enable password sync only when Keystore encryption |
+ // is enabled. |
+ if (command_line_->HasSwitch(switches::kSyncKeystoreEncryption)) { |
+ pss->RegisterDataTypeController( |
+ new PasswordDataTypeController(this, profile_, pss)); |
+ } |
+#endif |
+ } |
} |
void ProfileSyncComponentsFactoryImpl::RegisterDesktopDataTypes( |
@@ -157,13 +173,6 @@ void ProfileSyncComponentsFactoryImpl::RegisterDesktopDataTypes( |
this, profile_, pss)); |
} |
- // Password sync is enabled by default. Register unless explicitly |
- // disabled. |
- if (!command_line_->HasSwitch(switches::kDisableSyncPasswords)) { |
- pss->RegisterDataTypeController( |
- new PasswordDataTypeController(this, profile_, pss)); |
- } |
- |
// Preference sync is enabled by default. Register unless explicitly |
// disabled. |
if (!command_line_->HasSwitch(switches::kDisableSyncPreferences)) { |