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

Unified Diff: tools/tool_support.h

Issue 1120383003: Get generate_dump compiling on Windows (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@tools
Patch Set: fixes Created 5 years, 7 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: tools/tool_support.h
diff --git a/tools/tool_support.h b/tools/tool_support.h
index 47976bc9692c7f3ddb3f26ec0ef4f0c0c6db57bf..bbd0adb1d61ecaf48d19c046b4c4bbcb4a42cfc5 100644
--- a/tools/tool_support.h
+++ b/tools/tool_support.h
@@ -53,6 +53,25 @@ class ToolSupport {
static void UsageHint(const std::string& me, const char* hint);
#endif // OS_POSIX
+#if defined(OS_WIN) || DOXYGEN
+ //! \brief Converts \a argv `wchar_t` UTF-16 to UTF-8, and passes onwards to a
+ //! UTF-8 entry point.
+ //!
+ //! \return The return values of \a entry.
Mark Mentovai 2015/05/06 04:44:15 value, singular.
scottmg 2015/05/06 18:02:18 Done.
+ static int Wmain(int argc, wchar_t* argv[], int (*entry)(int, char*[]));
+#endif // OS_WIN
+
+ //! \brief Convert a command line argument to the string type suitable for
+ //! base::FilePath.
+ //!
+ //! On POSIX, this is a no-op. On Windows, we assume that Wmain was used, and
Mark Mentovai 2015/05/06 04:44:15 Avoid “we.”
Mark Mentovai 2015/05/06 04:44:15 Wmain(), also in the \sa.
scottmg 2015/05/06 18:02:18 Done.
scottmg 2015/05/06 18:02:18 Done.
+ //! the input argument was converted from UTF-16 in a `wchar_t*` to UTF-8 in a
+ //! `char*`. This undoes that transformation.
+ //!
+ //! \sa Wmain
+ static base::FilePath::StringType CommandLineArgumentToFilePathStringType(
+ const char* arg);
Mark Mentovai 2015/05/06 04:44:15 Take a const std::string& here, because it’s going
scottmg 2015/05/06 18:02:18 Done.
+
private:
DISALLOW_IMPLICIT_CONSTRUCTORS(ToolSupport);
};
« tools/generate_dump.cc ('K') | « tools/generate_dump.cc ('k') | tools/tool_support.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698