| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 // This module contains the necessary code to register the Breakpad exception | 5 // This module contains the necessary code to register the Breakpad exception |
| 6 // handler. This implementation is based on Chrome's crash reporting code. | 6 // handler. This implementation is based on Chrome's crash reporting code. |
| 7 | 7 |
| 8 #include "chrome_elf/breakpad.h" | 8 #include "chrome_elf/breakpad.h" |
| 9 | 9 |
| 10 #include <sddl.h> | 10 #include <sddl.h> |
| 11 | 11 |
| 12 #include "base/macros.h" | 12 #include "base/macros.h" |
| 13 #include "breakpad/src/client/windows/handler/exception_handler.h" | 13 #include "breakpad/src/client/windows/handler/exception_handler.h" |
| 14 #include "chrome/common/chrome_version.h" | 14 #include "chrome/common/chrome_version.h" |
| 15 #include "chrome_elf/chrome_elf_util.h" | 15 #include "chrome/install_static/install_util.h" |
| 16 | 16 |
| 17 google_breakpad::ExceptionHandler* g_elf_breakpad = NULL; | 17 google_breakpad::ExceptionHandler* g_elf_breakpad = NULL; |
| 18 | 18 |
| 19 namespace { | 19 namespace { |
| 20 | 20 |
| 21 const wchar_t kBreakpadProductName[] = L"Chrome"; | 21 const wchar_t kBreakpadProductName[] = L"Chrome"; |
| 22 const wchar_t kBreakpadVersionEntry[] = L"ver"; | 22 const wchar_t kBreakpadVersionEntry[] = L"ver"; |
| 23 const wchar_t kBreakpadProdEntry[] = L"prod"; | 23 const wchar_t kBreakpadProdEntry[] = L"prod"; |
| 24 const wchar_t kBreakpadPlatformEntry[] = L"plat"; | 24 const wchar_t kBreakpadPlatformEntry[] = L"plat"; |
| 25 const wchar_t kBreakpadPlatformWin32[] = L"Win32"; | 25 const wchar_t kBreakpadPlatformWin32[] = L"Win32"; |
| (...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 183 google_breakpad::ExceptionHandler::HANDLER_ALL, | 183 google_breakpad::ExceptionHandler::HANDLER_ALL, |
| 184 dump_type, | 184 dump_type, |
| 185 pipe_name.c_str(), | 185 pipe_name.c_str(), |
| 186 GetCustomInfo()); | 186 GetCustomInfo()); |
| 187 | 187 |
| 188 if (g_elf_breakpad->IsOutOfProcess()) { | 188 if (g_elf_breakpad->IsOutOfProcess()) { |
| 189 // Tells breakpad to handle breakpoint and single step exceptions. | 189 // Tells breakpad to handle breakpoint and single step exceptions. |
| 190 g_elf_breakpad->set_handle_debug_exceptions(true); | 190 g_elf_breakpad->set_handle_debug_exceptions(true); |
| 191 } | 191 } |
| 192 } | 192 } |
| OLD | NEW |