Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(236)

Side by Side Diff: components/crash/app/breakpad_win.cc

Issue 1008523002: Call RegisterCrashKeys for chrome.exe in static build. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix ifdef to only apply to Windows. Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « chrome/app/chrome_crash_reporter_client.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 // chrome/common/child_process_logging_win.cc registers crash keys for
546 // chrome.dll. In a component build, that is sufficient as chrome.dll and
547 // chrome.exe share a copy of base (in base.dll).
548 // In a static build, the EXE must separately initialize the crash keys
549 // configuration as it has its own statically linked copy of base.
544 base::debug::SetCrashKeyReportingFunctions(&SetCrashKeyValueForBaseDebug, 550 base::debug::SetCrashKeyReportingFunctions(&SetCrashKeyValueForBaseDebug,
545 &ClearCrashKeyForBaseDebug); 551 &ClearCrashKeyForBaseDebug);
552 GetCrashReporterClient()->RegisterCrashKeys();
553 #endif
546 554
547 google_breakpad::ExceptionHandler::MinidumpCallback callback = NULL; 555 google_breakpad::ExceptionHandler::MinidumpCallback callback = NULL;
548 LPTOP_LEVEL_EXCEPTION_FILTER default_filter = NULL; 556 LPTOP_LEVEL_EXCEPTION_FILTER default_filter = NULL;
549 // We install the post-dump callback only for the browser and service 557 // We install the post-dump callback only for the browser and service
550 // processes. It spawns a new browser/service process. 558 // processes. It spawns a new browser/service process.
551 if (process_type == L"browser") { 559 if (process_type == L"browser") {
552 callback = &DumpDoneCallback; 560 callback = &DumpDoneCallback;
553 default_filter = &ChromeExceptionFilter; 561 default_filter = &ChromeExceptionFilter;
554 } else if (process_type == L"service") { 562 } else if (process_type == L"service") {
555 callback = &DumpDoneCallback; 563 callback = &DumpDoneCallback;
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
716 extern "C" void __declspec(dllexport) __cdecl 724 extern "C" void __declspec(dllexport) __cdecl
717 UnregisterNonABICompliantCodeRange(void* start) { 725 UnregisterNonABICompliantCodeRange(void* start) {
718 ExceptionHandlerRecord* record = 726 ExceptionHandlerRecord* record =
719 reinterpret_cast<ExceptionHandlerRecord*>(start); 727 reinterpret_cast<ExceptionHandlerRecord*>(start);
720 728
721 CHECK(RtlDeleteFunctionTable(&record->runtime_function)); 729 CHECK(RtlDeleteFunctionTable(&record->runtime_function));
722 } 730 }
723 #endif 731 #endif
724 732
725 } // namespace breakpad 733 } // namespace breakpad
OLDNEW
« no previous file with comments | « chrome/app/chrome_crash_reporter_client.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698