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

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: 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: 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 aa0fe0ba01689bded2e9a251ec89759a2463ebdd..b3812f703ff638f4c9ff508cb05a6940e2dc3ad9 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();

Powered by Google App Engine
This is Rietveld 408576698