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 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 } else { | 108 } else { |
109 // Failed to get a temp dir, something's gone wrong. | 109 // Failed to get a temp dir, something's gone wrong. |
110 return; | 110 return; |
111 } | 111 } |
112 } | 112 } |
113 | 113 |
114 crash_reporter::InitializeCrashpadWithEmbeddedHandler(true, | 114 crash_reporter::InitializeCrashpadWithEmbeddedHandler(true, |
115 "Chrome Installer"); | 115 "Chrome Installer"); |
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 std::unique_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 { crash_keys::kMetricsClientId, crash_keys::kSmallSize }, | 126 { crash_keys::kMetricsClientId, crash_keys::kSmallSize }, |
127 { kCurrentVersion, crash_keys::kSmallSize }, | 127 { kCurrentVersion, crash_keys::kSmallSize }, |
128 { kDistributionType, crash_keys::kSmallSize }, | 128 { kDistributionType, crash_keys::kSmallSize }, |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
165 void SetCurrentVersionCrashKey(const base::Version* current_version) { | 165 void SetCurrentVersionCrashKey(const base::Version* current_version) { |
166 if (current_version) { | 166 if (current_version) { |
167 base::debug::SetCrashKeyValue(kCurrentVersion, | 167 base::debug::SetCrashKeyValue(kCurrentVersion, |
168 current_version->GetString()); | 168 current_version->GetString()); |
169 } else { | 169 } else { |
170 base::debug::ClearCrashKey(kCurrentVersion); | 170 base::debug::ClearCrashKey(kCurrentVersion); |
171 } | 171 } |
172 } | 172 } |
173 | 173 |
174 } // namespace installer | 174 } // namespace installer |
OLD | NEW |