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

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

Issue 11946058: Add password sync for Android. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 11 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
« no previous file with comments | « no previous file | chrome/browser/sync/profile_sync_service.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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)) {
« no previous file with comments | « no previous file | chrome/browser/sync/profile_sync_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698