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

Unified Diff: chrome/browser/automation/automation_provider_observers.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
Index: chrome/browser/automation/automation_provider_observers.cc
diff --git a/chrome/browser/automation/automation_provider_observers.cc b/chrome/browser/automation/automation_provider_observers.cc
index e9200cf5693eb8d749cbadc39f9893c29f49a839..26125f7859e9f6aeb71af499c2a694a7b1a0e789 100644
--- a/chrome/browser/automation/automation_provider_observers.cc
+++ b/chrome/browser/automation/automation_provider_observers.cc
@@ -1508,7 +1508,7 @@ void AutomationProviderDownloadUpdatedObserver::OnDownloadUpdated(
DownloadItem* download) {
// If this observer is watching for open, only send the reply if the download
// has been auto-opened.
- if (wait_for_open_ && !download->auto_opened())
+ if (wait_for_open_ && !download->GetAutoOpened())
return;
download->RemoveObserver(this);
@@ -1588,8 +1588,8 @@ void AllDownloadsCompleteObserver::ModelChanged() {
download_manager_->GetAllDownloads(FilePath(), &downloads);
for (std::vector<DownloadItem*>::iterator it = downloads.begin();
it != downloads.end(); ++it) {
- if ((*it)->state() == DownloadItem::IN_PROGRESS &&
- pre_download_ids_.find((*it)->id()) == pre_download_ids_.end()) {
+ if ((*it)->GetState() == DownloadItem::IN_PROGRESS &&
+ pre_download_ids_.find((*it)->GetId()) == pre_download_ids_.end()) {
(*it)->AddObserver(this);
pending_downloads_.insert(*it);
}
@@ -1600,7 +1600,7 @@ void AllDownloadsCompleteObserver::ModelChanged() {
void AllDownloadsCompleteObserver::OnDownloadUpdated(DownloadItem* download) {
// If the current download's status has changed to a final state (not state
// "in progress"), remove it from the pending list.
- if (download->state() != DownloadItem::IN_PROGRESS) {
+ if (download->GetState() != DownloadItem::IN_PROGRESS) {
download->RemoveObserver(this);
pending_downloads_.erase(download);
ReplyIfNecessary();
« no previous file with comments | « chrome/browser/automation/automation_provider.cc ('k') | chrome/browser/automation/testing_automation_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698