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

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

Issue 8503018: Split DownloadItem into an ABC, an Impl, and a Mock. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: merge Created 9 years, 1 month 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 | « content/browser/download/download_manager_impl.cc ('k') | content/browser/download/mock_download_item.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/download/drag_download_file.cc
diff --git a/content/browser/download/drag_download_file.cc b/content/browser/download/drag_download_file.cc
index 56898d59f3bf1d82747778f7da81e9117b604419..cf245e5a50a660180d9557cc2c983272b9035f96 100644
--- a/content/browser/download/drag_download_file.cc
+++ b/content/browser/download/drag_download_file.cc
@@ -174,7 +174,7 @@ void DragDownloadFile::ModelChanged() {
download_manager_->GetTemporaryDownloads(file_path_.DirName(), &downloads);
for (std::vector<DownloadItem*>::const_iterator i = downloads.begin();
i != downloads.end(); ++i) {
- if ((*i)->original_url() == url_) {
+ if ((*i)->GetOriginalUrl() == url_) {
download_item_ = *i;
download_item_->AddObserver(this);
break;
@@ -184,7 +184,8 @@ void DragDownloadFile::ModelChanged() {
void DragDownloadFile::OnDownloadUpdated(DownloadItem* download) {
AssertCurrentlyOnUIThread();
- if (download->IsCancelled() || download->state() == DownloadItem::REMOVING) {
+ if (download->IsCancelled() ||
+ (download->GetState() == DownloadItem::REMOVING)) {
RemoveObservers();
DownloadCompleted(false);
} else if (download->IsComplete()) {
« no previous file with comments | « content/browser/download/download_manager_impl.cc ('k') | content/browser/download/mock_download_item.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698