| 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/content/app/breakpad_win.h" | 5 #include "components/crash/content/app/breakpad_win.h" |
| 6 | 6 |
| 7 #include <windows.h> | 7 #include <windows.h> |
| 8 #include <shellapi.h> | 8 #include <shellapi.h> |
| 9 #include <tchar.h> | 9 #include <tchar.h> |
| 10 #include <userenv.h> | 10 #include <userenv.h> |
| (...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 179 for (size_t i = 0; i < arraysize(kBitNames); ++i) { | 179 for (size_t i = 0; i < arraysize(kBitNames); ++i) { |
| 180 const DWORD this_bit = kBitNames[i].bit; | 180 const DWORD this_bit = kBitNames[i].bit; |
| 181 if ((profile_bits & this_bit) != 0) { | 181 if ((profile_bits & this_bit) != 0) { |
| 182 profile_type.append(kBitNames[i].name); | 182 profile_type.append(kBitNames[i].name); |
| 183 profile_bits &= ~this_bit; | 183 profile_bits &= ~this_bit; |
| 184 if (profile_bits != 0) | 184 if (profile_bits != 0) |
| 185 profile_type.append(L", "); | 185 profile_type.append(L", "); |
| 186 } | 186 } |
| 187 } | 187 } |
| 188 } else { | 188 } else { |
| 189 DWORD last_error = ::GetLastError(); | 189 // Safe. |
| 190 base::SStringPrintf(&profile_type, L"error %u", last_error); | 190 //DWORD last_error = ::GetLastError(); |
| 191 //base::SStringPrintf(&profile_type, L"error %u", last_error); |
| 191 } | 192 } |
| 192 return profile_type; | 193 return profile_type; |
| 193 } | 194 } |
| 194 | 195 |
| 195 namespace { | 196 namespace { |
| 196 | 197 |
| 197 // This callback is used when we want to get a dump without crashing the | 198 // This callback is used when we want to get a dump without crashing the |
| 198 // process. | 199 // process. |
| 199 bool DumpDoneCallbackWhenNoCrash(const wchar_t*, const wchar_t*, void*, | 200 bool DumpDoneCallbackWhenNoCrash(const wchar_t*, const wchar_t*, void*, |
| 200 EXCEPTION_POINTERS* ex_info, | 201 EXCEPTION_POINTERS* ex_info, |
| (...skipping 535 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 736 extern "C" void __declspec(dllexport) __cdecl | 737 extern "C" void __declspec(dllexport) __cdecl |
| 737 UnregisterNonABICompliantCodeRange(void* start) { | 738 UnregisterNonABICompliantCodeRange(void* start) { |
| 738 ExceptionHandlerRecord* record = | 739 ExceptionHandlerRecord* record = |
| 739 reinterpret_cast<ExceptionHandlerRecord*>(start); | 740 reinterpret_cast<ExceptionHandlerRecord*>(start); |
| 740 | 741 |
| 741 CHECK(RtlDeleteFunctionTable(&record->runtime_function)); | 742 CHECK(RtlDeleteFunctionTable(&record->runtime_function)); |
| 742 } | 743 } |
| 743 #endif | 744 #endif |
| 744 | 745 |
| 745 } // namespace breakpad | 746 } // namespace breakpad |
| OLD | NEW |