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

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: release load 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
« no previous file with comments | « util/test/errors.h ('k') | util/test/thread.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: util/test/errors.cc
diff --git a/util/test/errors.cc b/util/test/errors.cc
index 1fd3a0f515084ad43dae2c377d948f88094bd61a..757062c5224280744aa1fc721e5332fe75b7ce5c 100644
--- a/util/test/errors.cc
+++ b/util/test/errors.cc
@@ -16,13 +16,15 @@
#include <errno.h>
-#include "build/build_config.h"
+#include "base/logging.h"
#include "base/strings/stringprintf.h"
+#include "build/build_config.h"
#if defined(OS_POSIX)
#include "base/safe_strerror_posix.h"
#elif defined(OS_WIN)
#include <string.h>
+#include <windows.h>
#endif
namespace crashpad {
@@ -47,5 +49,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() ? "" : ": ",
+ logging::SystemErrorCodeToString(GetLastError()).c_str());
+}
+#endif
+
} // namespace test
} // namespace crashpad
« no previous file with comments | « util/test/errors.h ('k') | util/test/thread.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698