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

Unified Diff: chrome/browser/ui/webui/signin/signin_error_handler.cc

Issue 2722783002: Use CallJavascriptFunction instead of CallJavascriptFunctionUnsafe in sign-in error dialog. (Closed)
Patch Set: Nit Created 3 years, 10 months 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/signin/signin_error_handler.cc
diff --git a/chrome/browser/ui/webui/signin/signin_error_handler.cc b/chrome/browser/ui/webui/signin/signin_error_handler.cc
index c42f4a033011c7eb77143acdc1003f6eaa11de65..4680527565821f724dd384e88f35ae4aac497d4a 100644
--- a/chrome/browser/ui/webui/signin/signin_error_handler.cc
+++ b/chrome/browser/ui/webui/signin/signin_error_handler.cc
@@ -66,8 +66,9 @@ void SigninErrorHandler::HandleLearnMore(const base::ListValue* args) {
void SigninErrorHandler::HandleInitializedWithSize(
const base::ListValue* args) {
+ AllowJavascript();
if (duplicate_profile_path_.empty())
- web_ui()->CallJavascriptFunctionUnsafe("signin.error.removeSwitchButton");
+ CallJavascriptFunction("signin.error.removeSwitchButton");
signin::SetInitializedModalHeight(web_ui(), args);
@@ -76,7 +77,7 @@ void SigninErrorHandler::HandleInitializedWithSize(
// TODO(anthonyvd): Figure out why this is needed on Mac and not other
// platforms and if there's a way to start unfocused while avoiding this
// workaround.
- web_ui()->CallJavascriptFunctionUnsafe("signin.error.clearFocus");
+ CallJavascriptFunction("signin.error.clearFocus");
}
void SigninErrorHandler::CloseDialog() {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698