| 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 // Implementation of the installation validator. | 5 // Implementation of the installation validator. |
| 6 | 6 |
| 7 #include "chrome/installer/util/installation_validator.h" | 7 #include "chrome/installer/util/installation_validator.h" |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 #include <set> | 10 #include <set> |
| (...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 217 *is_valid = false; | 217 *is_valid = false; |
| 218 LOG(ERROR) << "install-application command's path is not " | 218 LOG(ERROR) << "install-application command's path is not " |
| 219 << expected_path.value() << ": " | 219 << expected_path.value() << ": " |
| 220 << the_command.GetProgram().value(); | 220 << the_command.GetProgram().value(); |
| 221 } | 221 } |
| 222 | 222 |
| 223 | 223 |
| 224 SwitchExpectations expected; | 224 SwitchExpectations expected; |
| 225 | 225 |
| 226 expected.push_back( | 226 expected.push_back( |
| 227 std::make_pair(std::string(::switches::kAppsInstallFromManifestURL), | 227 std::make_pair(std::string(::switches::kInstallFromWebstore), |
| 228 true)); | 228 true)); |
| 229 | 229 |
| 230 ValidateCommandExpectations(ctx, the_command, expected, "install application", | 230 ValidateCommandExpectations(ctx, the_command, expected, "install application", |
| 231 is_valid); | 231 is_valid); |
| 232 | 232 |
| 233 if (!command.sends_pings()) { | 233 if (!command.sends_pings()) { |
| 234 *is_valid = false; | 234 *is_valid = false; |
| 235 LOG(ERROR) << "install-application command is not configured to send " | 235 LOG(ERROR) << "install-application command is not configured to send " |
| 236 << "pings."; | 236 << "pings."; |
| 237 } | 237 } |
| (...skipping 618 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 856 InstallationType* type) { | 856 InstallationType* type) { |
| 857 DCHECK(type); | 857 DCHECK(type); |
| 858 InstallationState machine_state; | 858 InstallationState machine_state; |
| 859 | 859 |
| 860 machine_state.Initialize(); | 860 machine_state.Initialize(); |
| 861 | 861 |
| 862 return ValidateInstallationTypeForState(machine_state, system_level, type); | 862 return ValidateInstallationTypeForState(machine_state, system_level, type); |
| 863 } | 863 } |
| 864 | 864 |
| 865 } // namespace installer | 865 } // namespace installer |
| OLD | NEW |