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

Unified Diff: chrome/browser/download/drag_download_file.cc

Issue 3071005: Download code cleanup patch of death: (Closed)
Patch Set: inline the dtor Created 10 years, 5 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/download/drag_download_file.h ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/download/drag_download_file.cc
diff --git a/chrome/browser/download/drag_download_file.cc b/chrome/browser/download/drag_download_file.cc
index 4b2b37030a81fe7966e702cc95f7195f35587c08..ad99b758fd071d78c1c25ae876e8ca7e6741e95f 100644
--- a/chrome/browser/download/drag_download_file.cc
+++ b/chrome/browser/download/drag_download_file.cc
@@ -151,17 +151,13 @@ void DragDownloadFile::DownloadCompleted(bool is_successful) {
void DragDownloadFile::ModelChanged() {
AssertCurrentlyOnUIThread();
- download_manager_->GetTemporaryDownloads(this, file_path_.DirName());
-}
-
-void DragDownloadFile::SetDownloads(std::vector<DownloadItem*>& downloads) {
- AssertCurrentlyOnUIThread();
-
- std::vector<DownloadItem*>::const_iterator it = downloads.begin();
- for (; it != downloads.end(); ++it) {
- if (!download_item_observer_added_ && (*it)->url() == url_) {
+ std::vector<DownloadItem*> downloads;
+ download_manager_->GetTemporaryDownloads(file_path_.DirName(), &downloads);
+ for (std::vector<DownloadItem*>::const_iterator i = downloads.begin();
+ i != downloads.end(); ++i) {
+ if (!download_item_observer_added_ && (*i)->url() == url_) {
download_item_observer_added_ = true;
- (*it)->AddObserver(this);
+ (*i)->AddObserver(this);
}
}
}
« no previous file with comments | « chrome/browser/download/drag_download_file.h ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698