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

Unified Diff: chrome/browser/ui/webui/settings/protocol_handlers_handler.cc

Issue 2886083002: MD Settings: Use FireWebUIListener() helper wherever possible. (Closed)
Patch Set: Fixed typo Created 3 years, 7 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/settings/protocol_handlers_handler.cc
diff --git a/chrome/browser/ui/webui/settings/protocol_handlers_handler.cc b/chrome/browser/ui/webui/settings/protocol_handlers_handler.cc
index c851eb51e1356e54c40dd006b685bcc6d7396e9a..701fdad9632a2f67618c2b69b35667b803f1ef10 100644
--- a/chrome/browser/ui/webui/settings/protocol_handlers_handler.cc
+++ b/chrome/browser/ui/webui/settings/protocol_handlers_handler.cc
@@ -129,11 +129,8 @@ void ProtocolHandlersHandler::UpdateHandlerList() {
std::unique_ptr<base::ListValue> ignored_handlers(new base::ListValue());
GetIgnoredHandlers(ignored_handlers.get());
- CallJavascriptFunction("cr.webUIListenerCallback",
- base::Value("setProtocolHandlers"), handlers);
- CallJavascriptFunction("cr.webUIListenerCallback",
- base::Value("setIgnoredProtocolHandlers"),
- *ignored_handlers);
+ FireWebUIListener("setProtocolHandlers", handlers);
+ FireWebUIListener("setIgnoredProtocolHandlers", *ignored_handlers);
}
void ProtocolHandlersHandler::HandleObserveProtocolHandlers(
@@ -150,9 +147,8 @@ void ProtocolHandlersHandler::HandleObserveProtocolHandlersEnabledState(
}
void ProtocolHandlersHandler::SendHandlersEnabledValue() {
- CallJavascriptFunction("cr.webUIListenerCallback",
- base::Value("setHandlersEnabled"),
- base::Value(GetProtocolHandlerRegistry()->enabled()));
+ FireWebUIListener("setHandlersEnabled",
+ base::Value(GetProtocolHandlerRegistry()->enabled()));
}
void ProtocolHandlersHandler::HandleRemoveHandler(const base::ListValue* args) {
« no previous file with comments | « chrome/browser/ui/webui/settings/profile_info_handler.cc ('k') | chrome/browser/ui/webui/settings/safe_browsing_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698