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

Unified Diff: chrome/browser/ui/cocoa/download/download_shelf_controller.mm

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_shelf_controller.mm
diff --git a/chrome/browser/ui/cocoa/download/download_shelf_controller.mm b/chrome/browser/ui/cocoa/download/download_shelf_controller.mm
index 838622b3890ae9427c806c84f4aac8b193b7f3a5..d6bb3b07249f24a95d4a45417abb9724c037d2ad 100644
--- a/chrome/browser/ui/cocoa/download/download_shelf_controller.mm
+++ b/chrome/browser/ui/cocoa/download/download_shelf_controller.mm
@@ -292,15 +292,15 @@ const NSSize kHoverCloseButtonDefaultSize = { 18, 18 };
[self layoutItems:NO];
}
-- (void)addDownloadItem:(DownloadItemModel*)model {
+- (void)addDownloadItem:(DownloadItem*)downloadItem {
DCHECK([NSThread isMainThread]);
[self cancelAutoCloseAndRemoveTrackingArea];
// Insert new item at the left.
scoped_nsobject<DownloadItemController> controller(
- [[DownloadItemController alloc] initWithModel:model
- shelf:self
- navigator:navigator_]);
+ [[DownloadItemController alloc] initWithDownload:downloadItem
+ shelf:self
+ navigator:navigator_]);
// Adding at index 0 in NSMutableArrays is O(1).
[downloadItemControllers_ insertObject:controller.get() atIndex:0];
« no previous file with comments | « chrome/browser/ui/cocoa/download/download_shelf_controller.h ('k') | chrome/browser/ui/cocoa/download/download_shelf_mac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698