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

Unified Diff: net/base/filename_util_internal.cc

Issue 879783004: Cleanup: Don't bother doing no-op wide/utf16 conversions on Windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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 | « components/crash/app/crash_keys_win.cc ('k') | ui/shell_dialogs/select_file_dialog_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/filename_util_internal.cc
diff --git a/net/base/filename_util_internal.cc b/net/base/filename_util_internal.cc
index be9139dfff59b7ffdee0edf4849b25b0c8dddf0e..c77375b40d30afa2d75cda645e40ee37fffd799a 100644
--- a/net/base/filename_util_internal.cc
+++ b/net/base/filename_util_internal.cc
@@ -202,8 +202,8 @@ void EnsureSafeExtension(const std::string& mime_type,
bool FilePathToString16(const base::FilePath& path, base::string16* converted) {
#if defined(OS_WIN)
- return base::WideToUTF16(
- path.value().c_str(), path.value().size(), converted);
+ *converted = path.value();
+ return true;
#elif defined(OS_POSIX)
std::string component8 = path.AsUTF8Unsafe();
return !component8.empty() &&
« no previous file with comments | « components/crash/app/crash_keys_win.cc ('k') | ui/shell_dialogs/select_file_dialog_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698