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

Unified Diff: chrome/browser/ui/gtk/download/download_shelf_gtk.cc

Issue 11673004: No need to pass DownloadItemModel ownership. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: DownloadShelfContextMenu class cleanup and require GetMenuModel() to return non-NULL Created 7 years, 11 months 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/gtk/download/download_shelf_gtk.cc
diff --git a/chrome/browser/ui/gtk/download/download_shelf_gtk.cc b/chrome/browser/ui/gtk/download/download_shelf_gtk.cc
index 18c7563cdbdfee450b04a3e711bfb7e8de7c541f..7ce574c02c7f4a5b9426cadaf97da7d29d0859d7 100644
--- a/chrome/browser/ui/gtk/download/download_shelf_gtk.cc
+++ b/chrome/browser/ui/gtk/download/download_shelf_gtk.cc
@@ -179,8 +179,8 @@ content::PageNavigator* DownloadShelfGtk::GetNavigator() {
return browser_;
}
-void DownloadShelfGtk::DoAddDownload(DownloadItemModel* download_model) {
- download_items_.push_back(new DownloadItemGtk(this, download_model));
+void DownloadShelfGtk::DoAddDownload(DownloadItem* download) {
+ download_items_.push_back(new DownloadItemGtk(this, download));
}
bool DownloadShelfGtk::IsShowing() const {
@@ -205,7 +205,7 @@ void DownloadShelfGtk::DoClose() {
browser_->UpdateDownloadShelfVisibility(false);
int num_in_progress = 0;
for (size_t i = 0; i < download_items_.size(); ++i) {
- if (download_items_[i]->get_download()->IsInProgress())
+ if (download_items_[i]->download()->IsInProgress())
++num_in_progress;
}
download_util::RecordShelfClose(
@@ -225,7 +225,7 @@ void DownloadShelfGtk::Closed() {
// When the close animation is complete, remove all completed downloads.
size_t i = 0;
while (i < download_items_.size()) {
- DownloadItem* download = download_items_[i]->get_download();
+ DownloadItem* download = download_items_[i]->download();
bool is_transfer_done = download->IsComplete() ||
download->IsCancelled() ||
download->IsInterrupted();
@@ -316,7 +316,7 @@ void DownloadShelfGtk::OnButtonClick(GtkWidget* button) {
void DownloadShelfGtk::AutoCloseIfPossible() {
for (std::vector<DownloadItemGtk*>::iterator iter = download_items_.begin();
iter != download_items_.end(); ++iter) {
- if (!(*iter)->get_download()->GetOpened())
+ if (!(*iter)->download()->GetOpened())
return;
}
« no previous file with comments | « chrome/browser/ui/gtk/download/download_shelf_gtk.h ('k') | chrome/browser/ui/views/download/download_item_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698