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 <set> | 9 #include <set> |
10 #include <utility> | 10 #include <utility> |
11 #include <vector> | 11 #include <vector> |
12 | 12 |
13 #include "base/basictypes.h" | 13 #include "base/basictypes.h" |
14 #include "base/compiler_specific.h" | 14 #include "base/compiler_specific.h" |
15 #include "base/strings/string16.h" | 15 #include "base/strings/string16.h" |
16 #include "chrome/installer/util/browser_distribution.h" | 16 #include "chrome/installer/util/browser_distribution.h" |
17 | 17 |
| 18 namespace base { |
18 class CommandLine; | 19 class CommandLine; |
19 | |
20 namespace base { | |
21 class FilePath; | 20 class FilePath; |
22 } | 21 } |
23 | 22 |
24 namespace installer { | 23 namespace installer { |
25 | 24 |
26 class InstallationState; | 25 class InstallationState; |
27 class AppCommand; | 26 class AppCommand; |
28 class ProductState; | 27 class ProductState; |
29 | 28 |
30 // 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 |
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
224 bool* is_valid); | 223 bool* is_valid); |
225 static void ValidateBinaries(const InstallationState& machine_state, | 224 static void ValidateBinaries(const InstallationState& machine_state, |
226 bool system_install, | 225 bool system_install, |
227 const ProductState& binaries_state, | 226 const ProductState& binaries_state, |
228 bool* is_valid); | 227 bool* is_valid); |
229 static void ValidateSetupPath(const ProductContext& ctx, | 228 static void ValidateSetupPath(const ProductContext& ctx, |
230 const base::FilePath& setup_exe, | 229 const base::FilePath& setup_exe, |
231 const base::string16& purpose, | 230 const base::string16& purpose, |
232 bool* is_valid); | 231 bool* is_valid); |
233 static void ValidateCommandExpectations(const ProductContext& ctx, | 232 static void ValidateCommandExpectations(const ProductContext& ctx, |
234 const CommandLine& command, | 233 const base::CommandLine& command, |
235 const SwitchExpectations& expected, | 234 const SwitchExpectations& expected, |
236 const base::string16& source, | 235 const base::string16& source, |
237 bool* is_valid); | 236 bool* is_valid); |
238 static void ValidateUninstallCommand(const ProductContext& ctx, | 237 static void ValidateUninstallCommand(const ProductContext& ctx, |
239 const CommandLine& command, | 238 const base::CommandLine& command, |
240 const base::string16& source, | 239 const base::string16& source, |
241 bool* is_valid); | 240 bool* is_valid); |
242 static void ValidateRenameCommand(const ProductContext& ctx, | 241 static void ValidateRenameCommand(const ProductContext& ctx, |
243 bool* is_valid); | 242 bool* is_valid); |
244 static void ValidateOldVersionValues(const ProductContext& ctx, | 243 static void ValidateOldVersionValues(const ProductContext& ctx, |
245 bool* is_valid); | 244 bool* is_valid); |
246 static void ValidateMultiInstallProduct(const ProductContext& ctx, | 245 static void ValidateMultiInstallProduct(const ProductContext& ctx, |
247 bool* is_valid); | 246 bool* is_valid); |
248 static void ValidateAppCommands(const ProductContext& ctx, | 247 static void ValidateAppCommands(const ProductContext& ctx, |
249 bool* is_valid); | 248 bool* is_valid); |
250 static void ValidateUsageStats(const ProductContext& ctx, | 249 static void ValidateUsageStats(const ProductContext& ctx, |
251 bool* is_valid); | 250 bool* is_valid); |
252 static void ValidateProduct(const InstallationState& machine_state, | 251 static void ValidateProduct(const InstallationState& machine_state, |
253 bool system_install, | 252 bool system_install, |
254 const ProductState& product_state, | 253 const ProductState& product_state, |
255 const ProductRules& rules, | 254 const ProductRules& rules, |
256 bool* is_valid); | 255 bool* is_valid); |
257 | 256 |
258 // A collection of all valid installation types. | 257 // A collection of all valid installation types. |
259 static const InstallationType kInstallationTypes[]; | 258 static const InstallationType kInstallationTypes[]; |
260 | 259 |
261 private: | 260 private: |
262 DISALLOW_IMPLICIT_CONSTRUCTORS(InstallationValidator); | 261 DISALLOW_IMPLICIT_CONSTRUCTORS(InstallationValidator); |
263 }; | 262 }; |
264 | 263 |
265 } // namespace installer | 264 } // namespace installer |
266 | 265 |
267 #endif // CHROME_INSTALLER_UTIL_INSTALLATION_VALIDATOR_H_ | 266 #endif // CHROME_INSTALLER_UTIL_INSTALLATION_VALIDATOR_H_ |
OLD | NEW |