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

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: CamelCase 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
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 e42127d09eb2a59bf5225b5936910eeb94a86bf3..3d5f68e15ca8e3db2274e8bbf71591fd89816037 100644
--- a/content/browser/download/drag_download_file.cc
+++ b/content/browser/download/drag_download_file.cc
@@ -175,7 +175,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;
@@ -185,7 +185,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()) {

Powered by Google App Engine
This is Rietveld 408576698