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

Unified Diff: chrome/browser/ui/webui/settings/site_settings_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
« no previous file with comments | « chrome/browser/ui/webui/settings/settings_startup_pages_handler.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/settings/site_settings_handler.cc
diff --git a/chrome/browser/ui/webui/settings/site_settings_handler.cc b/chrome/browser/ui/webui/settings/site_settings_handler.cc
index a88c2d5681825ae26f669e95de28591542ca46de..59a527eb8b23667fa662efe49ab04a54fdd9f66e 100644
--- a/chrome/browser/ui/webui/settings/site_settings_handler.cc
+++ b/chrome/browser/ui/webui/settings/site_settings_handler.cc
@@ -647,9 +647,7 @@ void SiteSettingsHandler::SendIncognitoStatus(
bool incognito_enabled = profile_->HasOffTheRecordProfile() &&
!(was_destroyed && profile == profile_->GetOffTheRecordProfile());
- CallJavascriptFunction("cr.webUIListenerCallback",
- base::Value("onIncognitoStatusChanged"),
- base::Value(incognito_enabled));
+ FireWebUIListener("onIncognitoStatusChanged", base::Value(incognito_enabled));
}
void SiteSettingsHandler::HandleFetchZoomLevels(const base::ListValue* args) {
@@ -733,9 +731,7 @@ void SiteSettingsHandler::SendZoomLevels() {
zoom_levels_exceptions.Append(std::move(exception));
}
- CallJavascriptFunction("cr.webUIListenerCallback",
- base::Value("onZoomLevelsChanged"),
- zoom_levels_exceptions);
+ FireWebUIListener("onZoomLevelsChanged", zoom_levels_exceptions);
}
void SiteSettingsHandler::HandleRemoveZoomLevel(const base::ListValue* args) {
« no previous file with comments | « chrome/browser/ui/webui/settings/settings_startup_pages_handler.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698