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

Unified Diff: chrome/browser/managed_mode/managed_user_registration_utility.cc

Issue 220913003: Make supervised user ChromeOS import aware of new password schema. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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/managed_mode/managed_user_registration_utility.cc
diff --git a/chrome/browser/managed_mode/managed_user_registration_utility.cc b/chrome/browser/managed_mode/managed_user_registration_utility.cc
index 79a904aac39853c8317954382d67d0844064aefc..1ca6a04932043d4dd1605d5de703a6ff285c4218 100644
--- a/chrome/browser/managed_mode/managed_user_registration_utility.cc
+++ b/chrome/browser/managed_mode/managed_user_registration_utility.cc
@@ -228,6 +228,7 @@ void ManagedUserRegistrationUtilityImpl::Register(
callback_ = callback;
pending_managed_user_id_ = managed_user_id;
+ bool need_password_update = !info.password_data.empty();
const base::DictionaryValue* dict =
prefs_->GetDictionary(prefs::kManagedUsers);
is_existing_managed_user_ = dict->HasKey(managed_user_id);
@@ -265,6 +266,7 @@ void ManagedUserRegistrationUtilityImpl::Register(
info.avatar_index);
} else {
// The user already exists and does not need to be updated.
+ need_password_update = false;
OnManagedUserAcknowledged(managed_user_id);
}
avatar_updated_ =
@@ -280,7 +282,7 @@ void ManagedUserRegistrationUtilityImpl::Register(
managed_user_shared_settings_service_->SetValue(
pending_managed_user_id_, kAvatarKey,
base::FundamentalValue(info.avatar_index));
- if (!info.password_data.empty()) {
+ if (need_password_update) {
password_update_.reset(new ManagedUserSharedSettingsUpdate(
managed_user_shared_settings_service_,
pending_managed_user_id_,

Powered by Google App Engine
This is Rietveld 408576698