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

Unified Diff: chrome/browser/ui/webui/md_downloads/downloads_list_tracker.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/md_downloads/downloads_list_tracker.cc
diff --git a/chrome/browser/ui/webui/md_downloads/downloads_list_tracker.cc b/chrome/browser/ui/webui/md_downloads/downloads_list_tracker.cc
index 5ba1d0a11af334f2f36216ad23ea09e11123bf66..aa7d0dd4cf9c8ba4f0bef4321a446c719777d41f 100644
--- a/chrome/browser/ui/webui/md_downloads/downloads_list_tracker.cc
+++ b/chrome/browser/ui/webui/md_downloads/downloads_list_tracker.cc
@@ -94,7 +94,7 @@ DownloadsListTracker::~DownloadsListTracker() {}
void DownloadsListTracker::Reset() {
if (sending_updates_)
- web_ui_->CallJavascriptFunction("downloads.Manager.clearAll");
+ web_ui_->CallJavascriptFunctionUnsafe("downloads.Manager.clearAll");
sent_to_page_ = 0u;
}
@@ -127,10 +127,9 @@ void DownloadsListTracker::StartAndSendChunk() {
++it;
}
- web_ui_->CallJavascriptFunction(
+ web_ui_->CallJavascriptFunctionUnsafe(
"downloads.Manager.insertItems",
- base::FundamentalValue(static_cast<int>(sent_to_page_)),
- list);
+ base::FundamentalValue(static_cast<int>(sent_to_page_)), list);
sent_to_page_ += list.GetSize();
}
@@ -389,10 +388,9 @@ void DownloadsListTracker::InsertItem(const SortedSet::iterator& insert) {
base::ListValue list;
list.Append(CreateDownloadItemValue(*insert));
- web_ui_->CallJavascriptFunction(
+ web_ui_->CallJavascriptFunctionUnsafe(
"downloads.Manager.insertItems",
- base::FundamentalValue(static_cast<int>(index)),
- list);
+ base::FundamentalValue(static_cast<int>(index)), list);
sent_to_page_++;
}
@@ -401,7 +399,7 @@ void DownloadsListTracker::UpdateItem(const SortedSet::iterator& update) {
if (!sending_updates_ || GetIndex(update) >= sent_to_page_)
return;
- web_ui_->CallJavascriptFunction(
+ web_ui_->CallJavascriptFunctionUnsafe(
"downloads.Manager.updateItem",
base::FundamentalValue(static_cast<int>(GetIndex(update))),
*CreateDownloadItemValue(*update));
@@ -416,7 +414,7 @@ void DownloadsListTracker::RemoveItem(const SortedSet::iterator& remove) {
if (sending_updates_) {
size_t index = GetIndex(remove);
if (index < sent_to_page_) {
- web_ui_->CallJavascriptFunction(
+ web_ui_->CallJavascriptFunctionUnsafe(
"downloads.Manager.removeItem",
base::FundamentalValue(static_cast<int>(index)));
sent_to_page_--;
« no previous file with comments | « chrome/browser/ui/webui/local_state/local_state_ui.cc ('k') | chrome/browser/ui/webui/media/webrtc_logs_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698