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

Unified Diff: chrome/browser/ui/cocoa/download/download_item_mac.h

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/cocoa/download/download_item_mac.h
diff --git a/chrome/browser/ui/cocoa/download/download_item_mac.h b/chrome/browser/ui/cocoa/download/download_item_mac.h
index b82c16d26c8cb8ec4db9cd365b85a127d4d36c90..dbbf90ee8c22d59200ac3117d76b0a20d27552b7 100644
--- a/chrome/browser/ui/cocoa/download/download_item_mac.h
+++ b/chrome/browser/ui/cocoa/download/download_item_mac.h
@@ -9,13 +9,13 @@
#include "base/memory/scoped_nsobject.h"
#include "base/memory/scoped_ptr.h"
+#include "chrome/browser/download/download_item_model.h"
#include "chrome/browser/icon_manager.h"
#include "chrome/common/cancelable_task_tracker.h"
#include "content/public/browser/download_item.h"
#include "content/public/browser/download_manager.h"
@class DownloadItemController;
-class DownloadItemModel;
namespace gfx{
class Image;
@@ -27,8 +27,7 @@ class Image;
class DownloadItemMac : content::DownloadItem::Observer {
public:
- // DownloadItemMac takes ownership of |download_model|.
- DownloadItemMac(DownloadItemModel* download_model,
+ DownloadItemMac(content::DownloadItem* download,
DownloadItemController* controller);
// Destructor.
@@ -39,7 +38,7 @@ class DownloadItemMac : content::DownloadItem::Observer {
virtual void OnDownloadOpened(content::DownloadItem* download) OVERRIDE;
virtual void OnDownloadDestroyed(content::DownloadItem* download) OVERRIDE;
- DownloadItemModel* download_model() { return download_model_.get(); }
+ DownloadItemModel* download_model() { return &download_model_; }
// Asynchronous icon loading support.
void LoadIcon();
@@ -49,7 +48,7 @@ class DownloadItemMac : content::DownloadItem::Observer {
void OnExtractIconComplete(gfx::Image* icon_bitmap);
// The download item model we represent.
- scoped_ptr<DownloadItemModel> download_model_;
+ DownloadItemModel download_model_;
// The objective-c controller object.
DownloadItemController* item_controller_; // weak, owns us.
« no previous file with comments | « chrome/browser/ui/cocoa/download/download_item_controller.mm ('k') | chrome/browser/ui/cocoa/download/download_item_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698