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

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

Issue 1995113002: Rename WebUI::CallJavascriptFunction to WebUI::CallJavascriptFunctionUnsafe (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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
Index: chrome/browser/ui/webui/signin/signin_create_profile_handler.cc
diff --git a/chrome/browser/ui/webui/signin/signin_create_profile_handler.cc b/chrome/browser/ui/webui/signin/signin_create_profile_handler.cc
index 2845ff5fe095f81a8cf88351ee0f63eab4d1db0d..8dbfcaa143964b1367613b53c5be2753ecebc976 100644
--- a/chrome/browser/ui/webui/signin/signin_create_profile_handler.cc
+++ b/chrome/browser/ui/webui/signin/signin_create_profile_handler.cc
@@ -191,9 +191,9 @@ void SigninCreateProfileHandler::RequestDefaultProfileIcons(
image_url_list.Append(std::move(avatar_info));
}
- web_ui()->CallJavascriptFunction("cr.webUIListenerCallback",
- base::StringValue("profile-icons-received"),
- image_url_list);
+ web_ui()->CallJavascriptFunctionUnsafe(
+ "cr.webUIListenerCallback", base::StringValue("profile-icons-received"),
+ image_url_list);
SendNewProfileDefaults();
}
@@ -204,10 +204,9 @@ void SigninCreateProfileHandler::SendNewProfileDefaults() {
base::DictionaryValue profile_info;
profile_info.SetString("name", storage.ChooseNameForNewProfile(0));
- web_ui()->CallJavascriptFunction(
+ web_ui()->CallJavascriptFunctionUnsafe(
"cr.webUIListenerCallback",
- base::StringValue("profile-defaults-received"),
- profile_info);
+ base::StringValue("profile-defaults-received"), profile_info);
}
void SigninCreateProfileHandler::RequestSignedInProfiles(
@@ -228,9 +227,9 @@ void SigninCreateProfileHandler::RequestSignedInProfiles(
user_info_list.Append(std::move(user_info));
}
- web_ui()->CallJavascriptFunction("cr.webUIListenerCallback",
- base::StringValue("signedin-users-received"),
- user_info_list);
+ web_ui()->CallJavascriptFunctionUnsafe(
+ "cr.webUIListenerCallback", base::StringValue("signedin-users-received"),
+ user_info_list);
}
void SigninCreateProfileHandler::CreateProfile(const base::ListValue* args) {
@@ -400,10 +399,9 @@ void SigninCreateProfileHandler::CreateShortcutAndShowSuccess(
}
#endif
- web_ui()->CallJavascriptFunction(
+ web_ui()->CallJavascriptFunctionUnsafe(
"cr.webUIListenerCallback",
- GetWebUIListenerName(PROFILE_CREATION_SUCCESS),
- dict);
+ GetWebUIListenerName(PROFILE_CREATION_SUCCESS), dict);
if (open_new_window) {
// Opening the new window must be the last action, after all callbacks
@@ -429,9 +427,9 @@ void SigninCreateProfileHandler::ShowProfileCreationError(
Profile* profile,
const base::string16& error) {
DCHECK_NE(NO_CREATION_IN_PROGRESS, profile_creation_type_);
- web_ui()->CallJavascriptFunction("cr.webUIListenerCallback",
- GetWebUIListenerName(PROFILE_CREATION_ERROR),
- base::StringValue(error));
+ web_ui()->CallJavascriptFunctionUnsafe(
+ "cr.webUIListenerCallback", GetWebUIListenerName(PROFILE_CREATION_ERROR),
+ base::StringValue(error));
// The ProfileManager calls us back with a NULL profile in some cases.
if (profile) {
webui::DeleteProfileAtPath(profile->GetPath(),
@@ -762,9 +760,9 @@ void SigninCreateProfileHandler::OnSupervisedUserRegistered(
void SigninCreateProfileHandler::ShowProfileCreationWarning(
const base::string16& warning) {
DCHECK_EQ(SUPERVISED_PROFILE_CREATION, profile_creation_type_);
- web_ui()->CallJavascriptFunction("cr.webUIListenerCallback",
- base::StringValue("create-profile-warning"),
- base::StringValue(warning));
+ web_ui()->CallJavascriptFunctionUnsafe(
+ "cr.webUIListenerCallback", base::StringValue("create-profile-warning"),
+ base::StringValue(warning));
}
void SigninCreateProfileHandler::RecordSupervisedProfileCreationMetrics(

Powered by Google App Engine
This is Rietveld 408576698