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

Unified Diff: util/test/errors.cc

Issue 1001673002: Add Locking calls to file_io.h plus implementations and test (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: parameterize test Created 5 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: util/test/errors.cc
diff --git a/util/test/errors.cc b/util/test/errors.cc
index 1fd3a0f515084ad43dae2c377d948f88094bd61a..00f8037d689f0ce6010931c5495030845e9c644c 100644
--- a/util/test/errors.cc
+++ b/util/test/errors.cc
@@ -17,6 +17,7 @@
#include <errno.h>
#include "build/build_config.h"
+#include "base/logging.h"
#include "base/strings/stringprintf.h"
#if defined(OS_POSIX)
@@ -47,5 +48,15 @@ std::string ErrnoMessage(const std::string& base) {
return ErrnoMessage(errno, base);
}
+#if defined(OS_WIN)
+std::string ErrorMessage(const std::string& base) {
+ return base::StringPrintf(
+ "%s%s%s",
+ base.c_str(),
+ base.empty() ? "" : ": ",
+ base::SystemErrorCodeToString(GetLastError()).c_str());
Mark Mentovai 2015/03/20 15:03:56 This is not declared by mini_chromium’s logging.h.
scottmg 2015/03/20 21:07:35 I admit I had not yet tested back on Windows yet.
+}
+#endif
+
} // namespace test
} // namespace crashpad

Powered by Google App Engine
This is Rietveld 408576698