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

Unified Diff: chrome/browser/ui/views/download/download_item_view.cc

Issue 9968090: Added download error descriptions to tooltips for Mac & Linux. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed GCC compile issue. Created 8 years, 9 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/views/download/download_item_view.cc
diff --git a/chrome/browser/ui/views/download/download_item_view.cc b/chrome/browser/ui/views/download/download_item_view.cc
index d722fa794a371e457f6c2a8bf24dc54e04940a06..856f1d0ca1ee90a69c10da3bdff9b9d4cc33c950 100644
--- a/chrome/browser/ui/views/download/download_item_view.cc
+++ b/chrome/browser/ui/views/download/download_item_view.cc
@@ -257,15 +257,17 @@ void DownloadItemView::OnDownloadUpdated(DownloadItem* download) {
string16 old_tip = tooltip_text_;
content::DownloadInterruptReason reason = download_->GetLastReason();
+ tooltip_text_ = download_->GetFileNameToReportUser().LossyDisplayName();
+
if ((download_->GetState() == DownloadItem::INTERRUPTED) &&
(reason != content::DOWNLOAD_INTERRUPT_REASON_USER_CANCELED)) {
+ string16 new_line = ASCIIToUTF16("\n");
// Use two lines: The file name, and the message.
- tooltip_text_ = download_->GetFileNameToReportUser().LossyDisplayName();
- tooltip_text_ += ASCIIToUTF16("\n");
+ tooltip_text_ += new_line;
// The message is localized.
tooltip_text_ += DownloadItemModel::InterruptReasonMessage(reason);
- } else {
- tooltip_text_ = download_->GetFileNameToReportUser().LossyDisplayName();
+ tooltip_text_ += new_line;
+ tooltip_text_ += model_->GetProgressText();
}
if (IsShowingWarningDialog() && !model_->IsDangerous()) {

Powered by Google App Engine
This is Rietveld 408576698