OLD | NEW |
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 <pcrecpp.h> | 8 #include <pcrecpp.h> |
9 #include <pcrecpp.h> | 9 #include <pcrecpp.h> |
10 #include <pwd.h> // For struct passwd. | 10 #include <pwd.h> // For struct passwd. |
(...skipping 454 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
465 // crashes towards user crashes, so user crashes really mean non-Chrome | 465 // crashes towards user crashes, so user crashes really mean non-Chrome |
466 // user-space crashes. | 466 // user-space crashes. |
467 if (exec == "chrome" || exec == "supplied_chrome") { | 467 if (exec == "chrome" || exec == "supplied_chrome") { |
468 feedback = false; | 468 feedback = false; |
469 handling_string = "ignoring - chrome crash"; | 469 handling_string = "ignoring - chrome crash"; |
470 } | 470 } |
471 | 471 |
472 logger_->LogWarning("Received crash notification for %s[%d] sig %d (%s)", | 472 logger_->LogWarning("Received crash notification for %s[%d] sig %d (%s)", |
473 exec.c_str(), pid, signal, handling_string); | 473 exec.c_str(), pid, signal, handling_string); |
474 | 474 |
475 // For developer builds, we always want to keep the crash reports unless | |
476 // we're testing the crash facilities themselves. | |
477 if (file_util::PathExists(FilePath(kLeaveCoreFile)) && | |
478 !IsCrashTestInProgress()) { | |
479 feedback = true; | |
480 } | |
481 | |
482 if (feedback) { | 475 if (feedback) { |
483 count_crash_function_(); | 476 count_crash_function_(); |
484 | 477 |
485 if (generate_diagnostics_) { | 478 if (generate_diagnostics_) { |
486 bool out_of_capacity = false; | 479 bool out_of_capacity = false; |
487 bool convert_and_enqueue_result = | 480 bool convert_and_enqueue_result = |
488 ConvertAndEnqueueCrash(pid, exec, &out_of_capacity); | 481 ConvertAndEnqueueCrash(pid, exec, &out_of_capacity); |
489 if (!convert_and_enqueue_result) { | 482 if (!convert_and_enqueue_result) { |
490 if (!out_of_capacity) | 483 if (!out_of_capacity) |
491 EnqueueCollectionErrorLog(pid, exec); | 484 EnqueueCollectionErrorLog(pid, exec); |
492 return false; | 485 return false; |
493 } | 486 } |
494 } | 487 } |
495 } | 488 } |
496 | 489 |
497 return true; | 490 return true; |
498 } | 491 } |
OLD | NEW |