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

Unified Diff: util/file/file_io_win.cc

Issue 1117393002: win: Don't log wide strings via path.value().c_str() (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@settings-access
Patch Set: just convert at callsite instead of global std::operator<< Created 5 years, 8 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 | « snapshot/crashpad_info_client_options_test.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: util/file/file_io_win.cc
diff --git a/util/file/file_io_win.cc b/util/file/file_io_win.cc
index 0f7476d0a5007d4bb71b7ae00c29e7ac5ba0061a..24a875011a8a5f200914d24054872e620d47bb58 100644
--- a/util/file/file_io_win.cc
+++ b/util/file/file_io_win.cc
@@ -17,6 +17,7 @@
#include "base/files/file_path.h"
#include "base/logging.h"
#include "base/numerics/safe_conversions.h"
+#include "base/strings/utf_string_conversions.h"
namespace {
@@ -59,8 +60,8 @@ FileHandle LoggingOpenFileForOutput(DWORD access,
disposition,
FILE_ATTRIBUTE_NORMAL,
nullptr);
- PLOG_IF(ERROR, file == INVALID_HANDLE_VALUE) << "CreateFile "
- << path.value().c_str();
+ PLOG_IF(ERROR, file == INVALID_HANDLE_VALUE)
+ << "CreateFile " << base::UTF16ToUTF8(path.value());
return file;
}
@@ -119,8 +120,8 @@ FileHandle LoggingOpenFileForRead(const base::FilePath& path) {
OPEN_EXISTING,
0,
nullptr);
- PLOG_IF(ERROR, file == INVALID_HANDLE_VALUE) << "CreateFile "
- << path.value().c_str();
+ PLOG_IF(ERROR, file == INVALID_HANDLE_VALUE)
+ << "CreateFile " << base::UTF16ToUTF8(path.value());
return file;
}
« no previous file with comments | « snapshot/crashpad_info_client_options_test.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698