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

Unified Diff: chrome/browser/ui/webui/downloads_dom_handler.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/ui/webui/downloads_dom_handler.cc
diff --git a/chrome/browser/ui/webui/downloads_dom_handler.cc b/chrome/browser/ui/webui/downloads_dom_handler.cc
index f707ce2a1042a7351bbbdc142548aa98b4515753..ddce581f3aaebcd24f4b4c1967e6c471c41fb7fc 100644
--- a/chrome/browser/ui/webui/downloads_dom_handler.cc
+++ b/chrome/browser/ui/webui/downloads_dom_handler.cc
@@ -57,7 +57,7 @@ class DownloadItemSorter : public std::binary_function<DownloadItem*,
bool> {
public:
bool operator()(const DownloadItem* lhs, const DownloadItem* rhs) {
- return lhs->start_time() > rhs->start_time();
+ return lhs->GetStartTime() > rhs->GetStartTime();
}
};
@@ -202,7 +202,7 @@ void DownloadsDOMHandler::OnDownloadUpdated(DownloadItem* download) {
if (it == download_items_.end())
return;
- if (download->state() == DownloadItem::REMOVING) {
+ if (download->GetState() == DownloadItem::REMOVING) {
(*it)->RemoveObserver(this);
*it = NULL;
// A later ModelChanged() notification will change the WebUI's
@@ -252,7 +252,7 @@ void DownloadsDOMHandler::ModelChanged() {
// fixed.
// We should never see anything that isn't already in the history.
CHECK(*it);
- CHECK_NE(DownloadItem::kUninitializedHandle, (*it)->db_handle());
+ CHECK_NE(DownloadItem::kUninitializedHandle, (*it)->GetDbHandle());
(*it)->AddObserver(this);
}
@@ -329,7 +329,7 @@ void DownloadsDOMHandler::HandleRemove(const ListValue* args) {
DownloadItem* file = GetDownloadByValue(args);
if (file) {
// TODO(rdsmith): Change to DCHECK when http://crbug.com/85408 is fixed.
- CHECK_NE(DownloadItem::kUninitializedHandle, file->db_handle());
+ CHECK_NE(DownloadItem::kUninitializedHandle, file->GetDbHandle());
file->Remove();
}
}

Powered by Google App Engine
This is Rietveld 408576698