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

Unified Diff: chrome/browser/download/download_util.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/download_util.cc
diff --git a/chrome/browser/download/download_util.cc b/chrome/browser/download/download_util.cc
index ab1bb68261caeab38fba1192bd3c4fa7f533de64..f608e81f12470e9a4c6c8d0a22ad863bfd047433 100644
--- a/chrome/browser/download/download_util.cc
+++ b/chrome/browser/download/download_util.cc
@@ -12,6 +12,7 @@
#include <string>
#include "base/file_util.h"
+#include "base/i18n/icu_string_conversions.h"
#include "base/i18n/rtl.h"
#include "base/i18n/time_formatting.h"
#include "base/lazy_instance.h"
@@ -162,6 +163,17 @@ void GenerateFileNameFromRequest(const DownloadItem& download_item,
default_file_name);
}
+void NormalizeFileNameOnChromeOS(FilePath* file_name) {
+#if defined(OS_CHROMEOS)
+ std::string normalized_str;
+ if (base::ConvertToUtf8AndNormalize(file_name->value(),
+ base::kCodepageUTF8,
+ &normalized_str)) {
+ *file_name = FilePath(normalized_str);
+ }
+#endif
+}
+
// Download progress painting --------------------------------------------------
// Common bitmaps used for download progress animations. We load them once the
« chrome/browser/download/download_util.h ('K') | « chrome/browser/download/download_util.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698