OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // A command-line tool that inspects the current system, displaying information | 5 // A command-line tool that inspects the current system, displaying information |
6 // about installed products. Violations are dumped to stderr. The process | 6 // about installed products. Violations are dumped to stderr. The process |
7 // exit code is 0 if there are no violations, or 1 otherwise. | 7 // exit code is 0 if there are no violations, or 1 otherwise. |
8 | 8 |
9 #include <cstdio> | 9 #include <cstdio> |
10 #include <cstdlib> | 10 #include <cstdlib> |
11 | 11 |
12 #include "base/at_exit.h" | 12 #include "base/at_exit.h" |
13 #include "base/command_line.h" | 13 #include "base/command_line.h" |
14 #include "base/file_util.h" | 14 #include "base/files/file_util.h" |
15 #include "base/logging.h" | 15 #include "base/logging.h" |
16 #include "base/path_service.h" | 16 #include "base/path_service.h" |
17 #include "chrome/installer/util/installation_validator.h" | 17 #include "chrome/installer/util/installation_validator.h" |
18 | 18 |
19 using installer::InstallationValidator; | 19 using installer::InstallationValidator; |
20 | 20 |
21 namespace { | 21 namespace { |
22 | 22 |
23 // A helper class that initializes logging and installs a log message handler to | 23 // A helper class that initializes logging and installs a log message handler to |
24 // direct ERROR messages to stderr. Only one instance of this class may be live | 24 // direct ERROR messages to stderr. Only one instance of this class may be live |
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
180 fprintf(stream, "%s installations%s: %s\n", LevelToString(system_level), | 180 fprintf(stream, "%s installations%s: %s\n", LevelToString(system_level), |
181 (is_valid ? "" : " (with errors)"), | 181 (is_valid ? "" : " (with errors)"), |
182 InstallationTypeToString(type).c_str()); | 182 InstallationTypeToString(type).c_str()); |
183 } | 183 } |
184 if (!is_valid) | 184 if (!is_valid) |
185 result = EXIT_FAILURE; | 185 result = EXIT_FAILURE; |
186 } | 186 } |
187 | 187 |
188 return result; | 188 return result; |
189 } | 189 } |
OLD | NEW |