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

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: moved allocator create/destroy to be beside snapshot (simpler code) 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
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 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 GoogleUpdateSettings::LoadMetricsClientInfo(); 114 GoogleUpdateSettings::LoadMetricsClientInfo();
115 if (client_info) 115 if (client_info)
116 crash_client->SetCrashReporterClientIdFromGUID(client_info->client_id); 116 crash_client->SetCrashReporterClientIdFromGUID(client_info->client_id);
117 // TODO(grt): A lack of a client_id at this point generally means that Chrome 117 // TODO(grt): A lack of a client_id at this point generally means that Chrome
118 // has yet to have been launched and picked one. Consider creating it and 118 // has yet to have been launched and picked one. Consider creating it and
119 // setting it here for Chrome to use. 119 // setting it here for Chrome to use.
120 } 120 }
121 121
122 size_t RegisterCrashKeys() { 122 size_t RegisterCrashKeys() {
123 const base::debug::CrashKey kFixedKeys[] = { 123 const base::debug::CrashKey kFixedKeys[] = {
124 #if defined(OS_MACOSX) || defined(OS_WIN)
grt (UTC plus 2) 2016/02/04 15:36:42 this file is exclusively OS_WIN, so there's no nee
bcwhite 2016/02/04 21:51:13 This whole file will not be in the final submit.
grt (UTC plus 2) 2016/02/08 18:09:18 Gotcha. That other CL landed, so you should be abl
bcwhite 2016/02/09 21:08:45 Done.
125 { crash_keys::kMetricsClientId, crash_keys::kSmallSize },
126 #else
124 { crash_keys::kClientId, crash_keys::kSmallSize }, 127 { crash_keys::kClientId, crash_keys::kSmallSize },
128 #endif
125 { kCurrentVersion, crash_keys::kSmallSize }, 129 { kCurrentVersion, crash_keys::kSmallSize },
126 { kDistributionType, crash_keys::kSmallSize }, 130 { kDistributionType, crash_keys::kSmallSize },
127 { kIsMultiInstall, crash_keys::kSmallSize }, 131 { kIsMultiInstall, crash_keys::kSmallSize },
128 { kIsSystemLevel, crash_keys::kSmallSize }, 132 { kIsSystemLevel, crash_keys::kSmallSize },
129 { kOperation, crash_keys::kSmallSize }, 133 { kOperation, crash_keys::kSmallSize },
130 134
131 // This is a Windows registry key, which maxes out at 255 chars. 135 // This is a Windows registry key, which maxes out at 255 chars.
132 // (kMediumSize actually maxes out at 252 chars on Windows, but potentially 136 // (kMediumSize actually maxes out at 252 chars on Windows, but potentially
133 // truncating such a small amount is a fair tradeoff compared to using 137 // truncating such a small amount is a fair tradeoff compared to using
134 // kLargeSize, which is wasteful.) 138 // kLargeSize, which is wasteful.)
(...skipping 28 matching lines...) Expand all
163 void SetCurrentVersionCrashKey(const base::Version* current_version) { 167 void SetCurrentVersionCrashKey(const base::Version* current_version) {
164 if (current_version) { 168 if (current_version) {
165 base::debug::SetCrashKeyValue(kCurrentVersion, 169 base::debug::SetCrashKeyValue(kCurrentVersion,
166 current_version->GetString()); 170 current_version->GetString());
167 } else { 171 } else {
168 base::debug::ClearCrashKey(kCurrentVersion); 172 base::debug::ClearCrashKey(kCurrentVersion);
169 } 173 }
170 } 174 }
171 175
172 } // namespace installer 176 } // namespace installer
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698