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

Unified Diff: chrome/browser/ui/webui/policy_ui_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/policy_ui_handler.cc
diff --git a/chrome/browser/ui/webui/policy_ui_handler.cc b/chrome/browser/ui/webui/policy_ui_handler.cc
index b26b7d94d6f967197ca2affa5f732bd71250b891..57dc0fb551fc3b8ddb5e5d71ad829423da51e22d 100644
--- a/chrome/browser/ui/webui/policy_ui_handler.cc
+++ b/chrome/browser/ui/webui/policy_ui_handler.cc
@@ -614,7 +614,7 @@ void PolicyUIHandler::SendPolicyNames() const {
names.Set("extensionPolicyNames", extension_policy_names);
#endif // defined(ENABLE_EXTENSIONS)
- web_ui()->CallJavascriptFunction("policy.Page.setPolicyNames", names);
+ web_ui()->CallJavascriptFunctionUnsafe("policy.Page.setPolicyNames", names);
}
void PolicyUIHandler::SendPolicyValues() const {
@@ -647,7 +647,8 @@ void PolicyUIHandler::SendPolicyValues() const {
}
all_policies.Set("extensionPolicies", extension_values);
#endif
- web_ui()->CallJavascriptFunction("policy.Page.setPolicyValues", all_policies);
+ web_ui()->CallJavascriptFunctionUnsafe("policy.Page.setPolicyValues",
+ all_policies);
}
void PolicyUIHandler::GetPolicyValues(const policy::PolicyMap& map,
@@ -713,7 +714,7 @@ void PolicyUIHandler::SendStatus() const {
if (!user_status->empty())
status.Set("user", user_status.release());
- web_ui()->CallJavascriptFunction("policy.Page.setStatus", status);
+ web_ui()->CallJavascriptFunctionUnsafe("policy.Page.setStatus", status);
}
void PolicyUIHandler::HandleInitialized(const base::ListValue* args) {
@@ -742,7 +743,7 @@ void PolicyUIHandler::HandleReloadPolicies(const base::ListValue* args) {
}
void PolicyUIHandler::OnRefreshPoliciesDone() const {
- web_ui()->CallJavascriptFunction("policy.Page.reloadPoliciesDone");
+ web_ui()->CallJavascriptFunctionUnsafe("policy.Page.reloadPoliciesDone");
}
policy::PolicyService* PolicyUIHandler::GetPolicyService() const {

Powered by Google App Engine
This is Rietveld 408576698