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

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

Issue 9968090: Added download error descriptions to tooltips for Mac & Linux. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Changed tooltip to using the short error status string. Created 8 years, 8 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
« no previous file with comments | « no previous file | chrome/browser/ui/cocoa/download/download_item_mac.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 {
« no previous file with comments | « no previous file | chrome/browser/ui/cocoa/download/download_item_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698