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 <windows.h> | 5 #include <windows.h> |
6 #include <msi.h> | 6 #include <msi.h> |
7 #include <shellapi.h> | 7 #include <shellapi.h> |
8 #include <shlobj.h> | 8 #include <shlobj.h> |
9 | 9 |
10 #include <string> | 10 #include <string> |
(...skipping 1407 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1418 // Launch the inactive user toast experiment. | 1418 // Launch the inactive user toast experiment. |
1419 int flavor = -1; | 1419 int flavor = -1; |
1420 base::StringToInt(cmd_line.GetSwitchValueNative( | 1420 base::StringToInt(cmd_line.GetSwitchValueNative( |
1421 installer::switches::kInactiveUserToast), &flavor); | 1421 installer::switches::kInactiveUserToast), &flavor); |
1422 std::string experiment_group = | 1422 std::string experiment_group = |
1423 cmd_line.GetSwitchValueASCII(installer::switches::kExperimentGroup); | 1423 cmd_line.GetSwitchValueASCII(installer::switches::kExperimentGroup); |
1424 DCHECK_NE(-1, flavor); | 1424 DCHECK_NE(-1, flavor); |
1425 if (flavor == -1) { | 1425 if (flavor == -1) { |
1426 *exit_code = installer::UNKNOWN_STATUS; | 1426 *exit_code = installer::UNKNOWN_STATUS; |
1427 } else { | 1427 } else { |
| 1428 // This code is called (via setup.exe relaunch) only if a product is known |
| 1429 // to run user experiments, so no check is required. |
1428 const Products& products = installer_state->products(); | 1430 const Products& products = installer_state->products(); |
1429 for (Products::const_iterator it = products.begin(); it < products.end(); | 1431 for (Products::const_iterator it = products.begin(); it < products.end(); |
1430 ++it) { | 1432 ++it) { |
1431 const Product& product = **it; | 1433 const Product& product = **it; |
1432 installer::InactiveUserToastExperiment( | 1434 installer::InactiveUserToastExperiment( |
1433 flavor, ASCIIToUTF16(experiment_group), product, | 1435 flavor, ASCIIToUTF16(experiment_group), product, |
1434 installer_state->target_path()); | 1436 installer_state->target_path()); |
1435 } | 1437 } |
1436 } | 1438 } |
1437 } else if (cmd_line.HasSwitch(installer::switches::kSystemLevelToast)) { | 1439 } else if (cmd_line.HasSwitch(installer::switches::kSystemLevelToast)) { |
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1725 if (!(installer_state.is_msi() && is_uninstall)) | 1727 if (!(installer_state.is_msi() && is_uninstall)) |
1726 // Note that we allow the status installer::UNINSTALL_REQUIRES_REBOOT | 1728 // Note that we allow the status installer::UNINSTALL_REQUIRES_REBOOT |
1727 // to pass through, since this is only returned on uninstall which is | 1729 // to pass through, since this is only returned on uninstall which is |
1728 // never invoked directly by Google Update. | 1730 // never invoked directly by Google Update. |
1729 return_code = InstallUtil::GetInstallReturnCode(install_status); | 1731 return_code = InstallUtil::GetInstallReturnCode(install_status); |
1730 | 1732 |
1731 VLOG(1) << "Installation complete, returning: " << return_code; | 1733 VLOG(1) << "Installation complete, returning: " << return_code; |
1732 | 1734 |
1733 return return_code; | 1735 return return_code; |
1734 } | 1736 } |
OLD | NEW |