Chromium Code Reviews| Index: components/crash/content/app/crashpad.cc |
| diff --git a/components/crash/content/app/crashpad.cc b/components/crash/content/app/crashpad.cc |
| index 76f67348ab0fcb6cd0e7ed3412a410d31be569da..15adb565c6250a3d3d7dac1c9437fea3311d43ac 100644 |
| --- a/components/crash/content/app/crashpad.cc |
| +++ b/components/crash/content/app/crashpad.cc |
| @@ -52,44 +52,6 @@ void ClearCrashKey(const base::StringPiece& key) { |
| g_simple_string_dictionary->RemoveKey(key.data()); |
| } |
| -bool LogMessageHandler(int severity, |
| - const char* file, |
| - int line, |
| - size_t message_start, |
| - const std::string& string) { |
| - // Only handle FATAL. |
| - if (severity != logging::LOG_FATAL) { |
| - return false; |
| - } |
| - |
| - // In case of an out-of-memory condition, this code could be reentered when |
| - // constructing and storing the key. Using a static is not thread-safe, but if |
| - // multiple threads are in the process of a fatal crash at the same time, this |
| - // should work. |
| - static bool guarded = false; |
| - if (guarded) { |
| - return false; |
| - } |
| - base::AutoReset<bool> guard(&guarded, true); |
| - |
| - // Only log last path component. This matches logging.cc. |
| - if (file) { |
| - const char* slash = strrchr(file, '/'); |
| - if (slash) { |
| - file = slash + 1; |
| - } |
| - } |
| - |
| - CHECK_LE(message_start, string.size()); |
| - std::string message = base::StringPrintf("%s:%d: %s", file, line, |
| - string.c_str() + message_start); |
| - SetCrashKeyValue("LOG_FATAL", message); |
| - |
| - // Rather than including the code to force the crash here, allow the caller to |
| - // do it. |
| - return false; |
| -} |
| - |
| void DumpWithoutCrashing() { |
| CRASHPAD_SIMULATE_CRASH(); |
| } |
| @@ -164,8 +126,6 @@ void InitializeCrashpadImpl(bool initial_client, |
| SetCrashKeyValue("pid", base::IntToString(::GetCurrentProcessId())); |
| #endif |
| - logging::SetLogMessageHandler(LogMessageHandler); |
|
scottmg
2016/10/05 22:06:21
Does this do anything here for logging that does a
rkuksin
2016/10/06 08:50:33
base::debug::SetCrashKeyReportingFunctions subtitu
|
| - |
| // If clients called CRASHPAD_SIMULATE_CRASH() instead of |
| // base::debug::DumpWithoutCrashing(), these dumps would appear as crashes in |
| // the correct function, at the correct file and line. This would be |