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

Side by Side Diff: chrome/browser/ui/webui/signin/signin_error_handler.cc

Issue 2552473002: Display error message when user try to open a locked supervised user profile when force-sign-in is … (Closed)
Patch Set: sky's comments Created 4 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/webui/signin/signin_error_handler.h" 5 #include "chrome/browser/ui/webui/signin/signin_error_handler.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "chrome/browser/profiles/profile_manager.h" 8 #include "chrome/browser/profiles/profile_manager.h"
9 #include "chrome/browser/profiles/profile_window.h" 9 #include "chrome/browser/profiles/profile_window.h"
10 #include "chrome/browser/signin/signin_ui_util.h" 10 #include "chrome/browser/signin/signin_ui_util.h"
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 // TODO(anthonyvd): Figure out why this is needed on Mac and not other 76 // TODO(anthonyvd): Figure out why this is needed on Mac and not other
77 // platforms and if there's a way to start unfocused while avoiding this 77 // platforms and if there's a way to start unfocused while avoiding this
78 // workaround. 78 // workaround.
79 web_ui()->CallJavascriptFunctionUnsafe("signin.error.clearFocus"); 79 web_ui()->CallJavascriptFunctionUnsafe("signin.error.clearFocus");
80 } 80 }
81 81
82 void SigninErrorHandler::CloseDialog() { 82 void SigninErrorHandler::CloseDialog() {
83 if (is_system_profile_) { 83 if (is_system_profile_) {
84 // Avoid closing the user manager window when the error message is displayed 84 // Avoid closing the user manager window when the error message is displayed
85 // without browser window. 85 // without browser window.
86 UserManager::HideReauthDialog(); 86 UserManagerProfileDialog::HideDialog();
87 } else { 87 } else {
88 Browser* browser = signin::GetDesktopBrowser(web_ui()); 88 Browser* browser = signin::GetDesktopBrowser(web_ui());
89 DCHECK(browser); 89 DCHECK(browser);
90 browser->CloseModalSigninWindow(); 90 browser->CloseModalSigninWindow();
91 } 91 }
92 } 92 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/signin/signin_create_profile_handler.cc ('k') | chrome/browser/ui/webui/signin/signin_error_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698