OLD | NEW |
---|---|
1 // Copyright 2014 The Crashpad Authors. All rights reserved. | 1 // Copyright 2014 The Crashpad Authors. All rights reserved. |
2 // | 2 // |
3 // Licensed under the Apache License, Version 2.0 (the "License"); | 3 // Licensed under the Apache License, Version 2.0 (the "License"); |
4 // you may not use this file except in compliance with the License. | 4 // you may not use this file except in compliance with the License. |
5 // You may obtain a copy of the License at | 5 // You may obtain a copy of the License at |
6 // | 6 // |
7 // http://www.apache.org/licenses/LICENSE-2.0 | 7 // http://www.apache.org/licenses/LICENSE-2.0 |
8 // | 8 // |
9 // Unless required by applicable law or agreed to in writing, software | 9 // Unless required by applicable law or agreed to in writing, software |
10 // distributed under the License is distributed on an "AS IS" BASIS, | 10 // distributed under the License is distributed on an "AS IS" BASIS, |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
46 //! \copydoc Version | 46 //! \copydoc Version |
47 static void Version(const std::string& me); | 47 static void Version(const std::string& me); |
48 | 48 |
49 //! \copydoc UsageTail | 49 //! \copydoc UsageTail |
50 static void UsageTail(const std::string& me); | 50 static void UsageTail(const std::string& me); |
51 | 51 |
52 //! \copydoc UsageHint | 52 //! \copydoc UsageHint |
53 static void UsageHint(const std::string& me, const char* hint); | 53 static void UsageHint(const std::string& me, const char* hint); |
54 #endif // OS_POSIX | 54 #endif // OS_POSIX |
55 | 55 |
56 #if defined(OS_WIN) || DOXYGEN | |
57 //! \brief Converts \a argv `wchar_t` UTF-16 to UTF-8, and passes onwards to a | |
58 //! UTF-8 entry point. | |
59 //! | |
60 //! \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.
| |
61 static int Wmain(int argc, wchar_t* argv[], int (*entry)(int, char*[])); | |
62 #endif // OS_WIN | |
63 | |
64 //! \brief Convert a command line argument to the string type suitable for | |
65 //! base::FilePath. | |
66 //! | |
67 //! 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.
| |
68 //! the input argument was converted from UTF-16 in a `wchar_t*` to UTF-8 in a | |
69 //! `char*`. This undoes that transformation. | |
70 //! | |
71 //! \sa Wmain | |
72 static base::FilePath::StringType CommandLineArgumentToFilePathStringType( | |
73 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.
| |
74 | |
56 private: | 75 private: |
57 DISALLOW_IMPLICIT_CONSTRUCTORS(ToolSupport); | 76 DISALLOW_IMPLICIT_CONSTRUCTORS(ToolSupport); |
58 }; | 77 }; |
59 | 78 |
60 } // namespace crashpad | 79 } // namespace crashpad |
61 | 80 |
62 #endif // CRASHPAD_TOOLS_TOOL_SUPPORT_H_ | 81 #endif // CRASHPAD_TOOLS_TOOL_SUPPORT_H_ |
OLD | NEW |