Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(290)

Side by Side Diff: chrome/installer/setup/setup_main.cc

Issue 12998005: Minor cleanups for user experiments (follow-up to Issue 12321061). (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Comment fix. Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | chrome/installer/util/user_experiment.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « no previous file | chrome/installer/util/user_experiment.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698