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

Unified Diff: chrome/browser/ui/webui/settings/profile_info_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/profile_info_handler.cc
diff --git a/chrome/browser/ui/webui/settings/profile_info_handler.cc b/chrome/browser/ui/webui/settings/profile_info_handler.cc
index f2b9fabf885a598e8bfc6078fb39cc74f8121772..bac2e490ef53d8d4d38ef2c7398720a7e7dfe45c 100644
--- a/chrome/browser/ui/webui/settings/profile_info_handler.cc
+++ b/chrome/browser/ui/webui/settings/profile_info_handler.cc
@@ -153,9 +153,7 @@ void ProfileInfoHandler::PushProfileStatsCount(
// PushProfileStatsCount gets invoked multiple times as each stat becomes
// available. Therefore, webUIListenerCallback mechanism is used instead of
// the Promise callback approach.
- CallJavascriptFunction("cr.webUIListenerCallback",
- base::Value(kProfileStatsCountReadyEventName),
- base::Value(count));
+ FireWebUIListener(kProfileStatsCountReadyEventName, base::Value(count));
}
#endif
@@ -172,9 +170,7 @@ void ProfileInfoHandler::HandleGetProfileManagesSupervisedUsers(
}
void ProfileInfoHandler::PushProfileInfo() {
- CallJavascriptFunction("cr.webUIListenerCallback",
- base::Value(kProfileInfoChangedEventName),
- *GetAccountNameAndIcon());
+ FireWebUIListener(kProfileInfoChangedEventName, *GetAccountNameAndIcon());
}
void ProfileInfoHandler::PushProfileManagesSupervisedUsersStatus() {
« no previous file with comments | « chrome/browser/ui/webui/settings/people_handler.cc ('k') | chrome/browser/ui/webui/settings/protocol_handlers_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698