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

Side by Side Diff: components/browser_watcher/postmortem_report_collector.cc

Issue 2372633002: Use the correct product/version for postmortem reports (Closed)
Patch Set: Direct access to GetExecutableVersionDetails via ChromePostmortemReportCollector Created 4 years, 2 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "components/browser_watcher/postmortem_report_collector.h" 5 #include "components/browser_watcher/postmortem_report_collector.h"
6 6
7 #include <string>
7 #include <utility> 8 #include <utility>
8 9
9 #include "base/debug/activity_analyzer.h" 10 #include "base/debug/activity_analyzer.h"
10 #include "base/files/file_enumerator.h" 11 #include "base/files/file_enumerator.h"
11 #include "base/files/file_util.h" 12 #include "base/files/file_util.h"
12 #include "base/logging.h" 13 #include "base/logging.h"
13 #include "base/metrics/histogram_macros.h" 14 #include "base/metrics/histogram_macros.h"
14 #include "base/path_service.h" 15 #include "base/path_service.h"
15 #include "components/browser_watcher/postmortem_minidump_writer.h" 16 #include "components/browser_watcher/postmortem_minidump_writer.h"
16 #include "components/version_info/version_info.h"
17 #include "third_party/crashpad/crashpad/client/settings.h" 17 #include "third_party/crashpad/crashpad/client/settings.h"
18 #include "third_party/crashpad/crashpad/util/misc/uuid.h" 18 #include "third_party/crashpad/crashpad/util/misc/uuid.h"
19 19
20 using base::FilePath; 20 using base::FilePath;
21 21
22 namespace browser_watcher { 22 namespace browser_watcher {
23 23
24 using base::debug::GlobalActivityAnalyzer; 24 using base::debug::GlobalActivityAnalyzer;
25 using base::debug::ThreadActivityAnalyzer; 25 using base::debug::ThreadActivityAnalyzer;
26 using crashpad::CrashReportDatabase; 26 using crashpad::CrashReportDatabase;
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 } 183 }
184 184
185 bool PostmortemReportCollector::WriteReportToMinidump( 185 bool PostmortemReportCollector::WriteReportToMinidump(
186 const StabilityReport& report, 186 const StabilityReport& report,
187 const crashpad::UUID& client_id, 187 const crashpad::UUID& client_id,
188 const crashpad::UUID& report_id, 188 const crashpad::UUID& report_id,
189 base::PlatformFile minidump_file) { 189 base::PlatformFile minidump_file) {
190 MinidumpInfo minidump_info; 190 MinidumpInfo minidump_info;
191 minidump_info.client_id = client_id; 191 minidump_info.client_id = client_id;
192 minidump_info.report_id = report_id; 192 minidump_info.report_id = report_id;
193 minidump_info.product_name = version_info::GetProductName(); 193 minidump_info.product_name = GetProductName();
194 minidump_info.version_number = version_info::GetVersionNumber(); 194 minidump_info.version_number = GetProductVersion();
195 minidump_info.channel_name = GetProductChannel();
196 #if defined(ARCH_CPU_X86)
197 minidump_info.platform = std::string("Win32");
198 #elif defined(ARCH_CPU_X86_64)
199 minidump_info.platform = std::string("Win64");
200 #endif
195 201
196 return WritePostmortemDump(minidump_file, report, minidump_info); 202 return WritePostmortemDump(minidump_file, report, minidump_info);
197 } 203 }
198 204
199 } // namespace browser_watcher 205 } // namespace browser_watcher
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698