| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #ifndef CHROME_INSTALLER_UTIL_INSTALLATION_VALIDATOR_H_ | 5 #ifndef CHROME_INSTALLER_UTIL_INSTALLATION_VALIDATOR_H_ |
| 6 #define CHROME_INSTALLER_UTIL_INSTALLATION_VALIDATOR_H_ | 6 #define CHROME_INSTALLER_UTIL_INSTALLATION_VALIDATOR_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <utility> | 9 #include <utility> |
| 10 #include <vector> | 10 #include <vector> |
| 11 | 11 |
| 12 #include "base/basictypes.h" | 12 #include "base/basictypes.h" |
| 13 #include "base/compiler_specific.h" | 13 #include "base/compiler_specific.h" |
| 14 #include "base/string16.h" | 14 #include "base/string16.h" |
| 15 #include "chrome/installer/util/browser_distribution.h" | 15 #include "chrome/installer/util/browser_distribution.h" |
| 16 | 16 |
| 17 class CommandLine; | 17 class CommandLine; |
| 18 |
| 19 namespace base { |
| 18 class FilePath; | 20 class FilePath; |
| 21 } |
| 19 | 22 |
| 20 namespace installer { | 23 namespace installer { |
| 21 | 24 |
| 22 class InstallationState; | 25 class InstallationState; |
| 23 class AppCommand; | 26 class AppCommand; |
| 24 class ProductState; | 27 class ProductState; |
| 25 | 28 |
| 26 // A class that validates the state of an installation. Violations are logged | 29 // A class that validates the state of an installation. Violations are logged |
| 27 // via LOG(ERROR). | 30 // via LOG(ERROR). |
| 28 class InstallationValidator { | 31 class InstallationValidator { |
| (...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 207 const ProductContext& ctx, | 210 const ProductContext& ctx, |
| 208 const CommandExpectations& expectations, | 211 const CommandExpectations& expectations, |
| 209 bool* is_valid); | 212 bool* is_valid); |
| 210 static void ValidateBinariesCommands(const ProductContext& ctx, | 213 static void ValidateBinariesCommands(const ProductContext& ctx, |
| 211 bool* is_valid); | 214 bool* is_valid); |
| 212 static void ValidateBinaries(const InstallationState& machine_state, | 215 static void ValidateBinaries(const InstallationState& machine_state, |
| 213 bool system_install, | 216 bool system_install, |
| 214 const ProductState& binaries_state, | 217 const ProductState& binaries_state, |
| 215 bool* is_valid); | 218 bool* is_valid); |
| 216 static void ValidateSetupPath(const ProductContext& ctx, | 219 static void ValidateSetupPath(const ProductContext& ctx, |
| 217 const FilePath& setup_exe, | 220 const base::FilePath& setup_exe, |
| 218 const char* purpose, | 221 const char* purpose, |
| 219 bool* is_valid); | 222 bool* is_valid); |
| 220 static void ValidateCommandExpectations(const ProductContext& ctx, | 223 static void ValidateCommandExpectations(const ProductContext& ctx, |
| 221 const CommandLine& command, | 224 const CommandLine& command, |
| 222 const SwitchExpectations& expected, | 225 const SwitchExpectations& expected, |
| 223 const char* source, | 226 const char* source, |
| 224 bool* is_valid); | 227 bool* is_valid); |
| 225 static void ValidateUninstallCommand(const ProductContext& ctx, | 228 static void ValidateUninstallCommand(const ProductContext& ctx, |
| 226 const CommandLine& command, | 229 const CommandLine& command, |
| 227 const char* source, | 230 const char* source, |
| (...skipping 17 matching lines...) Expand all Loading... |
| 245 // A collection of all valid installation types. | 248 // A collection of all valid installation types. |
| 246 static const InstallationType kInstallationTypes[]; | 249 static const InstallationType kInstallationTypes[]; |
| 247 | 250 |
| 248 private: | 251 private: |
| 249 DISALLOW_IMPLICIT_CONSTRUCTORS(InstallationValidator); | 252 DISALLOW_IMPLICIT_CONSTRUCTORS(InstallationValidator); |
| 250 }; | 253 }; |
| 251 | 254 |
| 252 } // namespace installer | 255 } // namespace installer |
| 253 | 256 |
| 254 #endif // CHROME_INSTALLER_UTIL_INSTALLATION_VALIDATOR_H_ | 257 #endif // CHROME_INSTALLER_UTIL_INSTALLATION_VALIDATOR_H_ |
| OLD | NEW |