OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/app/hard_error_handler_win.h" | 5 #include "components/crash/app/hard_error_handler_win.h" |
6 | 6 |
7 #include <DelayIMP.h> | 7 #include <DelayIMP.h> |
8 #include <winternl.h> | 8 #include <winternl.h> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 nt_status, | 48 nt_status, |
49 MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), | 49 MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), |
50 reinterpret_cast<wchar_t*>(&msg_template), | 50 reinterpret_cast<wchar_t*>(&msg_template), |
51 0, | 51 0, |
52 NULL); | 52 NULL); |
53 | 53 |
54 if (!count) | 54 if (!count) |
55 return; | 55 return; |
56 count += p1.size() + p2.size() + 1; | 56 count += p1.size() + p2.size() + 1; |
57 base::string16 message; | 57 base::string16 message; |
58 ::wsprintf(WriteInto(&message, count), msg_template, p1.c_str(), p2.c_str()); | 58 ::wsprintf(base::WriteInto(&message, count), msg_template, |
| 59 p1.c_str(), p2.c_str()); |
59 // The MB_SERVICE_NOTIFICATION causes this message to be displayed by | 60 // The MB_SERVICE_NOTIFICATION causes this message to be displayed by |
60 // csrss. This means that we are not creating windows or pumping WM messages | 61 // csrss. This means that we are not creating windows or pumping WM messages |
61 // in this process. | 62 // in this process. |
62 ::MessageBox(NULL, message.c_str(), | 63 ::MessageBox(NULL, message.c_str(), |
63 L"chrome.exe", | 64 L"chrome.exe", |
64 MB_OK | MB_SERVICE_NOTIFICATION); | 65 MB_OK | MB_SERVICE_NOTIFICATION); |
65 ::LocalFree(msg_template); | 66 ::LocalFree(msg_template); |
66 } | 67 } |
67 | 68 |
68 void ModuleNotFoundHardError(const EXCEPTION_RECORD* ex_record) { | 69 void ModuleNotFoundHardError(const EXCEPTION_RECORD* ex_record) { |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 EntryPointNotFoundHardError(ex_info->ExceptionRecord); | 103 EntryPointNotFoundHardError(ex_info->ExceptionRecord); |
103 return true; | 104 return true; |
104 } else if (FacilityFromException(exception) == FACILITY_GRAPHICS_KERNEL) { | 105 } else if (FacilityFromException(exception) == FACILITY_GRAPHICS_KERNEL) { |
105 RaiseHardErrorMsg(exception, std::string(), std::string()); | 106 RaiseHardErrorMsg(exception, std::string(), std::string()); |
106 return true; | 107 return true; |
107 } | 108 } |
108 return false; | 109 return false; |
109 } | 110 } |
110 | 111 |
111 } // namespace breakpad | 112 } // namespace breakpad |
OLD | NEW |