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

Unified Diff: printing/printed_document.cc

Issue 271056: Do some cleanup of file path name handling. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 2 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 | « net/base/net_util_unittest.cc ('k') | printing/printing_context_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: printing/printed_document.cc
===================================================================
--- printing/printed_document.cc (revision 29772)
+++ printing/printed_document.cc (working copy)
@@ -263,7 +263,13 @@
filename += L"_";
filename += StringPrintf(L"%02d", page.page_number());
filename += L"_.emf";
- file_util::ReplaceIllegalCharacters(&filename, '_');
+#if defined(OS_WIN)
+ file_util::ReplaceIllegalCharactersInPath(&filename, '_');
+#else
+ std::string narrow_filename = WideToUTF8(filename);
+ file_util::ReplaceIllegalCharactersInPath(&narrow_filename, '_');
+ filename = UTF8ToWide(narrow_filename);
+#endif
std::wstring path(g_debug_dump_info->debug_dump_path);
file_util::AppendToPath(&path, filename);
#if defined(OS_WIN)
« no previous file with comments | « net/base/net_util_unittest.cc ('k') | printing/printing_context_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698