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_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 Loading... | |
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 Loading... | |
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 |
OLD | NEW |