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/breakpad_win.h" | 5 #include "components/crash/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 523 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
534 GetCrashReporterClient()->GetIsPerUserInstall(base::FilePath(exe_path)); | 534 GetCrashReporterClient()->GetIsPerUserInstall(base::FilePath(exe_path)); |
535 | 535 |
536 // This is intentionally leaked. | 536 // This is intentionally leaked. |
537 CrashKeysWin* keeper = new CrashKeysWin(); | 537 CrashKeysWin* keeper = new CrashKeysWin(); |
538 | 538 |
539 google_breakpad::CustomClientInfo* custom_info = | 539 google_breakpad::CustomClientInfo* custom_info = |
540 keeper->GetCustomInfo(exe_path, process_type, GetProfileType(), | 540 keeper->GetCustomInfo(exe_path, process_type, GetProfileType(), |
541 base::CommandLine::ForCurrentProcess(), | 541 base::CommandLine::ForCurrentProcess(), |
542 GetCrashReporterClient()); | 542 GetCrashReporterClient()); |
543 | 543 |
| 544 #if !defined(COMPONENT_BUILD) |
| 545 // In a static build, the EXE must separately initialize the crash keys |
| 546 // configuration. |
544 base::debug::SetCrashKeyReportingFunctions(&SetCrashKeyValueForBaseDebug, | 547 base::debug::SetCrashKeyReportingFunctions(&SetCrashKeyValueForBaseDebug, |
545 &ClearCrashKeyForBaseDebug); | 548 &ClearCrashKeyForBaseDebug); |
| 549 GetCrashReporterClient()->RegisterCrashKeys(); |
| 550 #endif |
546 | 551 |
547 google_breakpad::ExceptionHandler::MinidumpCallback callback = NULL; | 552 google_breakpad::ExceptionHandler::MinidumpCallback callback = NULL; |
548 LPTOP_LEVEL_EXCEPTION_FILTER default_filter = NULL; | 553 LPTOP_LEVEL_EXCEPTION_FILTER default_filter = NULL; |
549 // We install the post-dump callback only for the browser and service | 554 // We install the post-dump callback only for the browser and service |
550 // processes. It spawns a new browser/service process. | 555 // processes. It spawns a new browser/service process. |
551 if (process_type == L"browser") { | 556 if (process_type == L"browser") { |
552 callback = &DumpDoneCallback; | 557 callback = &DumpDoneCallback; |
553 default_filter = &ChromeExceptionFilter; | 558 default_filter = &ChromeExceptionFilter; |
554 } else if (process_type == L"service") { | 559 } else if (process_type == L"service") { |
555 callback = &DumpDoneCallback; | 560 callback = &DumpDoneCallback; |
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
716 extern "C" void __declspec(dllexport) __cdecl | 721 extern "C" void __declspec(dllexport) __cdecl |
717 UnregisterNonABICompliantCodeRange(void* start) { | 722 UnregisterNonABICompliantCodeRange(void* start) { |
718 ExceptionHandlerRecord* record = | 723 ExceptionHandlerRecord* record = |
719 reinterpret_cast<ExceptionHandlerRecord*>(start); | 724 reinterpret_cast<ExceptionHandlerRecord*>(start); |
720 | 725 |
721 CHECK(RtlDeleteFunctionTable(&record->runtime_function)); | 726 CHECK(RtlDeleteFunctionTable(&record->runtime_function)); |
722 } | 727 } |
723 #endif | 728 #endif |
724 | 729 |
725 } // namespace breakpad | 730 } // namespace breakpad |
OLD | NEW |