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

Side by Side Diff: chrome/installer/setup/installer_crash_reporter_client.cc

Issue 1475643004: Add crash keys for the installer covering simple InstallerState fields. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Move include file to fix last nit Created 5 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
« no previous file with comments | « chrome/installer/setup/BUILD.gn ('k') | chrome/installer/setup/installer_crash_reporting.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/path_service.h" 10 #include "base/path_service.h"
11 #include "base/strings/utf_string_conversions.h" 11 #include "base/strings/utf_string_conversions.h"
12 #include "base/win/registry.h" 12 #include "base/win/registry.h"
13 #include "chrome/common/chrome_paths.h" 13 #include "chrome/common/chrome_paths.h"
14 #include "chrome/common/chrome_version.h" 14 #include "chrome/common/chrome_version.h"
15 #include "chrome/common/env_vars.h" 15 #include "chrome/common/env_vars.h"
16 #include "chrome/installer/setup/installer_crash_reporting.h"
16 #include "chrome/installer/util/google_update_settings.h" 17 #include "chrome/installer/util/google_update_settings.h"
17 #include "components/crash/core/common/crash_keys.h" 18 #include "components/crash/core/common/crash_keys.h"
18 19
19 InstallerCrashReporterClient::InstallerCrashReporterClient( 20 InstallerCrashReporterClient::InstallerCrashReporterClient(
20 bool is_per_user_install) 21 bool is_per_user_install)
21 : is_per_user_install_(is_per_user_install) { 22 : is_per_user_install_(is_per_user_install) {
22 } 23 }
23 24
24 InstallerCrashReporterClient::~InstallerCrashReporterClient() = default; 25 InstallerCrashReporterClient::~InstallerCrashReporterClient() = default;
25 26
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 } 118 }
118 119
119 bool InstallerCrashReporterClient::GetCrashDumpLocation( 120 bool InstallerCrashReporterClient::GetCrashDumpLocation(
120 base::FilePath* crash_dir) { 121 base::FilePath* crash_dir) {
121 // TODO(grt): Is there a reason to support the BREAKPAD_DUMP_LOCATION 122 // TODO(grt): Is there a reason to support the BREAKPAD_DUMP_LOCATION
122 // environment variable? 123 // environment variable?
123 return PathService::Get(chrome::DIR_CRASH_DUMPS, crash_dir); 124 return PathService::Get(chrome::DIR_CRASH_DUMPS, crash_dir);
124 } 125 }
125 126
126 size_t InstallerCrashReporterClient::RegisterCrashKeys() { 127 size_t InstallerCrashReporterClient::RegisterCrashKeys() {
127 const base::debug::CrashKey kKeys[] = { 128 return installer::RegisterCrashKeys();
128 { crash_keys::kClientId, crash_keys::kSmallSize },
129 };
130
131 return base::debug::InitCrashKeys(&kKeys[0], arraysize(kKeys),
132 crash_keys::kChunkMaxLength);
133 } 129 }
134 130
135 bool InstallerCrashReporterClient::IsRunningUnattended() { 131 bool InstallerCrashReporterClient::IsRunningUnattended() {
136 scoped_ptr<base::Environment> env(base::Environment::Create()); 132 scoped_ptr<base::Environment> env(base::Environment::Create());
137 return env->HasVar(env_vars::kHeadless); 133 return env->HasVar(env_vars::kHeadless);
138 } 134 }
139 135
140 bool InstallerCrashReporterClient::GetCollectStatsConsent() { 136 bool InstallerCrashReporterClient::GetCollectStatsConsent() {
141 #if defined(GOOGLE_CHROME_BUILD) 137 #if defined(GOOGLE_CHROME_BUILD)
142 return GoogleUpdateSettings::GetCollectStatsConsentAtLevel( 138 return GoogleUpdateSettings::GetCollectStatsConsentAtLevel(
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 } 172 }
177 } 173 }
178 174
179 return false; 175 return false;
180 } 176 }
181 177
182 bool InstallerCrashReporterClient::EnableBreakpadForProcess( 178 bool InstallerCrashReporterClient::EnableBreakpadForProcess(
183 const std::string& process_type) { 179 const std::string& process_type) {
184 return true; 180 return true;
185 } 181 }
OLDNEW
« no previous file with comments | « chrome/installer/setup/BUILD.gn ('k') | chrome/installer/setup/installer_crash_reporting.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698