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 449 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
460 // crashes towards user crashes, so user crashes really mean non-Chrome | 460 // crashes towards user crashes, so user crashes really mean non-Chrome |
461 // user-space crashes. | 461 // user-space crashes. |
462 if (exec == "chrome" || exec == "supplied_chrome") { | 462 if (exec == "chrome" || exec == "supplied_chrome") { |
463 feedback = false; | 463 feedback = false; |
464 handling_string = "ignoring - chrome crash"; | 464 handling_string = "ignoring - chrome crash"; |
465 } | 465 } |
466 | 466 |
467 LOG(WARNING) << "Received crash notification for " << exec << "[" << pid | 467 LOG(WARNING) << "Received crash notification for " << exec << "[" << pid |
468 << "] sig " << signal << " (" << handling_string << ")"; | 468 << "] sig " << signal << " (" << handling_string << ")"; |
469 | 469 |
| 470 // For developer builds, we always want to keep the crash reports unless |
| 471 // we're testing the crash facilities themselves. |
| 472 if (file_util::PathExists(FilePath(kLeaveCoreFile)) && |
| 473 !IsCrashTestInProgress()) { |
| 474 feedback = true; |
| 475 } |
| 476 |
470 if (feedback) { | 477 if (feedback) { |
471 count_crash_function_(); | 478 count_crash_function_(); |
472 | 479 |
473 if (generate_diagnostics_) { | 480 if (generate_diagnostics_) { |
474 bool out_of_capacity = false; | 481 bool out_of_capacity = false; |
475 bool convert_and_enqueue_result = | 482 bool convert_and_enqueue_result = |
476 ConvertAndEnqueueCrash(pid, exec, &out_of_capacity); | 483 ConvertAndEnqueueCrash(pid, exec, &out_of_capacity); |
477 if (!convert_and_enqueue_result) { | 484 if (!convert_and_enqueue_result) { |
478 if (!out_of_capacity) | 485 if (!out_of_capacity) |
479 EnqueueCollectionErrorLog(pid, exec); | 486 EnqueueCollectionErrorLog(pid, exec); |
480 return false; | 487 return false; |
481 } | 488 } |
482 } | 489 } |
483 } | 490 } |
484 | 491 |
485 return true; | 492 return true; |
486 } | 493 } |
OLD | NEW |