Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "chrome/installer/setup/installer_crash_reporter_client.h" | 5 #include "chrome/installer/setup/installer_crash_reporter_client.h" |
| 6 | 6 |
| 7 #include "base/debug/crash_logging.h" | 7 #include "base/debug/crash_logging.h" |
| 8 #include "base/environment.h" | 8 #include "base/environment.h" |
| 9 #include "base/file_version_info.h" | 9 #include "base/file_version_info.h" |
| 10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
| 11 #include "base/path_service.h" | 11 #include "base/path_service.h" |
| 12 #include "base/strings/utf_string_conversions.h" | 12 #include "base/strings/utf_string_conversions.h" |
| 13 #include "base/win/registry.h" | 13 #include "base/win/registry.h" |
| 14 #include "chrome/common/chrome_paths.h" | 14 #include "chrome/common/chrome_paths.h" |
| 15 #include "chrome/common/chrome_version.h" | 15 #include "chrome/common/chrome_version.h" |
| 16 #include "chrome/common/env_vars.h" | 16 #include "chrome/common/env_vars.h" |
| 17 #include "chrome/install_static/install_util.h" | |
| 17 #include "chrome/installer/setup/installer_crash_reporting.h" | 18 #include "chrome/installer/setup/installer_crash_reporting.h" |
| 18 #include "chrome/installer/util/google_update_settings.h" | 19 #include "chrome/installer/util/google_update_settings.h" |
| 19 | 20 |
| 20 InstallerCrashReporterClient::InstallerCrashReporterClient( | 21 InstallerCrashReporterClient::InstallerCrashReporterClient( |
| 21 bool is_per_user_install) | 22 bool is_per_user_install) |
| 22 : is_per_user_install_(is_per_user_install) { | 23 : is_per_user_install_(is_per_user_install) { |
| 23 } | 24 } |
| 24 | 25 |
| 25 InstallerCrashReporterClient::~InstallerCrashReporterClient() = default; | 26 InstallerCrashReporterClient::~InstallerCrashReporterClient() = default; |
| 26 | 27 |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 116 | 117 |
| 117 bool InstallerCrashReporterClient::GetCollectStatsConsent() { | 118 bool InstallerCrashReporterClient::GetCollectStatsConsent() { |
| 118 #if defined(GOOGLE_CHROME_BUILD) | 119 #if defined(GOOGLE_CHROME_BUILD) |
| 119 return GoogleUpdateSettings::GetCollectStatsConsentAtLevel( | 120 return GoogleUpdateSettings::GetCollectStatsConsentAtLevel( |
| 120 !is_per_user_install_); | 121 !is_per_user_install_); |
| 121 #else | 122 #else |
| 122 return false; | 123 return false; |
| 123 #endif | 124 #endif |
| 124 } | 125 } |
| 125 | 126 |
| 127 bool InstallerCrashReporterClient::GetCollectStatsInSample() { | |
| 128 return install_static::GetCollectStatsInSample(); | |
|
grt (UTC plus 2)
2016/10/24 09:34:33
it looks like install_static::GetCollectStatsInSam
jwd
2016/10/24 21:28:52
Done.
| |
| 129 } | |
| 130 | |
| 126 bool InstallerCrashReporterClient::ReportingIsEnforcedByPolicy(bool* enabled) { | 131 bool InstallerCrashReporterClient::ReportingIsEnforcedByPolicy(bool* enabled) { |
| 127 // From the generated policy/policy/policy_constants.cc: | 132 // From the generated policy/policy/policy_constants.cc: |
| 128 #if defined(GOOGLE_CHROME_BUILD) | 133 #if defined(GOOGLE_CHROME_BUILD) |
| 129 static const wchar_t kRegistryChromePolicyKey[] = | 134 static const wchar_t kRegistryChromePolicyKey[] = |
| 130 L"SOFTWARE\\Policies\\Google\\Chrome"; | 135 L"SOFTWARE\\Policies\\Google\\Chrome"; |
| 131 #else | 136 #else |
| 132 static const wchar_t kRegistryChromePolicyKey[] = | 137 static const wchar_t kRegistryChromePolicyKey[] = |
| 133 L"SOFTWARE\\Policies\\Chromium"; | 138 L"SOFTWARE\\Policies\\Chromium"; |
| 134 #endif | 139 #endif |
| 135 static const wchar_t kMetricsReportingEnabled[] = L"MetricsReportingEnabled"; | 140 static const wchar_t kMetricsReportingEnabled[] = L"MetricsReportingEnabled"; |
| (...skipping 16 matching lines...) Expand all Loading... | |
| 152 } | 157 } |
| 153 } | 158 } |
| 154 | 159 |
| 155 return false; | 160 return false; |
| 156 } | 161 } |
| 157 | 162 |
| 158 bool InstallerCrashReporterClient::EnableBreakpadForProcess( | 163 bool InstallerCrashReporterClient::EnableBreakpadForProcess( |
| 159 const std::string& process_type) { | 164 const std::string& process_type) { |
| 160 return true; | 165 return true; |
| 161 } | 166 } |
| OLD | NEW |