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

Side by Side Diff: chrome/installer/util/google_chrome_distribution.cc

Issue 467059: Merge 34130 - Remove check for usage stats in the toast experiment... (Closed) Base URL: svn://svn.chromium.org/chrome/branches/195/src/
Patch Set: Created 11 years 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | 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) 2006-2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2009 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 // This file defines specific implementation of BrowserDistribution class for 5 // This file defines specific implementation of BrowserDistribution class for
6 // Google Chrome. 6 // Google Chrome.
7 7
8 #include "chrome/installer/util/google_chrome_distribution.h" 8 #include "chrome/installer/util/google_chrome_distribution.h"
9 9
10 #include <atlbase.h> 10 #include <atlbase.h>
(...skipping 411 matching lines...) Expand 10 before | Expand all | Expand 10 after
422 } 422 }
423 423
424 // Currently we only have one experiment: the inactive user toast. Which only 424 // Currently we only have one experiment: the inactive user toast. Which only
425 // applies for users doing upgrades and non-systemwide install. 425 // applies for users doing upgrades and non-systemwide install.
426 void GoogleChromeDistribution::LaunchUserExperiment( 426 void GoogleChromeDistribution::LaunchUserExperiment(
427 installer_util::InstallStatus status, const installer::Version& version, 427 installer_util::InstallStatus status, const installer::Version& version,
428 bool system_install) { 428 bool system_install) {
429 if ((installer_util::NEW_VERSION_UPDATED != status) || system_install) 429 if ((installer_util::NEW_VERSION_UPDATED != status) || system_install)
430 return; 430 return;
431 431
432 // If user has not opted-in for usage stats we don't do the experiments.
433 if (!GoogleUpdateSettings::GetCollectStatsConsent())
434 return;
435
436 // currently only two equal experiment groups. 90% get the welcome back url. 432 // currently only two equal experiment groups. 90% get the welcome back url.
437 int flavor = (base::RandDouble() > 0.1) ? 0 : 1; 433 int flavor = (base::RandDouble() > 0.1) ? 0 : 1;
438 434
439 std::wstring brand; 435 std::wstring brand;
440 if (GoogleUpdateSettings::GetBrand(&brand) && (brand == L"CHXX")) { 436 if (GoogleUpdateSettings::GetBrand(&brand) && (brand == L"CHXX")) {
441 // The user automatically qualifies for the experiment. 437 // The user automatically qualifies for the experiment.
442 LOG(INFO) << "Experiment qualification bypass"; 438 LOG(INFO) << "Experiment qualification bypass";
443 } else { 439 } else {
444 // Time to verify the conditions for the experiment. 440 // Time to verify the conditions for the experiment.
445 std::wstring client_info; 441 std::wstring client_info;
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
504 }; 500 };
505 GoogleUpdateSettings::SetClient(GetExperimentGroup(outcome, flavor)); 501 GoogleUpdateSettings::SetClient(GetExperimentGroup(outcome, flavor));
506 if (outcome != kToastExpUninstallGroup) 502 if (outcome != kToastExpUninstallGroup)
507 return; 503 return;
508 // The user wants to uninstall. This is a best effort operation. Note that 504 // The user wants to uninstall. This is a best effort operation. Note that
509 // we waited for chrome to exit so the uninstall would not detect chrome 505 // we waited for chrome to exit so the uninstall would not detect chrome
510 // running. 506 // running.
511 base::LaunchApp(InstallUtil::GetChromeUninstallCmd(false), 507 base::LaunchApp(InstallUtil::GetChromeUninstallCmd(false),
512 false, false, NULL); 508 false, false, NULL);
513 } 509 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698