| OLD | NEW |
| 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 Loading... |
| 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 } |
| OLD | NEW |