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 12 matching lines...) Expand all Loading... |
23 | 23 |
24 namespace { | 24 namespace { |
25 | 25 |
26 BrowserDistribution::Type ToBrowserDistributionType( | 26 BrowserDistribution::Type ToBrowserDistributionType( |
27 InstallationValidator::InstallationType type) { | 27 InstallationValidator::InstallationType type) { |
28 const int kChromeMask = | 28 const int kChromeMask = |
29 (InstallationValidator::ProductBits::CHROME_SINGLE | | 29 (InstallationValidator::ProductBits::CHROME_SINGLE | |
30 InstallationValidator::ProductBits::CHROME_MULTI); | 30 InstallationValidator::ProductBits::CHROME_MULTI); |
31 const int kChromeFrameMask = | 31 const int kChromeFrameMask = |
32 (InstallationValidator::ProductBits::CHROME_FRAME_SINGLE | | 32 (InstallationValidator::ProductBits::CHROME_FRAME_SINGLE | |
33 InstallationValidator::ProductBits::CHROME_FRAME_MULTI | | 33 InstallationValidator::ProductBits::CHROME_FRAME_MULTI); |
34 InstallationValidator::ProductBits::CHROME_FRAME_READY_MODE); | |
35 const int kBinariesMask = | 34 const int kBinariesMask = |
36 (InstallationValidator::ProductBits::CHROME_MULTI | | 35 (InstallationValidator::ProductBits::CHROME_MULTI | |
37 InstallationValidator::ProductBits::CHROME_FRAME_MULTI | | 36 InstallationValidator::ProductBits::CHROME_FRAME_MULTI); |
38 InstallationValidator::ProductBits::CHROME_FRAME_READY_MODE); | |
39 // Default return is CHROME_BINARIES. | 37 // Default return is CHROME_BINARIES. |
40 BrowserDistribution::Type ret_value = BrowserDistribution::CHROME_BINARIES; | 38 BrowserDistribution::Type ret_value = BrowserDistribution::CHROME_BINARIES; |
41 if (type & kChromeMask) | 39 if (type & kChromeMask) |
42 ret_value = BrowserDistribution::CHROME_BROWSER; | 40 ret_value = BrowserDistribution::CHROME_BROWSER; |
43 if (type & kChromeFrameMask) | 41 if (type & kChromeFrameMask) |
44 ret_value = BrowserDistribution::CHROME_FRAME; | 42 ret_value = BrowserDistribution::CHROME_FRAME; |
45 if (type & kBinariesMask) | 43 if (type & kBinariesMask) |
46 ret_value = BrowserDistribution::CHROME_BINARIES; | 44 ret_value = BrowserDistribution::CHROME_BINARIES; |
47 return ret_value; | 45 return ret_value; |
48 } | 46 } |
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
292 return false; | 290 return false; |
293 } | 291 } |
294 if (!base::WaitForSingleProcess(process, base::TimeDelta::FromMinutes(1))) { | 292 if (!base::WaitForSingleProcess(process, base::TimeDelta::FromMinutes(1))) { |
295 LOG(ERROR) << "Launched process did not complete."; | 293 LOG(ERROR) << "Launched process did not complete."; |
296 return false; | 294 return false; |
297 } | 295 } |
298 return true; | 296 return true; |
299 } | 297 } |
300 | 298 |
301 } // namespace | 299 } // namespace |
OLD | NEW |