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

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

Issue 159539: Refactoring of master preferences parsing before adding a new preference. (Closed)
Patch Set: rename variable Created 11 years, 4 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
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 389 matching lines...) Expand 10 before | Expand all | Expand 10 after
400 LOG(ERROR) << "Failed to write value " << new_value 400 LOG(ERROR) << "Failed to write value " << new_value
401 << " to the registry field " << google_update::kRegApField; 401 << " to the registry field " << google_update::kRegApField;
402 } 402 }
403 key.Close(); 403 key.Close();
404 } 404 }
405 405
406 // Currently we only have one experiment: the inactive user toast. Which only 406 // Currently we only have one experiment: the inactive user toast. Which only
407 // applies for users doing upgrades and non-systemwide install. 407 // applies for users doing upgrades and non-systemwide install.
408 void GoogleChromeDistribution::LaunchUserExperiment( 408 void GoogleChromeDistribution::LaunchUserExperiment(
409 installer_util::InstallStatus status, const installer::Version& version, 409 installer_util::InstallStatus status, const installer::Version& version,
410 bool system_install, int options) { 410 bool system_install) {
411 if ((installer_util::NEW_VERSION_UPDATED != status) || system_install) 411 if ((installer_util::NEW_VERSION_UPDATED != status) || system_install)
412 return; 412 return;
413 413
414 // If user has not opted-in for usage stats we don't do the experiments. 414 // If user has not opted-in for usage stats we don't do the experiments.
415 if (!GoogleUpdateSettings::GetCollectStatsConsent()) 415 if (!GoogleUpdateSettings::GetCollectStatsConsent())
416 return; 416 return;
417 417
418 std::wstring brand; 418 std::wstring brand;
419 if (GoogleUpdateSettings::GetBrand(&brand) && (brand == L"CHXX")) { 419 if (GoogleUpdateSettings::GetBrand(&brand) && (brand == L"CHXX")) {
420 // The user automatically qualifies for the experiment. 420 // The user automatically qualifies for the experiment.
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
480 }; 480 };
481 GoogleUpdateSettings::SetClient(outcome); 481 GoogleUpdateSettings::SetClient(outcome);
482 if (outcome != kToastExpUninstallGroup) 482 if (outcome != kToastExpUninstallGroup)
483 return; 483 return;
484 // The user wants to uninstall. This is a best effort operation. Note that 484 // The user wants to uninstall. This is a best effort operation. Note that
485 // we waited for chrome to exit so the uninstall would not detect chrome 485 // we waited for chrome to exit so the uninstall would not detect chrome
486 // running. 486 // running.
487 base::LaunchApp(InstallUtil::GetChromeUninstallCmd(false), 487 base::LaunchApp(InstallUtil::GetChromeUninstallCmd(false),
488 false, false, NULL); 488 false, false, NULL);
489 } 489 }
OLDNEW
« no previous file with comments | « chrome/installer/util/google_chrome_distribution.h ('k') | chrome/installer/util/google_chrome_distribution_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698