summaryrefslogtreecommitdiffstats
path: root/chrome/browser/download/download_shelf.cc
diff options
context:
space:
mode:
authorcaio.de.oliveira.filho@intel.com <caio.de.oliveira.filho@intel.com@0039d316-1c4b-4281-b951-d872f2087c98>2013-05-24 23:41:11 +0000
committercaio.de.oliveira.filho@intel.com <caio.de.oliveira.filho@intel.com@0039d316-1c4b-4281-b951-d872f2087c98>2013-05-24 23:41:11 +0000
commit9f259e1f090de6ae995ec86eb6aff1660b11f4ec (patch)
tree5d5cc36e04148984f858ac547601268fd8c60b94 /chrome/browser/download/download_shelf.cc
parenta3230f43c367ed432c41b0ae95e6d3e9f08fd281 (diff)
downloadchromium_src-9f259e1f090de6ae995ec86eb6aff1660b11f4ec.zip
chromium_src-9f259e1f090de6ae995ec86eb6aff1660b11f4ec.tar.gz
chromium_src-9f259e1f090de6ae995ec86eb6aff1660b11f4ec.tar.bz2
Use DownloadItem::GetState() in c/b/{download,extensions}
Stop using DownloadItem::Is*() functions that have an equivalent state exposed via GetState(). Rationale is that there shouldn't be multiple ways of getting the same state information. To make review easier, this patch covers chrome/browser/download and chrome/browser/extensions. The remaining cases and changing the DownloadItem to remove the Is*() functions will come later. BUG=241141 TEST=browser_tests and unit_tests both with *Download*:*SavePage* filters Review URL: https://chromiumcodereview.appspot.com/15880002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@202229 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/download/download_shelf.cc')
-rw-r--r--chrome/browser/download/download_shelf.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/chrome/browser/download/download_shelf.cc b/chrome/browser/download/download_shelf.cc
index c69abed..c1c3b7f9 100644
--- a/chrome/browser/download/download_shelf.cc
+++ b/chrome/browser/download/download_shelf.cc
@@ -101,7 +101,7 @@ content::DownloadManager* DownloadShelf::GetDownloadManager() {
}
void DownloadShelf::ShowDownload(DownloadItem* download) {
- if (download->IsComplete() &&
+ if (download->GetState() == DownloadItem::COMPLETE &&
DownloadItemModel(download).ShouldRemoveFromShelfWhenComplete()) {
return;
}