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

Side by Side Diff: chrome/browser/download/download_item_model.cc

Issue 8872009: Revert 113568 - extensions: remove install/uninstall terminology (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/download/download_item_model.h" 5 #include "chrome/browser/download/download_item_model.h"
6 6
7 #include "base/i18n/number_formatting.h" 7 #include "base/i18n/number_formatting.h"
8 #include "base/i18n/rtl.h" 8 #include "base/i18n/rtl.h"
9 #include "base/string16.h" 9 #include "base/string16.h"
10 #include "base/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
11 #include "chrome/browser/download/chrome_download_manager_delegate.h" 11 #include "chrome/browser/download/chrome_download_manager_delegate.h"
12 #include "chrome/common/time_format.h" 12 #include "chrome/common/time_format.h"
13 #include "content/browser/download/download_item.h" 13 #include "content/browser/download/download_item.h"
14 #include "content/browser/download/save_package.h" 14 #include "content/browser/download/save_package.h"
15 #include "grit/chromium_strings.h"
16 #include "grit/generated_resources.h" 15 #include "grit/generated_resources.h"
17 #include "ui/base/l10n/l10n_util.h" 16 #include "ui/base/l10n/l10n_util.h"
18 #include "ui/base/text/bytes_formatting.h" 17 #include "ui/base/text/bytes_formatting.h"
19 18
20 using base::TimeDelta; 19 using base::TimeDelta;
21 20
22 // ----------------------------------------------------------------------------- 21 // -----------------------------------------------------------------------------
23 // DownloadItemModel 22 // DownloadItemModel
24 23
25 DownloadItemModel::DownloadItemModel(DownloadItem* download) 24 DownloadItemModel::DownloadItemModel(DownloadItem* download)
(...skipping 30 matching lines...) Expand all
56 } 55 }
57 56
58 string16 status_text; 57 string16 status_text;
59 switch (download_->GetState()) { 58 switch (download_->GetState()) {
60 case DownloadItem::IN_PROGRESS: 59 case DownloadItem::IN_PROGRESS:
61 if (ChromeDownloadManagerDelegate::IsExtensionDownload(download_) && 60 if (ChromeDownloadManagerDelegate::IsExtensionDownload(download_) &&
62 download_->AllDataSaved() && 61 download_->AllDataSaved() &&
63 download_->GetState() == DownloadItem::IN_PROGRESS) { 62 download_->GetState() == DownloadItem::IN_PROGRESS) {
64 // The download is a CRX (app, extension, theme, ...) and it is 63 // The download is a CRX (app, extension, theme, ...) and it is
65 // being unpacked and validated. 64 // being unpacked and validated.
66 status_text = l10n_util::GetStringFUTF16( 65 status_text = l10n_util::GetStringUTF16(
67 IDS_DOWNLOAD_STATUS_CRX_INSTALL_RUNNING, 66 IDS_DOWNLOAD_STATUS_CRX_INSTALL_RUNNING);
68 l10n_util::GetStringUTF16(IDS_SHORT_PRODUCT_NAME));
69 } else if (download_->GetOpenWhenComplete()) { 67 } else if (download_->GetOpenWhenComplete()) {
70 if (simple_time.empty()) { 68 if (simple_time.empty()) {
71 status_text = 69 status_text =
72 l10n_util::GetStringUTF16(IDS_DOWNLOAD_STATUS_OPEN_WHEN_COMPLETE); 70 l10n_util::GetStringUTF16(IDS_DOWNLOAD_STATUS_OPEN_WHEN_COMPLETE);
73 } else { 71 } else {
74 status_text = l10n_util::GetStringFUTF16(IDS_DOWNLOAD_STATUS_OPEN_IN, 72 status_text = l10n_util::GetStringFUTF16(IDS_DOWNLOAD_STATUS_OPEN_IN,
75 simple_time); 73 simple_time);
76 } 74 }
77 } else { 75 } else {
78 if (simple_time.empty()) { 76 if (simple_time.empty()) {
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 IDS_SAVE_PAGE_STATUS_INTERRUPTED, 146 IDS_SAVE_PAGE_STATUS_INTERRUPTED,
149 base::FormatNumber(size), 147 base::FormatNumber(size),
150 base::FormatNumber(total_size)); 148 base::FormatNumber(total_size));
151 break; 149 break;
152 default: 150 default:
153 NOTREACHED(); 151 NOTREACHED();
154 } 152 }
155 153
156 return status_text; 154 return status_text;
157 } 155 }
OLDNEW
« no previous file with comments | « chrome/app/generated_resources.grd ('k') | chrome/browser/extensions/extension_context_menu_model.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698