Index: chrome/browser/ui/cocoa/download/download_item_controller.mm |
diff --git a/chrome/browser/ui/cocoa/download/download_item_controller.mm b/chrome/browser/ui/cocoa/download/download_item_controller.mm |
index faac76d7ef690268f108ad453d8df683d24d9334..e96153cf3776e7e0848dd588d1d73c8d4b5e4db3 100644 |
--- a/chrome/browser/ui/cocoa/download/download_item_controller.mm |
+++ b/chrome/browser/ui/cocoa/download/download_item_controller.mm |
@@ -245,9 +245,19 @@ class DownloadShelfContextMenuMac : public DownloadShelfContextMenu { |
} |
- (void)updateToolTip { |
- string16 elidedFilename = ui::ElideFilename( |
+ string16 tooltip_text = ui::ElideFilename( |
[self download]->GetFileNameToReportUser(), *font_, kToolTipMaxWidth); |
- [progressView_ setToolTip:base::SysUTF16ToNSString(elidedFilename)]; |
+ |
+ if ([self download]->GetState() == content::DownloadItem::INTERRUPTED) { |
+ content::DownloadInterruptReason reason = [self download]->GetLastReason(); |
+ DCHECK(reason != 0); |
Nico
2012/04/06 16:14:05
DCHECK_NE(reason, DOWNLOAD_INTERRUPT_REASON_NONE);
|
+ |
+ // Add the status on another line. |
+ tooltip_text += ASCIIToUTF16("\n"); |
+ tooltip_text += DownloadItemModel::InterruptReasonStatusMessage(reason); |
+ } |
+ |
+ [progressView_ setToolTip:base::SysUTF16ToNSString(tooltip_text)]; |
} |
- (void)clearDangerousMode { |