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); |
}; |