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

Unified Diff: chrome/browser/ui/views/download/download_item_view.cc

Issue 11441006: Convert IconManager to use new CancelableTaskTracker (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase and fix mac compiling Created 8 years 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/views/download/download_item_view.h ('k') | chrome/browser/ui/webui/fileicon_source.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/download/download_item_view.cc
diff --git a/chrome/browser/ui/views/download/download_item_view.cc b/chrome/browser/ui/views/download/download_item_view.cc
index 2fe55db43f513eac827f87c172fc47b3404bc566..6325ef9848dbf7d70d51145a660f9f776ce59e90 100644
--- a/chrome/browser/ui/views/download/download_item_view.cc
+++ b/chrome/browser/ui/views/download/download_item_view.cc
@@ -217,7 +217,6 @@ DownloadItemView::DownloadItemView(DownloadItem* download,
}
DownloadItemView::~DownloadItemView() {
- icon_consumer_.CancelAllRequests();
StopDownloadProgress();
download_->RemoveObserver(this);
}
@@ -243,8 +242,7 @@ void DownloadItemView::StopDownloadProgress() {
progress_timer_.Stop();
}
-void DownloadItemView::OnExtractIconComplete(IconManager::Handle handle,
- gfx::Image* icon_bitmap) {
+void DownloadItemView::OnExtractIconComplete(gfx::Image* icon_bitmap) {
if (icon_bitmap)
parent()->SchedulePaint();
}
@@ -856,9 +854,10 @@ void DownloadItemView::LoadIcon() {
IconManager* im = g_browser_process->icon_manager();
last_download_item_path_ = download_->GetUserVerifiedFilePath();
im->LoadIcon(last_download_item_path_,
- IconLoader::SMALL, &icon_consumer_,
+ IconLoader::SMALL,
base::Bind(&DownloadItemView::OnExtractIconComplete,
- base::Unretained(this)));
+ base::Unretained(this)),
+ &cancelable_task_tracker_);
}
void DownloadItemView::LoadIconIfItemPathChanged() {
« no previous file with comments | « chrome/browser/ui/views/download/download_item_view.h ('k') | chrome/browser/ui/webui/fileicon_source.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698