| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |