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

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

Issue 9854011: Normalize download file name on chromeos (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: forgot tu upload patchset with added comment 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/download/chrome_download_manager_delegate.cc
diff --git a/chrome/browser/download/chrome_download_manager_delegate.cc b/chrome/browser/download/chrome_download_manager_delegate.cc
index 05b1382de50000d073ca0975672446e90ddfb55d..ca300948a7690ed2fabd19467afac50d9bab2983 100644
--- a/chrome/browser/download/chrome_download_manager_delegate.cc
+++ b/chrome/browser/download/chrome_download_manager_delegate.cc
@@ -428,6 +428,14 @@ void ChromeDownloadManagerDelegate::CheckVisitedReferrerBeforeDone(
download_util::GenerateFileNameFromRequest(*download,
&generated_name);
+#if defined(OS_CHROMEOS)
+ // When doing file manager operations on ChromeOS, the file paths get
+ // normalized in WebKit layer, so let's ensure downloaded files have
+ // normalized names. Otherwise, we won't be able to handle files with NFD
+ // utf8 encoded characters in name.
+ download_util::NormalizeFileNameOnChromeOS(&generated_name);
asanka 2012/03/26 20:01:08 why not do this in download_util::GenerateFileName
tbarzic 2012/03/26 20:59:50 Done.
+#endif
+
// Freeze the user's preference for showing a Save As dialog. We're going
// to bounce around a bunch of threads and we don't want to worry about race
// conditions where the user changes this pref out from under us.
« no previous file with comments | « no previous file | chrome/browser/download/download_file_picker_chromeos.cc » ('j') | chrome/browser/download/download_util.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698