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

Unified Diff: chrome/browser/chromeos/login/login_performer.cc

Issue 101283003: Add first implemenation for SU password sync (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge with ToT Created 7 years 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/chromeos/login/login_performer.cc
diff --git a/chrome/browser/chromeos/login/login_performer.cc b/chrome/browser/chromeos/login/login_performer.cc
index 365704f51217923abcbe21065cadab6ecf76134b..44a55bf6d9248f51785d201af133cdd1c4ea8c88 100644
--- a/chrome/browser/chromeos/login/login_performer.cc
+++ b/chrome/browser/chromeos/login/login_performer.cc
@@ -17,7 +17,9 @@
#include "chrome/browser/chrome_notification_types.h"
#include "chrome/browser/chromeos/boot_times_loader.h"
#include "chrome/browser/chromeos/login/login_utils.h"
-#include "chrome/browser/chromeos/login/managed/locally_managed_user_login_flow.h"
+#include "chrome/browser/chromeos/login/managed/supervised_user_authentication.h"
+#include "chrome/browser/chromeos/login/managed/supervised_user_login_flow.h"
+#include "chrome/browser/chromeos/login/supervised_user_manager.h"
#include "chrome/browser/chromeos/login/user_manager.h"
#include "chrome/browser/chromeos/policy/device_local_account_policy_service.h"
#include "chrome/browser/chromeos/profiles/profile_helper.h"
@@ -209,17 +211,35 @@ void LoginPerformer::LoginAsLocallyManagedUser(
return;
}
- UserFlow* new_flow = new LocallyManagedUserLoginFlow(user_context.username);
+ SupervisedUserLoginFlow* new_flow =
+ new SupervisedUserLoginFlow(user_context.username);
new_flow->set_host(
UserManager::Get()->GetUserFlow(user_context.username)->host());
UserManager::Get()->SetUserFlow(user_context.username, new_flow);
+ SupervisedUserAuthentication* authentication = UserManager::Get()->
+ GetSupervisedUserManager()->GetSupervisedUserAuthentication();
+ if (authentication->PasswordNeedsMigration(user_context.username)) {
+ authentication->SchedulePasswordMigration(
+ user_context.username,
Nikita (slow) 2013/12/09 16:42:16 nit: It seems that this parameter will fit on the
Denis Kuznetsov (DE-MUC) 2013/12/12 19:45:24 Done.
+ user_context.password,
+ new_flow);
+ }
+
+ UserContext copy(user_context.username,
Nikita (slow) 2013/12/09 16:42:16 nit: Rename to user_context_copy?
Denis Kuznetsov (DE-MUC) 2013/12/12 19:45:24 Done.
+ user_context.password,
+ user_context.auth_code,
+ user_context.username_hash,
+ user_context.using_oauth);
+ copy.password = authentication->TransformPassword(copy.username,
+ copy.password);
+
authenticator_ = LoginUtils::Get()->CreateAuthenticator(this);
BrowserThread::PostTask(
BrowserThread::UI, FROM_HERE,
base::Bind(&Authenticator::LoginAsLocallyManagedUser,
authenticator_.get(),
- user_context));
+ copy));
}
void LoginPerformer::LoginRetailMode() {

Powered by Google App Engine
This is Rietveld 408576698