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

Unified Diff: chrome/browser/platform_util_win.cc

Issue 246393010: Replaced FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM) with logging::SystemErrorCodeToString. (Closed) Base URL: http://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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 | « no previous file | device/bluetooth/bluetooth_socket_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/platform_util_win.cc
diff --git a/chrome/browser/platform_util_win.cc b/chrome/browser/platform_util_win.cc
index 77dcf400f02b005bb2bd9792b88067182eeabb70..be651c45fd65da4290252019c78ad40d288ae957 100644
--- a/chrome/browser/platform_util_win.cc
+++ b/chrome/browser/platform_util_win.cc
@@ -98,17 +98,10 @@ void ShowItemInFolderOnFileThread(const base::FilePath& full_path) {
if (hr == ERROR_FILE_NOT_FOUND) {
ShellExecute(NULL, L"open", dir.value().c_str(), NULL, NULL, SW_SHOW);
} else {
- LPTSTR message = NULL;
- DWORD message_length = FormatMessage(
- FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM,
- 0, hr, 0, reinterpret_cast<LPTSTR>(&message), 0, NULL);
LOG(WARNING) << " " << __FUNCTION__
<< "(): Can't open full_path = \""
<< full_path.value() << "\""
- << " hr = " << hr
- << " " << reinterpret_cast<LPTSTR>(&message);
- if (message)
- LocalFree(message);
+ << " hr = " << logging::SystemErrorCodeToString(hr);
}
}
}
« no previous file with comments | « no previous file | device/bluetooth/bluetooth_socket_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698