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

Unified Diff: chrome/browser/chromeos/file_manager/open_util.cc

Issue 561133004: Update the error message in the Files app via Downloads panel. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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/app/chromeos_strings.grdp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/file_manager/open_util.cc
diff --git a/chrome/browser/chromeos/file_manager/open_util.cc b/chrome/browser/chromeos/file_manager/open_util.cc
index dbe75ccf4fd98645c7197c5b0ab98428807413b8..48cb2d06d6578e2a507b0adfeab4aa9028a5befb 100644
--- a/chrome/browser/chromeos/file_manager/open_util.cc
+++ b/chrome/browser/chromeos/file_manager/open_util.cc
@@ -142,8 +142,15 @@ void OnContinueOpenItemCompleted(Profile* profile,
const base::FilePath& file_path,
bool result) {
if (!result) {
- ShowWarningMessageBox(
- profile, file_path, IDS_FILE_BROWSER_ERROR_VIEWING_FILE);
+ int message;
+ if (file_path.Extension() == FILE_PATH_LITERAL(".dmg"))
+ message = IDS_FILE_BROWSER_ERROR_VIEWING_FILE_FOR_DMG;
+ else if (file_path.Extension() == FILE_PATH_LITERAL(".exe") ||
+ file_path.Extension() == FILE_PATH_LITERAL(".msi"))
+ message = IDS_FILE_BROWSER_ERROR_VIEWING_FILE_FOR_EXECUTABLE;
+ else
+ message = IDS_FILE_BROWSER_ERROR_VIEWING_FILE;
+ ShowWarningMessageBox(profile, file_path, message);
}
}
« no previous file with comments | « chrome/app/chromeos_strings.grdp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698