Commit ce78d46a authored by Mohammed Abdon's avatar Mohammed Abdon Committed by Chromium LUCI CQ

Replacing user profile with lockscreen profile.

Using the new lockscreen profile as a browser context for WebUI
displaying SAML page while re-authenticating users on lockscreen.

Bug: 1102942
Change-Id: Ib870ab313cca1b8de83cfdd1e4b52fd489faa82a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2606354Reviewed-by: default avatarDenis Kuznetsov [CET] <antrim@chromium.org>
Commit-Queue: Mohammed Abdon <mohammedabdon@chromium.org>
Cr-Commit-Position: refs/heads/master@{#840901}
parent 70db5398
...@@ -8,6 +8,8 @@ ...@@ -8,6 +8,8 @@
#include "base/bind.h" #include "base/bind.h"
#include "base/json/json_writer.h" #include "base/json/json_writer.h"
#include "chrome/browser/chromeos/profiles/profile_helper.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/webui/chromeos/in_session_password_change/confirm_password_change_handler.h" #include "chrome/browser/ui/webui/chromeos/in_session_password_change/confirm_password_change_handler.h"
#include "chrome/common/webui_url_constants.h" #include "chrome/common/webui_url_constants.h"
#include "chrome/grit/browser_resources.h" #include "chrome/grit/browser_resources.h"
...@@ -68,7 +70,8 @@ void LockScreenStartReauthDialog::Show() { ...@@ -68,7 +70,8 @@ void LockScreenStartReauthDialog::Show() {
return; return;
} }
g_dialog = new LockScreenStartReauthDialog(); g_dialog = new LockScreenStartReauthDialog();
g_dialog->ShowSystemDialog(); g_dialog->ShowSystemDialogForBrowserContext(
ProfileHelper::GetLockScreenIncognitoProfile());
} }
void LockScreenStartReauthDialog::Dismiss() { void LockScreenStartReauthDialog::Dismiss() {
......
...@@ -21,7 +21,7 @@ LockScreenStartReauthUI::LockScreenStartReauthUI(content::WebUI* web_ui) ...@@ -21,7 +21,7 @@ LockScreenStartReauthUI::LockScreenStartReauthUI(content::WebUI* web_ui)
: ui::WebDialogUI(web_ui) { : ui::WebDialogUI(web_ui) {
Profile* profile = Profile::FromWebUI(web_ui); Profile* profile = Profile::FromWebUI(web_ui);
const user_manager::User* user = const user_manager::User* user =
ProfileHelper::Get()->GetUserByProfile(profile); user_manager::UserManager::Get()->GetActiveUser();
std::string email; std::string email;
if (user) { if (user) {
email = user->GetDisplayEmail(); email = user->GetDisplayEmail();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment