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

Unified Diff: chrome/browser/download/download_item_model.cc

Issue 10452009: Improve the UI for disabling off-store extension install. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: addressed comments, fixed tests Created 8 years, 7 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 | « chrome/browser/download/download_history.cc ('k') | chrome/browser/download/download_shelf_context_menu.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/download/download_item_model.cc
diff --git a/chrome/browser/download/download_item_model.cc b/chrome/browser/download/download_item_model.cc
index 2dc23262222f6c3c5004a69b9a112b892d3b2509..775fa0513febb6069185c5af50ad7e624d3dde24 100644
--- a/chrome/browser/download/download_item_model.cc
+++ b/chrome/browser/download/download_item_model.cc
@@ -9,7 +9,8 @@
#include "base/string16.h"
#include "base/sys_string_conversions.h"
#include "base/utf_string_conversions.h"
-#include "chrome/browser/download/chrome_download_manager_delegate.h"
+#include "base/time.h"
+#include "chrome/browser/download/download_crx_util.h"
#include "chrome/common/time_format.h"
#include "content/public/browser/download_danger_type.h"
#include "content/public/browser/download_interrupt_reasons.h"
@@ -85,7 +86,7 @@ string16 DownloadItemModel::GetStatusText() {
break;
}
#endif
- if (ChromeDownloadManagerDelegate::IsExtensionDownload(download_) &&
+ if (download_crx_util::IsExtensionDownload(*download_) &&
download_->AllDataSaved() &&
download_->GetState() == DownloadItem::IN_PROGRESS) {
// The download is a CRX (app, extension, theme, ...) and it is
@@ -183,7 +184,7 @@ string16 DownloadItemModel::GetWarningText(const gfx::Font& font,
return l10n_util::GetStringUTF16(IDS_PROMPT_MALICIOUS_DOWNLOAD_URL);
case content::DOWNLOAD_DANGER_TYPE_DANGEROUS_FILE:
- if (ChromeDownloadManagerDelegate::IsExtensionDownload(download_)) {
+ if (download_crx_util::IsExtensionDownload(*download_)) {
return l10n_util::GetStringUTF16(
IDS_PROMPT_DANGEROUS_DOWNLOAD_EXTENSION);
} else {
@@ -218,7 +219,7 @@ string16 DownloadItemModel::GetWarningConfirmButtonText() {
DCHECK(IsDangerous());
if (download_->GetDangerType() ==
content::DOWNLOAD_DANGER_TYPE_DANGEROUS_FILE &&
- ChromeDownloadManagerDelegate::IsExtensionDownload(download_)) {
+ download_crx_util::IsExtensionDownload(*download_)) {
return l10n_util::GetStringUTF16(IDS_CONTINUE_EXTENSION_DOWNLOAD);
} else {
return l10n_util::GetStringUTF16(IDS_CONFIRM_DOWNLOAD);
« no previous file with comments | « chrome/browser/download/download_history.cc ('k') | chrome/browser/download/download_shelf_context_menu.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698