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

Unified Diff: chrome/browser/ui/webui/options/manage_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/options/manage_profile_handler.cc
diff --git a/chrome/browser/ui/webui/options/manage_profile_handler.cc b/chrome/browser/ui/webui/options/manage_profile_handler.cc
index 2768778cc8b639c03c8b1568b35deb21ed0d1e0f..387e7ce2582d6846f398f676fb30d0656d37a388 100644
--- a/chrome/browser/ui/webui/options/manage_profile_handler.cc
+++ b/chrome/browser/ui/webui/options/manage_profile_handler.cc
@@ -296,7 +296,7 @@ void ManageProfileHandler::RequestNewProfileDefaults(
profile_info.SetString("iconURL",
profiles::GetDefaultAvatarIconUrl(icon_index));
- web_ui()->CallJavascriptFunction(
+ web_ui()->CallJavascriptFunctionUnsafe(
"ManageProfileOverlay.receiveNewProfileDefaults", profile_info);
}
@@ -332,7 +332,7 @@ void ManageProfileHandler::SendProfileIconsAndNames(
default_name_list.AppendString(storage.ChooseNameForNewProfile(i));
}
- web_ui()->CallJavascriptFunction(
+ web_ui()->CallJavascriptFunctionUnsafe(
"ManageProfileOverlay.receiveDefaultProfileIconsAndNames", mode,
image_url_list, default_name_list);
}
@@ -345,7 +345,7 @@ void ManageProfileHandler::SendExistingProfileNames() {
for (const ProfileAttributesEntry* entry : entries)
profile_name_dict.SetBoolean(base::UTF16ToUTF8(entry->GetName()), true);
- web_ui()->CallJavascriptFunction(
+ web_ui()->CallJavascriptFunctionUnsafe(
"ManageProfileOverlay.receiveExistingProfileNames", profile_name_dict);
}
@@ -353,7 +353,7 @@ void ManageProfileHandler::ShowDisconnectManagedProfileDialog(
const base::ListValue* args) {
base::DictionaryValue replacements;
GenerateSignedinUserSpecificStrings(&replacements);
- web_ui()->CallJavascriptFunction(
+ web_ui()->CallJavascriptFunctionUnsafe(
"ManageProfileOverlay.showDisconnectManagedProfileDialog", replacements);
}
@@ -465,8 +465,8 @@ void ManageProfileHandler::ProfileIconSelectionChanged(
base::StringValue gaia_name_value(gaia_name);
base::StringValue mode_value(kManageProfileIdentifier);
- web_ui()->CallJavascriptFunction("ManageProfileOverlay.setProfileName",
- gaia_name_value, mode_value);
+ web_ui()->CallJavascriptFunctionUnsafe("ManageProfileOverlay.setProfileName",
+ gaia_name_value, mode_value);
}
void ManageProfileHandler::RequestHasProfileShortcuts(
@@ -515,9 +515,9 @@ void ManageProfileHandler::RequestCreateProfileUpdate(
state == GoogleServiceAuthError::USER_NOT_SIGNED_UP ||
state == GoogleServiceAuthError::ACCOUNT_DELETED ||
state == GoogleServiceAuthError::ACCOUNT_DISABLED);
- web_ui()->CallJavascriptFunction("CreateProfileOverlay.updateSignedInStatus",
- base::StringValue(username),
- base::FundamentalValue(has_error));
+ web_ui()->CallJavascriptFunctionUnsafe(
+ "CreateProfileOverlay.updateSignedInStatus", base::StringValue(username),
+ base::FundamentalValue(has_error));
OnCreateSupervisedUserPrefChange();
}
@@ -526,7 +526,7 @@ void ManageProfileHandler::OnCreateSupervisedUserPrefChange() {
PrefService* prefs = Profile::FromWebUI(web_ui())->GetPrefs();
base::FundamentalValue allowed(
prefs->GetBoolean(prefs::kSupervisedUserCreationAllowed));
- web_ui()->CallJavascriptFunction(
+ web_ui()->CallJavascriptFunctionUnsafe(
"CreateProfileOverlay.updateSupervisedUsersAllowed", allowed);
}
@@ -534,7 +534,7 @@ void ManageProfileHandler::OnHasProfileShortcuts(bool has_shortcuts) {
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
const base::FundamentalValue has_shortcuts_value(has_shortcuts);
- web_ui()->CallJavascriptFunction(
+ web_ui()->CallJavascriptFunctionUnsafe(
"ManageProfileOverlay.receiveHasProfileShortcuts", has_shortcuts_value);
}

Powered by Google App Engine
This is Rietveld 408576698