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

Unified Diff: chrome/browser/ui/webui/browsing_history_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/browsing_history_handler.cc
diff --git a/chrome/browser/ui/webui/browsing_history_handler.cc b/chrome/browser/ui/webui/browsing_history_handler.cc
index 8a8b870e1b21afe1cfcfb09606801d6a28339e3a..e2aa3bbabd0a38e848744c34116d7be00700f0e8 100644
--- a/chrome/browser/ui/webui/browsing_history_handler.cc
+++ b/chrome/browser/ui/webui/browsing_history_handler.cc
@@ -495,7 +495,7 @@ void BrowsingHistoryHandler::HandleRemoveVisits(const base::ListValue* args) {
if (delete_task_tracker_.HasTrackedTasks() ||
has_pending_delete_request_ ||
!profile->GetPrefs()->GetBoolean(prefs::kAllowDeletingBrowserHistory)) {
- web_ui()->CallJavascriptFunction("deleteFailed");
+ web_ui()->CallJavascriptFunctionUnsafe("deleteFailed");
return;
}
@@ -708,11 +708,10 @@ void BrowsingHistoryHandler::ReturnResultsToFrontEnd() {
results_value.Append(value.release());
}
- web_ui()->CallJavascriptFunction(
- "historyResult", results_info_value_, results_value);
- web_ui()->CallJavascriptFunction(
- "showNotification",
- base::FundamentalValue(has_synced_results_),
+ web_ui()->CallJavascriptFunctionUnsafe("historyResult", results_info_value_,
+ results_value);
+ web_ui()->CallJavascriptFunctionUnsafe(
+ "showNotification", base::FundamentalValue(has_synced_results_),
base::FundamentalValue(has_other_forms_of_browsing_history_));
results_info_value_.Clear();
query_results_.clear();
@@ -862,9 +861,8 @@ void BrowsingHistoryHandler::OtherFormsOfBrowsingHistoryQueryComplete(
RecordMetricsForNoticeAboutOtherFormsOfBrowsingHistory(
has_other_forms_of_browsing_history_);
- web_ui()->CallJavascriptFunction(
- "showNotification",
- base::FundamentalValue(has_synced_results_),
+ web_ui()->CallJavascriptFunctionUnsafe(
+ "showNotification", base::FundamentalValue(has_synced_results_),
base::FundamentalValue(has_other_forms_of_browsing_history_));
}
@@ -874,7 +872,7 @@ void BrowsingHistoryHandler::RemoveComplete() {
// Notify the page that the deletion request is complete, but only if a web
// history delete request is not still pending.
if (!has_pending_delete_request_)
- web_ui()->CallJavascriptFunction("deleteComplete");
+ web_ui()->CallJavascriptFunctionUnsafe("deleteComplete");
}
void BrowsingHistoryHandler::RemoveWebHistoryComplete(bool success) {
@@ -949,5 +947,5 @@ void BrowsingHistoryHandler::OnURLsDeleted(
const history::URLRows& deleted_rows,
const std::set<GURL>& favicon_urls) {
if (all_history || DeletionsDiffer(deleted_rows, urls_to_be_deleted_))
- web_ui()->CallJavascriptFunction("historyDeleted");
+ web_ui()->CallJavascriptFunctionUnsafe("historyDeleted");
}
« no previous file with comments | « chrome/browser/ui/webui/app_launcher_login_handler.cc ('k') | chrome/browser/ui/webui/certificate_viewer_webui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698