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, |
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | 11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
12 // See the License for the specific language governing permissions and | 12 // See the License for the specific language governing permissions and |
13 // limitations under the License. | 13 // limitations under the License. |
14 | 14 |
15 #include "tools/tool_support.h" | 15 #include "tools/tool_support.h" |
16 | 16 |
17 #include <stdio.h> | 17 #include <stdio.h> |
18 | 18 |
19 #include <vector> | 19 #include <vector> |
20 | 20 |
21 #include "base/memory/scoped_ptr.h" | 21 #include "base/memory/scoped_ptr.h" |
22 #include "base/strings/utf_string_conversions.h" | 22 #include "base/strings/utf_string_conversions.h" |
23 #include "package.h" | 23 #include "package.h" |
24 | 24 |
25 namespace crashpad { | 25 namespace crashpad { |
26 | 26 |
27 // static | 27 // static |
28 void ToolSupport::Version(const base::FilePath& me) { | 28 void ToolSupport::Version(const base::FilePath& me) { |
29 fprintf(stderr, | 29 fprintf(stderr, |
30 "%s" PRFilePath " (%s) %s\n%s\n", | 30 "%" PRFilePath " (%s) %s\n%s\n", |
31 me.value().c_str(), | 31 me.value().c_str(), |
32 PACKAGE_NAME, | 32 PACKAGE_NAME, |
33 PACKAGE_VERSION, | 33 PACKAGE_VERSION, |
34 PACKAGE_COPYRIGHT); | 34 PACKAGE_COPYRIGHT); |
35 } | 35 } |
36 | 36 |
37 // static | 37 // static |
38 void ToolSupport::UsageTail(const base::FilePath& me) { | 38 void ToolSupport::UsageTail(const base::FilePath& me) { |
39 fprintf(stderr, | 39 fprintf(stderr, |
40 "\nReport %" PRFilePath " bugs to\n%s\n%s home page: <%s>\n", | 40 "\nReport %" PRFilePath " bugs to\n%s\n%s home page: <%s>\n", |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 base::FilePath::StringType ToolSupport::CommandLineArgumentToFilePathStringType( | 92 base::FilePath::StringType ToolSupport::CommandLineArgumentToFilePathStringType( |
93 const base::StringPiece& path) { | 93 const base::StringPiece& path) { |
94 #if defined(OS_POSIX) | 94 #if defined(OS_POSIX) |
95 return path.as_string(); | 95 return path.as_string(); |
96 #elif defined(OS_WIN) | 96 #elif defined(OS_WIN) |
97 return base::UTF8ToUTF16(path); | 97 return base::UTF8ToUTF16(path); |
98 #endif // OS_POSIX | 98 #endif // OS_POSIX |
99 } | 99 } |
100 | 100 |
101 } // namespace crashpad | 101 } // namespace crashpad |
OLD | NEW |