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 #include "chrome/test/mini_installer_test/installer_test_util.h" | 5 #include "chrome/test/mini_installer_test/installer_test_util.h" |
6 | 6 |
7 #include "base/file_util.h" | 7 #include "base/file_util.h" |
8 #include "base/path_service.h" | 8 #include "base/path_service.h" |
9 #include "base/process/kill.h" | 9 #include "base/process/kill.h" |
10 #include "base/process/launch.h" | 10 #include "base/process/launch.h" |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 installer_test::InstalledProduct current_prod; | 102 installer_test::InstalledProduct current_prod; |
103 for (int i = 0; i < 2; ++i) { | 103 for (int i = 0; i < 2; ++i) { |
104 const bool system_level = (i != 0); | 104 const bool system_level = (i != 0); |
105 InstallationValidator::InstallationType type = | 105 InstallationValidator::InstallationType type = |
106 InstallationValidator::NO_PRODUCTS; | 106 InstallationValidator::NO_PRODUCTS; |
107 bool is_valid = | 107 bool is_valid = |
108 InstallationValidator::ValidateInstallationType(system_level, &type); | 108 InstallationValidator::ValidateInstallationType(system_level, &type); |
109 if (type != InstallationValidator::NO_PRODUCTS) { | 109 if (type != InstallationValidator::NO_PRODUCTS) { |
110 current_dist = BrowserDistribution::GetSpecificDistribution( | 110 current_dist = BrowserDistribution::GetSpecificDistribution( |
111 ToBrowserDistributionType(type)); | 111 ToBrowserDistributionType(type)); |
112 base::Version version; | 112 Version version; |
113 InstallUtil::GetChromeVersion(current_dist, system_level, &version); | 113 InstallUtil::GetChromeVersion(current_dist, system_level, &version); |
114 if (version.IsValid()) { | 114 if (version.IsValid()) { |
115 current_prod.type = type; | 115 current_prod.type = type; |
116 current_prod.version = version.GetString(); | 116 current_prod.version = version.GetString(); |
117 current_prod.system = system_level; | 117 current_prod.system = system_level; |
118 products->push_back(current_prod); | 118 products->push_back(current_prod); |
119 } | 119 } |
120 } | 120 } |
121 } | 121 } |
122 return !products->empty(); | 122 return !products->empty(); |
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
290 return false; | 290 return false; |
291 } | 291 } |
292 if (!base::WaitForSingleProcess(process, base::TimeDelta::FromMinutes(1))) { | 292 if (!base::WaitForSingleProcess(process, base::TimeDelta::FromMinutes(1))) { |
293 LOG(ERROR) << "Launched process did not complete."; | 293 LOG(ERROR) << "Launched process did not complete."; |
294 return false; | 294 return false; |
295 } | 295 } |
296 return true; | 296 return true; |
297 } | 297 } |
298 | 298 |
299 } // namespace | 299 } // namespace |
OLD | NEW |