| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium 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 "components/crash/content/app/crashpad.h" | 5 #include "components/crash/content/app/crashpad.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <string.h> | 8 #include <string.h> |
| 9 | 9 |
| 10 #if BUILDFLAG(ENABLE_KASKO) | 10 #if BUILDFLAG(ENABLE_KASKO) |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 93 std::string message = base::StringPrintf("%s:%d: %s", file, line, | 93 std::string message = base::StringPrintf("%s:%d: %s", file, line, |
| 94 string.c_str() + message_start); | 94 string.c_str() + message_start); |
| 95 SetCrashKeyValue("LOG_FATAL", message); | 95 SetCrashKeyValue("LOG_FATAL", message); |
| 96 | 96 |
| 97 // Rather than including the code to force the crash here, allow the caller to | 97 // Rather than including the code to force the crash here, allow the caller to |
| 98 // do it. | 98 // do it. |
| 99 return false; | 99 return false; |
| 100 } | 100 } |
| 101 | 101 |
| 102 void DumpWithoutCrashing() { | 102 void DumpWithoutCrashing() { |
| 103 CRASHPAD_SIMULATE_CRASH(); | 103 //CRASHPAD_SIMULATE_CRASH(); |
| 104 } | 104 } |
| 105 | 105 |
| 106 #if BUILDFLAG(ENABLE_KASKO) | 106 #if BUILDFLAG(ENABLE_KASKO) |
| 107 // TODO(ananta) | 107 // TODO(ananta) |
| 108 // We cannot depend on functionality in base which pulls in dependencies on | 108 // We cannot depend on functionality in base which pulls in dependencies on |
| 109 // user32 directly or indirectly. The GetLoadedModulesSnapshot is a copy of the | 109 // user32 directly or indirectly. The GetLoadedModulesSnapshot is a copy of the |
| 110 // function in base/win/win_util.cc. Depending on the base function pulls in | 110 // function in base/win/win_util.cc. Depending on the base function pulls in |
| 111 // dependencies on user32 due to other functionality in win_util.cc. This | 111 // dependencies on user32 due to other functionality in win_util.cc. This |
| 112 // function should be removed when KASKO is removed. | 112 // function should be removed when KASKO is removed. |
| 113 bool GetLoadedModulesSnapshot(HANDLE process, std::vector<HMODULE>* snapshot) { | 113 bool GetLoadedModulesSnapshot(HANDLE process, std::vector<HMODULE>* snapshot) { |
| (...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 475 base::UTF16ToUTF8(value)); | 475 base::UTF16ToUTF8(value)); |
| 476 } | 476 } |
| 477 | 477 |
| 478 void __declspec(dllexport) __cdecl ClearCrashKeyValueImpl(const wchar_t* key) { | 478 void __declspec(dllexport) __cdecl ClearCrashKeyValueImpl(const wchar_t* key) { |
| 479 crash_reporter::ClearCrashKey(base::UTF16ToUTF8(key)); | 479 crash_reporter::ClearCrashKey(base::UTF16ToUTF8(key)); |
| 480 } | 480 } |
| 481 | 481 |
| 482 } // extern "C" | 482 } // extern "C" |
| 483 | 483 |
| 484 #endif // OS_WIN | 484 #endif // OS_WIN |
| OLD | NEW |