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

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

Issue 1537743006: Persist setup metrics and have Chrome report them during UMA upload. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@shared-histograms
Patch Set: fixed test Created 4 years, 10 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
« no previous file with comments | « chrome/installer/setup/BUILD.gn ('k') | chrome/installer/setup/installer_metrics.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_reporting.h" 5 #include "chrome/installer/setup/installer_crash_reporting.h"
6 6
7 #include <iterator> 7 #include <iterator>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 116
117 // Set up the metrics client id (a la child_process_logging::Init()). 117 // Set up the metrics client id (a la child_process_logging::Init()).
118 scoped_ptr<metrics::ClientInfo> client_info = 118 scoped_ptr<metrics::ClientInfo> client_info =
119 GoogleUpdateSettings::LoadMetricsClientInfo(); 119 GoogleUpdateSettings::LoadMetricsClientInfo();
120 if (client_info) 120 if (client_info)
121 crash_keys::SetMetricsClientIdFromGUID(client_info->client_id); 121 crash_keys::SetMetricsClientIdFromGUID(client_info->client_id);
122 } 122 }
123 123
124 size_t RegisterCrashKeys() { 124 size_t RegisterCrashKeys() {
125 const base::debug::CrashKey kFixedKeys[] = { 125 const base::debug::CrashKey kFixedKeys[] = {
126 #if defined(OS_MACOSX) || defined(OS_WIN)
grt (UTC plus 2) 2016/02/10 16:01:53 stale line
126 { crash_keys::kMetricsClientId, crash_keys::kSmallSize }, 127 { crash_keys::kMetricsClientId, crash_keys::kSmallSize },
127 { kCurrentVersion, crash_keys::kSmallSize }, 128 { kCurrentVersion, crash_keys::kSmallSize },
128 { kDistributionType, crash_keys::kSmallSize }, 129 { kDistributionType, crash_keys::kSmallSize },
129 { kIsMultiInstall, crash_keys::kSmallSize }, 130 { kIsMultiInstall, crash_keys::kSmallSize },
130 { kIsSystemLevel, crash_keys::kSmallSize }, 131 { kIsSystemLevel, crash_keys::kSmallSize },
131 { kOperation, crash_keys::kSmallSize }, 132 { kOperation, crash_keys::kSmallSize },
132 133
133 // This is a Windows registry key, which maxes out at 255 chars. 134 // This is a Windows registry key, which maxes out at 255 chars.
134 // (kMediumSize actually maxes out at 252 chars on Windows, but potentially 135 // (kMediumSize actually maxes out at 252 chars on Windows, but potentially
135 // truncating such a small amount is a fair tradeoff compared to using 136 // truncating such a small amount is a fair tradeoff compared to using
(...skipping 29 matching lines...) Expand all
165 void SetCurrentVersionCrashKey(const base::Version* current_version) { 166 void SetCurrentVersionCrashKey(const base::Version* current_version) {
166 if (current_version) { 167 if (current_version) {
167 base::debug::SetCrashKeyValue(kCurrentVersion, 168 base::debug::SetCrashKeyValue(kCurrentVersion,
168 current_version->GetString()); 169 current_version->GetString());
169 } else { 170 } else {
170 base::debug::ClearCrashKey(kCurrentVersion); 171 base::debug::ClearCrashKey(kCurrentVersion);
171 } 172 }
172 } 173 }
173 174
174 } // namespace installer 175 } // namespace installer
OLDNEW
« no previous file with comments | « chrome/installer/setup/BUILD.gn ('k') | chrome/installer/setup/installer_metrics.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698