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

Side by Side Diff: user_collector.cc

Issue 3820004: crash-reporter: send payload sizes to help diagnose corruption (Closed) Base URL: http://git.chromium.org/git/crash-reporter.git
Patch Set: Created 10 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 | Annotate | Revision Log
« no previous file with comments | « kernel_collector.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium OS Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium OS 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 "crash-reporter/user_collector.h" 5 #include "crash-reporter/user_collector.h"
6 6
7 #include <grp.h> // For struct group. 7 #include <grp.h> // For struct group.
8 #include <pwd.h> // For struct passwd. 8 #include <pwd.h> // For struct passwd.
9 #include <sys/types.h> // For getpwuid_r and getgrnam_r. 9 #include <sys/types.h> // For getpwuid_r and getgrnam_r.
10 10
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after
271 container_dir, // procfs directory 271 container_dir, // procfs directory
272 minidump_path, 272 minidump_path,
273 container_dir)) { // temporary directory 273 container_dir)) { // temporary directory
274 // Note we leave the container directory for inspection. 274 // Note we leave the container directory for inspection.
275 conversion_result = false; 275 conversion_result = false;
276 } 276 }
277 277
278 WriteCrashMetaData( 278 WriteCrashMetaData(
279 crash_path.Append( 279 crash_path.Append(
280 StringPrintf("%s.meta", dump_basename.c_str())), 280 StringPrintf("%s.meta", dump_basename.c_str())),
281 exec_name); 281 exec_name,
282 minidump_path.value());
282 283
283 if (conversion_result) { 284 if (conversion_result) {
284 logger_->LogInfo("Stored minidump to %s", minidump_path.value().c_str()); 285 logger_->LogInfo("Stored minidump to %s", minidump_path.value().c_str());
285 } 286 }
286 287
287 if (!file_util::PathExists(FilePath(kLeaveCoreFile))) { 288 if (!file_util::PathExists(FilePath(kLeaveCoreFile))) {
288 file_util::Delete(core_path, false); 289 file_util::Delete(core_path, false);
289 } else { 290 } else {
290 logger_->LogInfo("Leaving core file at %s", core_path.value().c_str()); 291 logger_->LogInfo("Leaving core file at %s", core_path.value().c_str());
291 } 292 }
(...skipping 18 matching lines...) Expand all
310 311
311 if (feedback) { 312 if (feedback) {
312 count_crash_function_(); 313 count_crash_function_();
313 314
314 if (generate_diagnostics_) { 315 if (generate_diagnostics_) {
315 return GenerateDiagnostics(pid, exec); 316 return GenerateDiagnostics(pid, exec);
316 } 317 }
317 } 318 }
318 return true; 319 return true;
319 } 320 }
OLDNEW
« no previous file with comments | « kernel_collector.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698