Commit fe95cd62 authored by zmin's avatar zmin Committed by Commit bot

Display error message when user try to open a locked supervised user profile...

Display error message when user try to open a locked supervised user profile when force-sign-in is enabled.

BUG=642059

Review-Url: https://codereview.chromium.org/2552473002
Cr-Commit-Position: refs/heads/master@{#437668}
parent 3a43b1fa
...@@ -11212,6 +11212,9 @@ I don't think this site should be blocked! ...@@ -11212,6 +11212,9 @@ I don't think this site should be blocked!
<message name="IDS_SYNC_LOGIN_NAME_PROHIBITED" desc="The error message shown when the user tries to sign in to sync using a name that is not allowed by the admin policy"> <message name="IDS_SYNC_LOGIN_NAME_PROHIBITED" desc="The error message shown when the user tries to sign in to sync using a name that is not allowed by the admin policy">
Signing in with this username has been disabled by your administrator. Signing in with this username has been disabled by your administrator.
</message> </message>
<message name="IDS_SUPERVISED_USER_NOT_ALLOWED_BY_POLICY" desc="The error message shown when the user tries to use the supervised user profile when it's disabled by policy">
Supervised users have been disabled by your administrator.
</message>
<if expr="is_android"> <if expr="is_android">
<message name="IDS_SYNC_USER_NAME_IN_USE_ERROR" desc="Mobile: An error message shown when a user tries to sign in to sync using a user name that's already in use by another profile."> <message name="IDS_SYNC_USER_NAME_IN_USE_ERROR" desc="Mobile: An error message shown when a user tries to sign in to sync using a user name that's already in use by another profile.">
This account is already being used on this device. This account is already being used on this device.
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
#include "chrome/browser/profiles/profile_window.h" #include "chrome/browser/profiles/profile_window.h"
#include "components/signin/core/browser/signin_metrics.h" #include "components/signin/core/browser/signin_metrics.h"
@class ReauthDialogWindowController; @class DialogWindowController;
@class UserManagerWindowController; @class UserManagerWindowController;
// Dialog widget that contains the Desktop User Manager webui. This object // Dialog widget that contains the Desktop User Manager webui. This object
...@@ -44,10 +44,10 @@ class UserManagerMac { ...@@ -44,10 +44,10 @@ class UserManagerMac {
void LogTimeToOpen(); void LogTimeToOpen();
void ShowReauthDialog(content::BrowserContext* browser_context, void ShowDialog(content::BrowserContext* browser_context,
const std::string& email, const std::string& email,
signin_metrics::Reason reason); const GURL& url);
void CloseReauthDialog(); void CloseDialog();
void DisplayErrorMessage(); void DisplayErrorMessage();
...@@ -61,7 +61,7 @@ class UserManagerMac { ...@@ -61,7 +61,7 @@ class UserManagerMac {
// Controller of the window. // Controller of the window.
base::scoped_nsobject<UserManagerWindowController> window_controller_; base::scoped_nsobject<UserManagerWindowController> window_controller_;
base::scoped_nsobject<ReauthDialogWindowController> reauth_window_; base::scoped_nsobject<DialogWindowController> reauth_window_;
base::Time user_manager_started_showing_; base::Time user_manager_started_showing_;
......
...@@ -54,23 +54,24 @@ UserManagerMac* instance_ = nullptr; // Weak. ...@@ -54,23 +54,24 @@ UserManagerMac* instance_ = nullptr; // Weak.
std::vector<base::Closure>* user_manager_shown_callbacks_for_testing_ = nullptr; std::vector<base::Closure>* user_manager_shown_callbacks_for_testing_ = nullptr;
BOOL instance_under_construction_ = NO; BOOL instance_under_construction_ = NO;
void CloseInstanceReauthDialog() { void CloseInstanceDialog() {
DCHECK(instance_); DCHECK(instance_);
instance_->CloseReauthDialog(); instance_->CloseDialog();
} }
// The modal dialog host the User Manager uses to display the reauth dialog. // The modal dialog host the User Manager uses to display the dialog.
class UserManagerModalHost : public web_modal::WebContentsModalDialogHost { class UserManagerModalHost : public web_modal::WebContentsModalDialogHost {
public: public:
UserManagerModalHost(gfx::NativeView host_view) UserManagerModalHost(gfx::NativeView host_view)
: host_view_(host_view) {} : host_view_(host_view) {}
gfx::Size GetMaximumDialogSize() override { gfx::Size GetMaximumDialogSize() override {
return switches::UsePasswordSeparatedSigninFlow() ? return switches::UsePasswordSeparatedSigninFlow()
gfx::Size(UserManager::kReauthDialogWidth, ? gfx::Size(UserManagerProfileDialog::kDialogWidth,
UserManager::kReauthDialogHeight) : UserManagerProfileDialog::kDialogHeight)
gfx::Size(UserManager::kPasswordCombinedReauthDialogWidth, : gfx::Size(
UserManager::kPasswordCombinedReauthDialogHeight); UserManagerProfileDialog::kPasswordCombinedDialogWidth,
UserManagerProfileDialog::kPasswordCombinedDialogHeight);
} }
~UserManagerModalHost() override {} ~UserManagerModalHost() override {}
...@@ -91,7 +92,7 @@ class UserManagerModalHost : public web_modal::WebContentsModalDialogHost { ...@@ -91,7 +92,7 @@ class UserManagerModalHost : public web_modal::WebContentsModalDialogHost {
}; };
// The modal manager delegate allowing the display of constrained windows for // The modal manager delegate allowing the display of constrained windows for
// the reauth dialog. // the dialog.
class UserManagerModalManagerDelegate : class UserManagerModalManagerDelegate :
public web_modal::WebContentsModalDialogManagerDelegate { public web_modal::WebContentsModalDialogManagerDelegate {
public: public:
...@@ -140,17 +141,16 @@ class UserManagerWebContentsDelegate : public content::WebContentsDelegate { ...@@ -140,17 +141,16 @@ class UserManagerWebContentsDelegate : public content::WebContentsDelegate {
} }
}; };
class ReauthDialogDelegate : public UserManager::BaseReauthDialogDelegate, class UserManagerProfileDialogDelegate
: public UserManagerProfileDialog::BaseDialogDelegate,
public ConstrainedWindowMacDelegate { public ConstrainedWindowMacDelegate {
public: public:
ReauthDialogDelegate() { UserManagerProfileDialogDelegate() {
hotKeysWebContentsDelegate_.reset(new UserManagerWebContentsDelegate()); hotKeysWebContentsDelegate_.reset(new UserManagerWebContentsDelegate());
} }
// UserManager::BaseReauthDialogDelegate: // UserManagerProfileDialog::BaseDialogDelegate:
void CloseReauthDialog() override { void CloseDialog() override { CloseInstanceDialog(); }
CloseInstanceReauthDialog();
}
// WebContentsDelegate::HandleKeyboardEvent: // WebContentsDelegate::HandleKeyboardEvent:
void HandleKeyboardEvent( void HandleKeyboardEvent(
...@@ -161,48 +161,47 @@ class ReauthDialogDelegate : public UserManager::BaseReauthDialogDelegate, ...@@ -161,48 +161,47 @@ class ReauthDialogDelegate : public UserManager::BaseReauthDialogDelegate,
// ConstrainedWindowMacDelegate: // ConstrainedWindowMacDelegate:
void OnConstrainedWindowClosed(ConstrainedWindowMac* window) override { void OnConstrainedWindowClosed(ConstrainedWindowMac* window) override {
CloseReauthDialog(); CloseDialog();
} }
private: private:
std::unique_ptr<UserManagerWebContentsDelegate> hotKeysWebContentsDelegate_; std::unique_ptr<UserManagerWebContentsDelegate> hotKeysWebContentsDelegate_;
DISALLOW_COPY_AND_ASSIGN(ReauthDialogDelegate); DISALLOW_COPY_AND_ASSIGN(UserManagerProfileDialogDelegate);
}; };
} // namespace } // namespace
// WindowController for the reauth dialog. // WindowController for the dialog.
@interface ReauthDialogWindowController @interface DialogWindowController : NSWindowController<NSWindowDelegate> {
: NSWindowController <NSWindowDelegate> {
@private @private
std::string emailAddress_; std::string emailAddress_;
GURL url_;
content::WebContents* webContents_; content::WebContents* webContents_;
signin_metrics::Reason reason_; std::unique_ptr<UserManagerProfileDialogDelegate> webContentsDelegate_;
std::unique_ptr<ReauthDialogDelegate> webContentsDelegate_;
std::unique_ptr<ConstrainedWindowMac> constrained_window_; std::unique_ptr<ConstrainedWindowMac> constrained_window_;
std::unique_ptr<content::WebContents> reauthWebContents_; std::unique_ptr<content::WebContents> dialogWebContents_;
} }
- (id)initWithProfile:(Profile*)profile - (id)initWithProfile:(Profile*)profile
email:(std::string)email email:(std::string)email
reason:(signin_metrics::Reason)reason url:(GURL)url
webContents:(content::WebContents*)webContents; webContents:(content::WebContents*)webContents;
- (void)showURL:(const GURL&)url; - (void)showURL:(const GURL&)url;
- (void)close; - (void)close;
@end @end
@implementation ReauthDialogWindowController @implementation DialogWindowController
- (id)initWithProfile:(Profile*)profile - (id)initWithProfile:(Profile*)profile
email:(std::string)email email:(std::string)email
reason:(signin_metrics::Reason)reason url:(GURL)url
webContents:(content::WebContents*)webContents { webContents:(content::WebContents*)webContents {
webContents_ = webContents; webContents_ = webContents;
emailAddress_ = email; emailAddress_ = email;
reason_ = reason; url_ = url;
NSRect frame = NSMakeRect( NSRect frame = NSMakeRect(0, 0, UserManagerProfileDialog::kDialogWidth,
0, 0, UserManager::kReauthDialogWidth, UserManager::kReauthDialogHeight); UserManagerProfileDialog::kDialogHeight);
base::scoped_nsobject<ConstrainedWindowCustomWindow> window( base::scoped_nsobject<ConstrainedWindowCustomWindow> window(
[[ConstrainedWindowCustomWindow alloc] [[ConstrainedWindowCustomWindow alloc]
initWithContentRect:frame initWithContentRect:frame
...@@ -210,11 +209,11 @@ class ReauthDialogDelegate : public UserManager::BaseReauthDialogDelegate, ...@@ -210,11 +209,11 @@ class ReauthDialogDelegate : public UserManager::BaseReauthDialogDelegate,
if ((self = [super initWithWindow:window])) { if ((self = [super initWithWindow:window])) {
webContents_ = webContents; webContents_ = webContents;
reauthWebContents_.reset(content::WebContents::Create( dialogWebContents_.reset(content::WebContents::Create(
content::WebContents::CreateParams(profile))); content::WebContents::CreateParams(profile)));
window.get().contentView = reauthWebContents_->GetNativeView(); window.get().contentView = dialogWebContents_->GetNativeView();
webContentsDelegate_.reset(new ReauthDialogDelegate()); webContentsDelegate_.reset(new UserManagerProfileDialogDelegate());
reauthWebContents_->SetDelegate(webContentsDelegate_.get()); dialogWebContents_->SetDelegate(webContentsDelegate_.get());
base::scoped_nsobject<CustomConstrainedWindowSheet> sheet( base::scoped_nsobject<CustomConstrainedWindowSheet> sheet(
[[CustomConstrainedWindowSheet alloc] [[CustomConstrainedWindowSheet alloc]
...@@ -236,16 +235,13 @@ class ReauthDialogDelegate : public UserManager::BaseReauthDialogDelegate, ...@@ -236,16 +235,13 @@ class ReauthDialogDelegate : public UserManager::BaseReauthDialogDelegate,
} }
- (void)showURL:(const GURL&)url { - (void)showURL:(const GURL&)url {
reauthWebContents_->GetController().LoadURL(url, content::Referrer(), dialogWebContents_->GetController().LoadURL(url, content::Referrer(),
ui::PAGE_TRANSITION_AUTO_TOPLEVEL, ui::PAGE_TRANSITION_AUTO_TOPLEVEL,
std::string()); std::string());
} }
- (void)show { - (void)show {
GURL url = signin::GetReauthURLWithEmail( [self showURL:url_];
signin_metrics::AccessPoint::ACCESS_POINT_USER_MANAGER, reason_,
emailAddress_);
[self showURL:url];
} }
- (void)closeButtonClicked:(NSButton*)button { - (void)closeButtonClicked:(NSButton*)button {
...@@ -271,7 +267,7 @@ class ReauthDialogDelegate : public UserManager::BaseReauthDialogDelegate, ...@@ -271,7 +267,7 @@ class ReauthDialogDelegate : public UserManager::BaseReauthDialogDelegate,
std::unique_ptr<UserManagerWebContentsDelegate> webContentsDelegate_; std::unique_ptr<UserManagerWebContentsDelegate> webContentsDelegate_;
UserManagerMac* userManagerObserver_; // Weak. UserManagerMac* userManagerObserver_; // Weak.
std::unique_ptr<UserManagerModalManagerDelegate> modal_manager_delegate_; std::unique_ptr<UserManagerModalManagerDelegate> modal_manager_delegate_;
base::scoped_nsobject<ReauthDialogWindowController> reauth_window_controller_; base::scoped_nsobject<DialogWindowController> dialog_window_controller_;
} }
- (void)windowWillClose:(NSNotification*)notification; - (void)windowWillClose:(NSNotification*)notification;
- (void)dealloc; - (void)dealloc;
...@@ -281,11 +277,11 @@ class ReauthDialogDelegate : public UserManager::BaseReauthDialogDelegate, ...@@ -281,11 +277,11 @@ class ReauthDialogDelegate : public UserManager::BaseReauthDialogDelegate,
- (void)show; - (void)show;
- (void)close; - (void)close;
- (BOOL)isVisible; - (BOOL)isVisible;
- (void)showReauthDialogWithProfile:(Profile*)profile - (void)showDialogWithProfile:(Profile*)profile
email:(std::string)email email:(std::string)email
reason:(signin_metrics::Reason)reason; url:(GURL)url;
- (void)displayErrorMessage; - (void)displayErrorMessage;
- (void)closeReauthDialog; - (void)closeDialog;
@end @end
@implementation UserManagerWindowController @implementation UserManagerWindowController
...@@ -390,22 +386,22 @@ class ReauthDialogDelegate : public UserManager::BaseReauthDialogDelegate, ...@@ -390,22 +386,22 @@ class ReauthDialogDelegate : public UserManager::BaseReauthDialogDelegate,
userManagerObserver_->WindowWasClosed(); userManagerObserver_->WindowWasClosed();
} }
- (void)showReauthDialogWithProfile:(Profile*)profile - (void)showDialogWithProfile:(Profile*)profile
email:(std::string)email email:(std::string)email
reason:(signin_metrics::Reason)reason { url:(GURL)url {
reauth_window_controller_.reset([[ReauthDialogWindowController alloc] dialog_window_controller_.reset([[DialogWindowController alloc]
initWithProfile:profile initWithProfile:profile
email:email email:email
reason:reason url:url
webContents:webContents_.get()]); webContents:webContents_.get()]);
} }
- (void)displayErrorMessage { - (void)displayErrorMessage {
[reauth_window_controller_ showURL:GURL(chrome::kChromeUISigninErrorURL)]; [dialog_window_controller_ showURL:GURL(chrome::kChromeUISigninErrorURL)];
} }
- (void)closeReauthDialog { - (void)closeDialog {
[reauth_window_controller_ close]; [dialog_window_controller_ close];
} }
@end @end
...@@ -471,65 +467,79 @@ void UserManager::OnUserManagerShown() { ...@@ -471,65 +467,79 @@ void UserManager::OnUserManagerShown() {
} }
// static // static
void UserManager::ShowReauthDialog(content::BrowserContext* browser_context, void UserManager::AddOnUserManagerShownCallbackForTesting(
const std::string& email, const base::Closure& callback) {
signin_metrics::Reason reason) { if (!user_manager_shown_callbacks_for_testing_)
// This method should only be called if the user manager is already showing. user_manager_shown_callbacks_for_testing_ = new std::vector<base::Closure>;
if (!IsShowing()) user_manager_shown_callbacks_for_testing_->push_back(callback);
return; }
instance_->ShowReauthDialog(browser_context, email, reason); // static
base::FilePath UserManager::GetSigninProfilePath() {
return instance_->GetSigninProfilePath();
} }
// static // static
void UserManager::HideReauthDialog() { void UserManagerProfileDialog::ShowReauthDialog(
content::BrowserContext* browser_context,
const std::string& email,
signin_metrics::Reason reason) {
// This method should only be called if the user manager is already showing. // This method should only be called if the user manager is already showing.
if (!IsShowing()) if (!UserManager::IsShowing())
return; return;
GURL url = signin::GetReauthURLWithEmail(
instance_->CloseReauthDialog(); signin_metrics::AccessPoint::ACCESS_POINT_USER_MANAGER, reason, email);
instance_->ShowDialog(browser_context, email, url);
} }
// static // static
void UserManager::AddOnUserManagerShownCallbackForTesting( void UserManagerProfileDialog::ShowSigninDialog(
const base::Closure& callback) { content::BrowserContext* browser_context,
if (!user_manager_shown_callbacks_for_testing_) const base::FilePath& profile_path) {
user_manager_shown_callbacks_for_testing_ = new std::vector<base::Closure>; if (!UserManager::IsShowing())
user_manager_shown_callbacks_for_testing_->push_back(callback); return;
instance_->SetSigninProfilePath(profile_path);
GURL url = signin::GetPromoURL(
signin_metrics::AccessPoint::ACCESS_POINT_USER_MANAGER,
signin_metrics::Reason::REASON_SIGNIN_PRIMARY_ACCOUNT, true, true);
instance_->ShowDialog(browser_context, std::string(), url);
} }
// static // static
void UserManager::ShowSigninDialog(content::BrowserContext* browser_context, void UserManagerProfileDialog::ShowDialogAndDisplayErrorMessage(
const base::FilePath& profile_path) { content::BrowserContext* browser_context) {
if (!IsShowing()) if (!UserManager::IsShowing())
return; return;
instance_->SetSigninProfilePath(profile_path); instance_->ShowDialog(browser_context, std::string(),
ShowReauthDialog(browser_context, std::string(), GURL(chrome::kChromeUISigninErrorURL));
signin_metrics::Reason::REASON_SIGNIN_PRIMARY_ACCOUNT);
} }
// static // static
void UserManager::DisplayErrorMessage() { void UserManagerProfileDialog::DisplayErrorMessage() {
DCHECK(instance_); DCHECK(instance_);
instance_->DisplayErrorMessage(); instance_->DisplayErrorMessage();
} }
// static // static
base::FilePath UserManager::GetSigninProfilePath() { void UserManagerProfileDialog::HideDialog() {
return instance_->GetSigninProfilePath(); // This method should only be called if the user manager is already showing.
if (!UserManager::IsShowing())
return;
instance_->CloseDialog();
} }
void UserManagerMac::ShowReauthDialog(content::BrowserContext* browser_context, void UserManagerMac::ShowDialog(content::BrowserContext* browser_context,
const std::string& email, const std::string& email,
signin_metrics::Reason reason) { const GURL& url) {
[window_controller_ [window_controller_
showReauthDialogWithProfile:Profile::FromBrowserContext(browser_context) showDialogWithProfile:Profile::FromBrowserContext(browser_context)
email:email email:email
reason:reason]; url:url];
} }
void UserManagerMac::CloseReauthDialog() { void UserManagerMac::CloseDialog() {
[window_controller_ closeReauthDialog]; [window_controller_ closeDialog];
} }
UserManagerMac::UserManagerMac(Profile* profile) { UserManagerMac::UserManagerMac(Profile* profile) {
...@@ -561,7 +571,7 @@ void UserManagerMac::LogTimeToOpen() { ...@@ -561,7 +571,7 @@ void UserManagerMac::LogTimeToOpen() {
} }
void UserManagerMac::WindowWasClosed() { void UserManagerMac::WindowWasClosed() {
CloseReauthDialog(); CloseDialog();
instance_ = NULL; instance_ = NULL;
delete this; delete this;
} }
......
...@@ -16,17 +16,18 @@ bool AddToSet(std::set<content::WebContents*>* content_set, ...@@ -16,17 +16,18 @@ bool AddToSet(std::set<content::WebContents*>* content_set,
} // namespace } // namespace
UserManager::BaseReauthDialogDelegate::BaseReauthDialogDelegate() UserManagerProfileDialog::BaseDialogDelegate::BaseDialogDelegate()
: guest_web_contents_(nullptr) {} : guest_web_contents_(nullptr) {}
bool UserManager::BaseReauthDialogDelegate::HandleContextMenu( bool UserManagerProfileDialog::BaseDialogDelegate::HandleContextMenu(
const content::ContextMenuParams& params) { const content::ContextMenuParams& params) {
// Ignores context menu. // Ignores context menu.
return true; return true;
} }
void UserManager::BaseReauthDialogDelegate::LoadingStateChanged( void UserManagerProfileDialog::BaseDialogDelegate::LoadingStateChanged(
content::WebContents* source, bool to_different_document) { content::WebContents* source,
bool to_different_document) {
if (source->IsLoading() || guest_web_contents_) if (source->IsLoading() || guest_web_contents_)
return; return;
......
...@@ -23,16 +23,6 @@ class UserManager { ...@@ -23,16 +23,6 @@ class UserManager {
static constexpr int kWindowWidth = 800; static constexpr int kWindowWidth = 800;
static constexpr int kWindowHeight = 600; static constexpr int kWindowHeight = 600;
// Dimensions of the reauth dialog displaying the old-style signin flow with
// the username and password challenge on the same form.
static constexpr int kPasswordCombinedReauthDialogHeight = 440;
static constexpr int kPasswordCombinedReauthDialogWidth = 360;
// Dimensions of the reauth dialog displaying the password-separated signin
// flow.
static constexpr int kReauthDialogHeight = 512;
static constexpr int kReauthDialogWidth = 448;
// Shows the User Manager or re-activates an existing one, focusing the // Shows the User Manager or re-activates an existing one, focusing the
// profile given by |profile_path_to_focus|; passing an empty base::FilePath // profile given by |profile_path_to_focus|; passing an empty base::FilePath
// focuses no user pod. Based on the value of |tutorial_mode|, a tutorial // focuses no user pod. Based on the value of |tutorial_mode|, a tutorial
...@@ -58,6 +48,26 @@ class UserManager { ...@@ -58,6 +48,26 @@ class UserManager {
static void AddOnUserManagerShownCallbackForTesting( static void AddOnUserManagerShownCallbackForTesting(
const base::Closure& callback); const base::Closure& callback);
// Get the path of profile that is being signed in.
static base::FilePath GetSigninProfilePath();
private:
DISALLOW_IMPLICIT_CONSTRUCTORS(UserManager);
};
// Dialog that will be displayed when a profile is selected in UserManager.
class UserManagerProfileDialog {
public:
// Dimensions of the reauth dialog displaying the old-style signin flow with
// the username and password challenge on the same form.
static constexpr int kPasswordCombinedDialogHeight = 440;
static constexpr int kPasswordCombinedDialogWidth = 360;
// Dimensions of the reauth dialog displaying the password-separated signin
// flow.
static constexpr int kDialogHeight = 512;
static constexpr int kDialogWidth = 448;
// Shows a dialog where the user can re-authenticate the profile with the // Shows a dialog where the user can re-authenticate the profile with the
// given |email|. This is called in the following scenarios: // given |email|. This is called in the following scenarios:
// -From the user manager when a profile is locked and the user's password is // -From the user manager when a profile is locked and the user's password is
...@@ -70,26 +80,27 @@ class UserManager { ...@@ -70,26 +80,27 @@ class UserManager {
const std::string& email, const std::string& email,
signin_metrics::Reason reason); signin_metrics::Reason reason);
// Hides the reauth dialog if it is showing.
static void HideReauthDialog();
// Shows a dialog where the user logs into their profile for the first time // Shows a dialog where the user logs into their profile for the first time
// via the user manager. // via the user manager.
static void ShowSigninDialog(content::BrowserContext* browser_context, static void ShowSigninDialog(content::BrowserContext* browser_context,
const base::FilePath& profile_path); const base::FilePath& profile_path);
// Show the dialog and display local sign in error message without browser.
static void ShowDialogAndDisplayErrorMessage(
content::BrowserContext* browser_context);
// Display local sign in error message without browser. // Display local sign in error message without browser.
static void DisplayErrorMessage(); static void DisplayErrorMessage();
// Get the path of profile that is being signed in. // Hides the dialog if it is showing.
static base::FilePath GetSigninProfilePath(); static void HideDialog();
// Abstract base class for performing online reauthentication of profiles in // Abstract base class for performing online reauthentication of profiles in
// the User Manager. It is concretely implemented in UserManagerMac and // the User Manager. It is concretely implemented in UserManagerMac and
// UserManagerView to specialize the closing of the UI's dialog widgets. // UserManagerView to specialize the closing of the UI's dialog widgets.
class BaseReauthDialogDelegate : public content::WebContentsDelegate { class BaseDialogDelegate : public content::WebContentsDelegate {
public: public:
BaseReauthDialogDelegate(); BaseDialogDelegate();
// content::WebContentsDelegate: // content::WebContentsDelegate:
bool HandleContextMenu(const content::ContextMenuParams& params) override; bool HandleContextMenu(const content::ContextMenuParams& params) override;
...@@ -98,17 +109,14 @@ class UserManager { ...@@ -98,17 +109,14 @@ class UserManager {
void LoadingStateChanged(content::WebContents* source, void LoadingStateChanged(content::WebContents* source,
bool to_different_document) override; bool to_different_document) override;
private: protected:
virtual void CloseReauthDialog() = 0; virtual void CloseDialog() = 0;
// WebContents of the embedded WebView. // WebContents of the embedded WebView.
content::WebContents* guest_web_contents_; content::WebContents* guest_web_contents_;
DISALLOW_COPY_AND_ASSIGN(BaseReauthDialogDelegate); DISALLOW_COPY_AND_ASSIGN(BaseDialogDelegate);
}; };
private:
DISALLOW_COPY_AND_ASSIGN(UserManager);
}; };
#endif // CHROME_BROWSER_UI_USER_MANAGER_H_ #endif // CHROME_BROWSER_UI_USER_MANAGER_H_
...@@ -55,88 +55,81 @@ base::Closure* user_manager_shown_callback_for_testing_ = nullptr; ...@@ -55,88 +55,81 @@ base::Closure* user_manager_shown_callback_for_testing_ = nullptr;
bool instance_under_construction_ = false; bool instance_under_construction_ = false;
} // namespace } // namespace
// ReauthDelegate--------------------------------------------------------------- // Delegate---------------------------------------------------------------
ReauthDelegate::ReauthDelegate(UserManagerView* parent, UserManagerProfileDialogDelegate::UserManagerProfileDialogDelegate(
UserManagerView* parent,
views::WebView* web_view, views::WebView* web_view,
const std::string& email_address, const std::string& email_address,
signin_metrics::Reason reason) const GURL& url)
: parent_(parent), : parent_(parent), web_view_(web_view), email_address_(email_address) {
web_view_(web_view),
email_address_(email_address) {
AddChildView(web_view_); AddChildView(web_view_);
SetLayoutManager(new views::FillLayout()); SetLayoutManager(new views::FillLayout());
web_view_->GetWebContents()->SetDelegate(this); web_view_->GetWebContents()->SetDelegate(this);
// Load the re-auth URL, prepopulated with the user's email address.
// Add the index of the profile to the URL so that the inline login page
// knows which profile to load and update the credentials.
GURL url = signin::GetReauthURLWithEmail(
signin_metrics::AccessPoint::ACCESS_POINT_USER_MANAGER, reason,
email_address_);
web_view_->LoadInitialURL(url); web_view_->LoadInitialURL(url);
} }
ReauthDelegate::~ReauthDelegate() {} UserManagerProfileDialogDelegate::~UserManagerProfileDialogDelegate() {}
gfx::Size ReauthDelegate::GetPreferredSize() const { gfx::Size UserManagerProfileDialogDelegate::GetPreferredSize() const {
return switches::UsePasswordSeparatedSigninFlow() ? return switches::UsePasswordSeparatedSigninFlow()
gfx::Size(UserManager::kReauthDialogWidth, ? gfx::Size(UserManagerProfileDialog::kDialogWidth,
UserManager::kReauthDialogHeight) : UserManagerProfileDialog::kDialogHeight)
gfx::Size(UserManager::kPasswordCombinedReauthDialogWidth, : gfx::Size(
UserManager::kPasswordCombinedReauthDialogHeight); UserManagerProfileDialog::kPasswordCombinedDialogWidth,
UserManagerProfileDialog::kPasswordCombinedDialogHeight);
} }
void ReauthDelegate::DisplayErrorMessage() { void UserManagerProfileDialogDelegate::DisplayErrorMessage() {
web_view_->LoadInitialURL(GURL(chrome::kChromeUISigninErrorURL)); web_view_->LoadInitialURL(GURL(chrome::kChromeUISigninErrorURL));
} }
bool ReauthDelegate::CanResize() const { bool UserManagerProfileDialogDelegate::CanResize() const {
return true; return true;
} }
bool ReauthDelegate::CanMaximize() const { bool UserManagerProfileDialogDelegate::CanMaximize() const {
return true; return true;
} }
bool ReauthDelegate::CanMinimize() const { bool UserManagerProfileDialogDelegate::CanMinimize() const {
return true; return true;
} }
bool ReauthDelegate::ShouldUseCustomFrame() const { bool UserManagerProfileDialogDelegate::ShouldUseCustomFrame() const {
return false; return false;
} }
ui::ModalType ReauthDelegate::GetModalType() const { ui::ModalType UserManagerProfileDialogDelegate::GetModalType() const {
return ui::MODAL_TYPE_WINDOW; return ui::MODAL_TYPE_WINDOW;
} }
void ReauthDelegate::DeleteDelegate() { void UserManagerProfileDialogDelegate::DeleteDelegate() {
OnReauthDialogDestroyed(); OnDialogDestroyed();
delete this; delete this;
} }
base::string16 ReauthDelegate::GetWindowTitle() const { base::string16 UserManagerProfileDialogDelegate::GetWindowTitle() const {
return l10n_util::GetStringUTF16(IDS_PROFILES_GAIA_SIGNIN_TITLE); return l10n_util::GetStringUTF16(IDS_PROFILES_GAIA_SIGNIN_TITLE);
} }
int ReauthDelegate::GetDialogButtons() const { int UserManagerProfileDialogDelegate::GetDialogButtons() const {
return ui::DIALOG_BUTTON_NONE; return ui::DIALOG_BUTTON_NONE;
} }
views::View* ReauthDelegate::GetInitiallyFocusedView() { views::View* UserManagerProfileDialogDelegate::GetInitiallyFocusedView() {
return static_cast<views::View*>(web_view_); return static_cast<views::View*>(web_view_);
} }
void ReauthDelegate::CloseReauthDialog() { void UserManagerProfileDialogDelegate::CloseDialog() {
OnReauthDialogDestroyed(); OnDialogDestroyed();
GetWidget()->Close(); GetWidget()->Close();
} }
void ReauthDelegate::OnReauthDialogDestroyed() { void UserManagerProfileDialogDelegate::OnDialogDestroyed() {
if (parent_) { if (parent_) {
parent_->OnReauthDialogDestroyed(); parent_->OnDialogDestroyed();
parent_ = nullptr; parent_ = nullptr;
} }
} }
...@@ -209,49 +202,68 @@ void UserManager::OnUserManagerShown() { ...@@ -209,49 +202,68 @@ void UserManager::OnUserManagerShown() {
} }
// static // static
void UserManager::ShowReauthDialog(content::BrowserContext* browser_context, void UserManager::AddOnUserManagerShownCallbackForTesting(
const std::string& email, const base::Closure& callback) {
signin_metrics::Reason reason) { DCHECK(!user_manager_shown_callback_for_testing_);
// This method should only be called if the user manager is already showing. user_manager_shown_callback_for_testing_ = new base::Closure(callback);
if (!IsShowing())
return;
instance_->ShowReauthDialog(browser_context, email, reason);
} }
// static // static
void UserManager::HideReauthDialog() { base::FilePath UserManager::GetSigninProfilePath() {
// This method should only be called if the user manager is already showing. return instance_->GetSigninProfilePath();
if (instance_ && instance_->GetWidget()->IsVisible())
instance_->HideReauthDialog();
} }
// UserManagerProfileDialog
// -------------------------------------------------------------
// static // static
void UserManager::AddOnUserManagerShownCallbackForTesting( void UserManagerProfileDialog::ShowReauthDialog(
const base::Closure& callback) { content::BrowserContext* browser_context,
DCHECK(!user_manager_shown_callback_for_testing_); const std::string& email,
user_manager_shown_callback_for_testing_ = new base::Closure(callback); signin_metrics::Reason reason) {
// This method should only be called if the user manager is already showing.
if (!UserManager::IsShowing())
return;
// Load the re-auth URL, prepopulated with the user's email address.
// Add the index of the profile to the URL so that the inline login page
// knows which profile to load and update the credentials.
GURL url = signin::GetReauthURLWithEmail(
signin_metrics::AccessPoint::ACCESS_POINT_USER_MANAGER, reason, email);
instance_->ShowDialog(browser_context, email, url);
} }
// static // static
void UserManager::ShowSigninDialog(content::BrowserContext* browser_context, void UserManagerProfileDialog::ShowSigninDialog(
content::BrowserContext* browser_context,
const base::FilePath& profile_path) { const base::FilePath& profile_path) {
if (!IsShowing()) if (!UserManager::IsShowing())
return; return;
instance_->SetSigninProfilePath(profile_path); instance_->SetSigninProfilePath(profile_path);
ShowReauthDialog(browser_context, std::string(), GURL url = signin::GetPromoURL(
signin_metrics::Reason::REASON_SIGNIN_PRIMARY_ACCOUNT); signin_metrics::AccessPoint::ACCESS_POINT_USER_MANAGER,
signin_metrics::Reason::REASON_SIGNIN_PRIMARY_ACCOUNT, true, true);
instance_->ShowDialog(browser_context, std::string(), url);
}
void UserManagerProfileDialog::ShowDialogAndDisplayErrorMessage(
content::BrowserContext* browser_context) {
if (!UserManager::IsShowing())
return;
instance_->ShowDialog(browser_context, std::string(),
GURL(chrome::kChromeUISigninErrorURL));
} }
// static // static
void UserManager::DisplayErrorMessage() { void UserManagerProfileDialog::DisplayErrorMessage() {
// This method should only be called if the user manager is already showing. // This method should only be called if the user manager is already showing.
DCHECK(instance_); DCHECK(instance_);
instance_->DisplayErrorMessage(); instance_->DisplayErrorMessage();
} }
// static // static
base::FilePath UserManager::GetSigninProfilePath() { void UserManagerProfileDialog::HideDialog() {
return instance_->GetSigninProfilePath(); if (instance_ && instance_->GetWidget()->IsVisible())
instance_->HideDialog();
} }
// UserManagerView ------------------------------------------------------------- // UserManagerView -------------------------------------------------------------
...@@ -265,7 +277,7 @@ UserManagerView::UserManagerView() ...@@ -265,7 +277,7 @@ UserManagerView::UserManagerView()
} }
UserManagerView::~UserManagerView() { UserManagerView::~UserManagerView() {
HideReauthDialog(); HideDialog();
} }
// static // static
...@@ -283,29 +295,27 @@ void UserManagerView::OnSystemProfileCreated( ...@@ -283,29 +295,27 @@ void UserManagerView::OnSystemProfileCreated(
instance_->Init(system_profile, GURL(url)); instance_->Init(system_profile, GURL(url));
} }
void UserManagerView::ShowReauthDialog(content::BrowserContext* browser_context, void UserManagerView::ShowDialog(content::BrowserContext* browser_context,
const std::string& email, const std::string& email,
signin_metrics::Reason reason) { const GURL& url) {
HideReauthDialog(); HideDialog();
// The dialog delegate will be deleted when the widget closes. The created // The dialog delegate will be deleted when the widget closes. The created
// WebView's lifetime is managed by the delegate. // WebView's lifetime is managed by the delegate.
delegate_ = new ReauthDelegate(this, delegate_ = new UserManagerProfileDialogDelegate(
new views::WebView(browser_context), this, new views::WebView(browser_context), email, url);
email,
reason);
gfx::NativeView parent = instance_->GetWidget()->GetNativeView(); gfx::NativeView parent = instance_->GetWidget()->GetNativeView();
views::DialogDelegate::CreateDialogWidget(delegate_, nullptr, parent); views::DialogDelegate::CreateDialogWidget(delegate_, nullptr, parent);
delegate_->GetWidget()->Show(); delegate_->GetWidget()->Show();
} }
void UserManagerView::HideReauthDialog() { void UserManagerView::HideDialog() {
if (delegate_) { if (delegate_) {
delegate_->CloseReauthDialog(); delegate_->CloseDialog();
DCHECK(!delegate_); DCHECK(!delegate_);
} }
} }
void UserManagerView::OnReauthDialogDestroyed() { void UserManagerView::OnDialogDestroyed() {
delegate_ = nullptr; delegate_ = nullptr;
} }
......
...@@ -19,27 +19,28 @@ ...@@ -19,27 +19,28 @@
class ScopedKeepAlive; class ScopedKeepAlive;
class UserManagerView; class UserManagerView;
class ReauthDelegate : public views::DialogDelegateView, class UserManagerProfileDialogDelegate
public UserManager::BaseReauthDialogDelegate { : public views::DialogDelegateView,
public UserManagerProfileDialog::BaseDialogDelegate {
public: public:
ReauthDelegate(UserManagerView* parent, UserManagerProfileDialogDelegate(UserManagerView* parent,
views::WebView* web_view, views::WebView* web_view,
const std::string& email_address, const std::string& email_address,
signin_metrics::Reason reason); const GURL& url);
~ReauthDelegate() override; ~UserManagerProfileDialogDelegate() override;
// UserManager::BaseReauthDialogDelegate: // UserManagerProfileDialog::BaseDialogDelegate
void CloseReauthDialog() override; void CloseDialog() override;
// Display the local error message inside login window. // Display the local error message inside login window.
void DisplayErrorMessage(); void DisplayErrorMessage();
private: private:
ReauthDelegate(); UserManagerProfileDialogDelegate();
// Before its destruction, tells its parent container to reset its reference // Before its destruction, tells its parent container to reset its reference
// to the ReauthDelegate. // to the UserManagerProfileDialogDelegate.
void OnReauthDialogDestroyed(); void OnDialogDestroyed();
// views::DialogDelegate: // views::DialogDelegate:
gfx::Size GetPreferredSize() const override; gfx::Size GetPreferredSize() const override;
...@@ -57,7 +58,7 @@ class ReauthDelegate : public views::DialogDelegateView, ...@@ -57,7 +58,7 @@ class ReauthDelegate : public views::DialogDelegateView,
views::WebView* web_view_; views::WebView* web_view_;
const std::string email_address_; const std::string email_address_;
DISALLOW_COPY_AND_ASSIGN(ReauthDelegate); DISALLOW_COPY_AND_ASSIGN(UserManagerProfileDialogDelegate);
}; };
namespace views { namespace views {
...@@ -85,20 +86,14 @@ class UserManagerView : public views::DialogDelegateView { ...@@ -85,20 +86,14 @@ class UserManagerView : public views::DialogDelegateView {
// Logs how long it took the UserManager to open. // Logs how long it took the UserManager to open.
void LogTimeToOpen(); void LogTimeToOpen();
// Shows a dialog where the user can re-authenticate the profile with the
// given |email|. This is called in the following scenarios:
// -From the user manager when a profile is locked and the user's password is
// detected to have been changed.
// -From the user manager when a custodian account needs to be
// reauthenticated.
// reason| can be REASON_UNLOCK or REASON_REAUTHENTICATION to indicate
// whether this is a reauth or unlock scenario.
void ShowReauthDialog(content::BrowserContext* browser_context,
const std::string& email,
signin_metrics::Reason reason);
// Hides the reauth dialog if it is showing. // Hides the reauth dialog if it is showing.
void HideReauthDialog(); void HideDialog();
// Show a dialog where the user can auth the profile or see the auth error
// message.
void ShowDialog(content::BrowserContext* browser_context,
const std::string& email,
const GURL& url);
// Display sign in error message that is created by Chrome but not GAIA // Display sign in error message that is created by Chrome but not GAIA
// without browser window. // without browser window.
...@@ -110,13 +105,13 @@ class UserManagerView : public views::DialogDelegateView { ...@@ -110,13 +105,13 @@ class UserManagerView : public views::DialogDelegateView {
base::FilePath GetSigninProfilePath(); base::FilePath GetSigninProfilePath();
private: private:
friend class ReauthDelegate; friend class UserManagerProfileDialogDelegate;
friend std::default_delete<UserManagerView>; friend std::default_delete<UserManagerView>;
~UserManagerView() override; ~UserManagerView() override;
// Resets delegate_ to nullptr when delegate_ is no longer alive. // Resets delegate_ to nullptr when delegate_ is no longer alive.
void OnReauthDialogDestroyed(); void OnDialogDestroyed();
// Creates dialog and initializes UI. // Creates dialog and initializes UI.
void Init(Profile* guest_profile, const GURL& url); void Init(Profile* guest_profile, const GURL& url);
...@@ -136,7 +131,7 @@ class UserManagerView : public views::DialogDelegateView { ...@@ -136,7 +131,7 @@ class UserManagerView : public views::DialogDelegateView {
views::WebView* web_view_; views::WebView* web_view_;
ReauthDelegate* delegate_; UserManagerProfileDialogDelegate* delegate_;
std::unique_ptr<ScopedKeepAlive> keep_alive_; std::unique_ptr<ScopedKeepAlive> keep_alive_;
base::Time user_manager_started_showing_; base::Time user_manager_started_showing_;
......
...@@ -26,7 +26,8 @@ namespace { ...@@ -26,7 +26,8 @@ namespace {
void ShowSigninDialog(base::FilePath signin_profile_path, void ShowSigninDialog(base::FilePath signin_profile_path,
Profile* system_profile, Profile* system_profile,
Profile::CreateStatus status) { Profile::CreateStatus status) {
UserManager::ShowSigninDialog(system_profile, signin_profile_path); UserManagerProfileDialog::ShowSigninDialog(system_profile,
signin_profile_path);
} }
void DeleteProfileCallback(std::unique_ptr<ScopedKeepAlive> keep_alive, void DeleteProfileCallback(std::unique_ptr<ScopedKeepAlive> keep_alive,
......
...@@ -285,5 +285,5 @@ void InlineLoginHandler::HandleDialogClose(const base::ListValue* args) { ...@@ -285,5 +285,5 @@ void InlineLoginHandler::HandleDialogClose(const base::ListValue* args) {
browser->CloseModalSigninWindow(); browser->CloseModalSigninWindow();
// Does nothing if user manager is not showing. // Does nothing if user manager is not showing.
UserManager::HideReauthDialog(); UserManagerProfileDialog::HideDialog();
} }
...@@ -77,7 +77,7 @@ void LoginUIService::DisplayLoginResult(Browser* browser, ...@@ -77,7 +77,7 @@ void LoginUIService::DisplayLoginResult(Browser* browser,
if (browser) if (browser)
browser->ShowModalSigninErrorWindow(); browser->ShowModalSigninErrorWindow();
else else
UserManager::DisplayErrorMessage(); UserManagerProfileDialog::DisplayErrorMessage();
} else if (browser) { } else if (browser) {
browser->window()->ShowAvatarBubbleFromAvatarButton( browser->window()->ShowAvatarBubbleFromAvatarButton(
error_message.empty() ? BrowserWindow::AVATAR_BUBBLE_MODE_CONFIRM_SIGNIN error_message.empty() ? BrowserWindow::AVATAR_BUBBLE_MODE_CONFIRM_SIGNIN
......
...@@ -429,8 +429,8 @@ void SigninCreateProfileHandler::OpenNewWindowForProfile( ...@@ -429,8 +429,8 @@ void SigninCreateProfileHandler::OpenNewWindowForProfile(
} }
void SigninCreateProfileHandler::OpenSigninDialogForProfile(Profile* profile) { void SigninCreateProfileHandler::OpenSigninDialogForProfile(Profile* profile) {
UserManager::ShowSigninDialog(web_ui()->GetWebContents()->GetBrowserContext(), UserManagerProfileDialog::ShowSigninDialog(
profile->GetPath()); web_ui()->GetWebContents()->GetBrowserContext(), profile->GetPath());
} }
void SigninCreateProfileHandler::ShowProfileCreationError( void SigninCreateProfileHandler::ShowProfileCreationError(
......
...@@ -83,7 +83,7 @@ void SigninErrorHandler::CloseDialog() { ...@@ -83,7 +83,7 @@ void SigninErrorHandler::CloseDialog() {
if (is_system_profile_) { if (is_system_profile_) {
// Avoid closing the user manager window when the error message is displayed // Avoid closing the user manager window when the error message is displayed
// without browser window. // without browser window.
UserManager::HideReauthDialog(); UserManagerProfileDialog::HideDialog();
} else { } else {
Browser* browser = signin::GetDesktopBrowser(web_ui()); Browser* browser = signin::GetDesktopBrowser(web_ui());
DCHECK(browser); DCHECK(browser);
......
...@@ -42,6 +42,9 @@ SigninErrorUI::SigninErrorUI(content::WebUI* web_ui, ...@@ -42,6 +42,9 @@ SigninErrorUI::SigninErrorUI(content::WebUI* web_ui,
if (is_system_profile) { if (is_system_profile) {
signin_profile = g_browser_process->profile_manager()->GetProfileByPath( signin_profile = g_browser_process->profile_manager()->GetProfileByPath(
UserManager::GetSigninProfilePath()); UserManager::GetSigninProfilePath());
// Sign in is completed before profile creation.
if (!signin_profile)
signin_profile = webui_profile->GetOriginalProfile();
} else { } else {
signin_profile = webui_profile; signin_profile = webui_profile;
} }
......
...@@ -139,7 +139,7 @@ void SigninSupervisedUserImportHandler::AuthenticateCustodian( ...@@ -139,7 +139,7 @@ void SigninSupervisedUserImportHandler::AuthenticateCustodian(
bool success = args->GetString(0, &email); bool success = args->GetString(0, &email);
DCHECK(success); DCHECK(success);
UserManager::ShowReauthDialog( UserManagerProfileDialog::ShowReauthDialog(
web_ui()->GetWebContents()->GetBrowserContext(), email, web_ui()->GetWebContents()->GetBrowserContext(), email,
signin_metrics::Reason::REASON_REAUTHENTICATION); signin_metrics::Reason::REASON_REAUTHENTICATION);
} }
......
...@@ -43,6 +43,8 @@ ...@@ -43,6 +43,8 @@
#include "chrome/browser/ui/singleton_tabs.h" #include "chrome/browser/ui/singleton_tabs.h"
#include "chrome/browser/ui/user_manager.h" #include "chrome/browser/ui/user_manager.h"
#include "chrome/browser/ui/webui/profile_helper.h" #include "chrome/browser/ui/webui/profile_helper.h"
#include "chrome/browser/ui/webui/signin/login_ui_service.h"
#include "chrome/browser/ui/webui/signin/login_ui_service_factory.h"
#include "chrome/common/chrome_features.h" #include "chrome/common/chrome_features.h"
#include "chrome/common/pref_names.h" #include "chrome/common/pref_names.h"
#include "chrome/common/url_constants.h" #include "chrome/common/url_constants.h"
...@@ -462,11 +464,22 @@ void UserManagerScreenHandler::HandleAuthenticatedLaunchUser( ...@@ -462,11 +464,22 @@ void UserManagerScreenHandler::HandleAuthenticatedLaunchUser(
if (!email_address_.empty()) { if (!email_address_.empty()) {
// In order to support the upgrade case where we have a local hash but no // In order to support the upgrade case where we have a local hash but no
// password token, the user must perform a full online reauth. // password token, the user must perform a full online reauth.
UserManager::ShowReauthDialog(browser_context, email_address_, UserManagerProfileDialog::ShowReauthDialog(
signin_metrics::Reason::REASON_UNLOCK); browser_context, email_address_, signin_metrics::Reason::REASON_UNLOCK);
} else if (entry->IsSigninRequired() && entry->IsSupervised()) {
// Supervised profile will only be locked when force-sign-in is enabled
// and it shouldn't be unlocked. Display the error message directly via
// the system profile to avoid profile creation.
LoginUIServiceFactory::GetForProfile(
Profile::FromWebUI(web_ui())->GetOriginalProfile())
->DisplayLoginResult(nullptr,
l10n_util::GetStringUTF16(
IDS_SUPERVISED_USER_NOT_ALLOWED_BY_POLICY),
base::string16());
UserManagerProfileDialog::ShowDialogAndDisplayErrorMessage(browser_context);
} else { } else {
// Fresh sign in via user manager without existing email address. // Fresh sign in via user manager without existing email address.
UserManager::ShowSigninDialog(browser_context, profile_path); UserManagerProfileDialog::ShowSigninDialog(browser_context, profile_path);
} }
} }
...@@ -691,8 +704,8 @@ void UserManagerScreenHandler::OnOAuthError() { ...@@ -691,8 +704,8 @@ void UserManagerScreenHandler::OnOAuthError() {
// Password has changed. Go through online signin flow. // Password has changed. Go through online signin flow.
DCHECK(!email_address_.empty()); DCHECK(!email_address_.empty());
oauth_client_.reset(); oauth_client_.reset();
UserManager::ShowReauthDialog(web_ui()->GetWebContents()->GetBrowserContext(), UserManagerProfileDialog::ShowReauthDialog(
email_address_, web_ui()->GetWebContents()->GetBrowserContext(), email_address_,
signin_metrics::Reason::REASON_UNLOCK); signin_metrics::Reason::REASON_UNLOCK);
} }
......
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