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 unofficial images, we always want to keep the crash reports unless | |
476 // we're testing the crash facilities themselves. | |
477 if (!IsOfficialBuild() && !IsCrashTestInProgress()) { | |
kmixter1
2011/02/23 04:49:02
Instead of IsOfficialBuild - could you use kLeaveC
thieule
2011/02/23 21:03:04
Done.
| |
478 feedback = true; | |
479 } | |
480 | |
475 if (feedback) { | 481 if (feedback) { |
476 count_crash_function_(); | 482 count_crash_function_(); |
477 | 483 |
478 if (generate_diagnostics_) { | 484 if (generate_diagnostics_) { |
479 bool out_of_capacity = false; | 485 bool out_of_capacity = false; |
480 bool convert_and_enqueue_result = | 486 bool convert_and_enqueue_result = |
481 ConvertAndEnqueueCrash(pid, exec, &out_of_capacity); | 487 ConvertAndEnqueueCrash(pid, exec, &out_of_capacity); |
482 if (!convert_and_enqueue_result) { | 488 if (!convert_and_enqueue_result) { |
483 if (!out_of_capacity) | 489 if (!out_of_capacity) |
484 EnqueueCollectionErrorLog(pid, exec); | 490 EnqueueCollectionErrorLog(pid, exec); |
485 return false; | 491 return false; |
486 } | 492 } |
487 } | 493 } |
488 } | 494 } |
489 | 495 |
490 return true; | 496 return true; |
491 } | 497 } |
OLD | NEW |