| Index: chrome/installer/setup/installer_crash_reporter_client.cc
|
| diff --git a/chrome/installer/setup/installer_crash_reporter_client.cc b/chrome/installer/setup/installer_crash_reporter_client.cc
|
| index 3d9cd9a5266834244234bf09094a31316ab64d10..2bbe994b96a968e4910f48eb53199cf0a51ecdce 100644
|
| --- a/chrome/installer/setup/installer_crash_reporter_client.cc
|
| +++ b/chrome/installer/setup/installer_crash_reporter_client.cc
|
| @@ -14,7 +14,9 @@
|
| #include "chrome/common/chrome_paths.h"
|
| #include "chrome/common/chrome_version.h"
|
| #include "chrome/common/env_vars.h"
|
| +#include "chrome/install_static/install_util.h"
|
| #include "chrome/installer/setup/installer_crash_reporting.h"
|
| +#include "chrome/installer/util/browser_distribution.h"
|
| #include "chrome/installer/util/google_update_settings.h"
|
|
|
| InstallerCrashReporterClient::InstallerCrashReporterClient(
|
| @@ -123,6 +125,21 @@ bool InstallerCrashReporterClient::GetCollectStatsConsent() {
|
| #endif
|
| }
|
|
|
| +bool InstallerCrashReporterClient::GetCollectStatsInSample() {
|
| + // TODO(grt): remove duplication of code.
|
| + BrowserDistribution* dist = BrowserDistribution::GetDistribution();
|
| + base::win::RegKey key(HKEY_CURRENT_USER, dist->GetRegistryPath().c_str(),
|
| + KEY_QUERY_VALUE | KEY_WOW64_32KEY);
|
| + if (!key.Valid())
|
| + return true;
|
| + DWORD out_value = 0;
|
| + if (key.ReadValueDW(install_static::kRegValueChromeStatsSample, &out_value) !=
|
| + ERROR_SUCCESS) {
|
| + return true;
|
| + }
|
| + return out_value == 1;
|
| +}
|
| +
|
| bool InstallerCrashReporterClient::ReportingIsEnforcedByPolicy(bool* enabled) {
|
| // From the generated policy/policy/policy_constants.cc:
|
| #if defined(GOOGLE_CHROME_BUILD)
|
|
|