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

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

Issue 2372633002: Use the correct product/version for postmortem reports (Closed)
Patch Set: 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 // Note: aside from using windows headers to obtain the definitions of minidump 5 // Note: aside from using windows headers to obtain the definitions of minidump
6 // structures, nothing here is windows specific. This seems like the best 6 // structures, nothing here is windows specific. This seems like the best
7 // approach given this code is for temporary experimentation on Windows. 7 // approach given this code is for temporary experimentation on Windows.
8 // Longer term, Crashpad will take over the minidump writing in this case as 8 // Longer term, Crashpad will take over the minidump writing in this case as
9 // well. 9 // well.
10 10
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 // The directory entry for the stability report's stream. 190 // The directory entry for the stability report's stream.
191 RegisterDirectoryEntry(kStabilityReportStreamType, report_pos, 191 RegisterDirectoryEntry(kStabilityReportStreamType, report_pos,
192 serialized_report.length()); 192 serialized_report.length());
193 193
194 // Write mandatory crash keys. These will be read by crashpad and used as 194 // Write mandatory crash keys. These will be read by crashpad and used as
195 // http request parameters for the upload. Keys and values should match 195 // http request parameters for the upload. Keys and values should match
196 // server side configuration. 196 // server side configuration.
197 // TODO(manzagop): use product and version from the stability report. The 197 // TODO(manzagop): use product and version from the stability report. The
198 // current executable's values are an (imperfect) proxy. 198 // current executable's values are an (imperfect) proxy.
199 std::map<std::string, std::string> crash_keys = { 199 std::map<std::string, std::string> crash_keys = {
200 {"product", minidump_info.product_name + "_Postmortem"}, 200 {"product", minidump_info.product_name + "_Postmortem"},
grt (UTC plus 2) 2016/09/26 18:59:06 shouldn't this be "prod" (https://cs.chromium.org/
manzagop (departed) 2016/09/27 19:37:52 IIUC those are the deprecated keys, but it's proba
201 {"version", minidump_info.version_number}}; 201 {"version", minidump_info.version_number},
grt (UTC plus 2) 2016/09/26 18:59:06 "ver" (https://cs.chromium.org/chromium/src/compon
manzagop (departed) 2016/09/27 19:37:52 Done.
202 {"channel", minidump_info.channel_name},
203 {"plat", minidump_info.platform}};
202 if (!AppendCrashpadInfo(minidump_info.client_id, minidump_info.report_id, 204 if (!AppendCrashpadInfo(minidump_info.client_id, minidump_info.report_id,
203 crash_keys)) 205 crash_keys))
204 return false; 206 return false;
205 207
206 // Write the directory. 208 // Write the directory.
207 FilePosition directory_pos = 0U; 209 FilePosition directory_pos = 0U;
208 if (!AppendVec(directory_, &directory_pos)) 210 if (!AppendVec(directory_, &directory_pos))
209 return false; 211 return false;
210 212
211 // Write the header. 213 // Write the header.
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
404 } // namespace 406 } // namespace
405 407
406 bool WritePostmortemDump(base::PlatformFile minidump_file, 408 bool WritePostmortemDump(base::PlatformFile minidump_file,
407 const StabilityReport& report, 409 const StabilityReport& report,
408 const MinidumpInfo& minidump_info) { 410 const MinidumpInfo& minidump_info) {
409 PostmortemMinidumpWriter writer; 411 PostmortemMinidumpWriter writer;
410 return writer.WriteDump(minidump_file, report, minidump_info); 412 return writer.WriteDump(minidump_file, report, minidump_info);
411 } 413 }
412 414
413 } // namespace browser_watcher 415 } // namespace browser_watcher
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698