diff options
author | jochen@chromium.org <jochen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-07-04 06:34:07 +0000 |
---|---|---|
committer | jochen@chromium.org <jochen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-07-04 06:34:07 +0000 |
commit | ee0b7af74dd323f193013c427309d1a22210e580 (patch) | |
tree | 04aac6c19ad901615da963731ef37272d62a78a0 /chrome/nacl | |
parent | bc069bc0c5602c7c8e021072cec2d103d7113fcf (diff) | |
download | chromium_src-ee0b7af74dd323f193013c427309d1a22210e580.zip chromium_src-ee0b7af74dd323f193013c427309d1a22210e580.tar.gz chromium_src-ee0b7af74dd323f193013c427309d1a22210e580.tar.bz2 |
Add a BreakpadClient which an embedder of the breakpad component has to provide
As a first step, I added a method for returning the default crash dump location
and use this on all three platforms.
BUG=247431
R=thestig@chromium.org,joi@chromium.org
Review URL: https://chromiumcodereview.appspot.com/18341002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@210143 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/nacl')
-rw-r--r-- | chrome/nacl/DEPS | 2 | ||||
-rw-r--r-- | chrome/nacl/nacl_exe_win_64.cc | 11 |
2 files changed, 13 insertions, 0 deletions
diff --git a/chrome/nacl/DEPS b/chrome/nacl/DEPS index c5a003d..a97afd9 100644 --- a/chrome/nacl/DEPS +++ b/chrome/nacl/DEPS @@ -1,5 +1,7 @@ include_rules = [ "+chrome/app/breakpad_win.h", + "+chrome/app/chrome_breakpad_client.h", + "+components/breakpad", "+components/nacl", "+content/public/app/startup_helper_win.h", "+sandbox/linux/seccomp-bpf", diff --git a/chrome/nacl/nacl_exe_win_64.cc b/chrome/nacl/nacl_exe_win_64.cc index 951d128..45a7262 100644 --- a/chrome/nacl/nacl_exe_win_64.cc +++ b/chrome/nacl/nacl_exe_win_64.cc @@ -4,6 +4,7 @@ #include "base/at_exit.h" #include "base/command_line.h" +#include "base/lazy_instance.h" #include "base/logging.h" #include "base/message_loop.h" #include "base/power_monitor/power_monitor.h" @@ -11,11 +12,13 @@ #include "base/strings/string_util.h" #include "base/timer/hi_res_timer_manager.h" #include "chrome/app/breakpad_win.h" +#include "chrome/app/chrome_breakpad_client.h" #include "chrome/common/chrome_result_codes.h" #include "chrome/common/logging_chrome.h" #include "chrome/nacl/nacl_broker_listener.h" #include "chrome/nacl/nacl_listener.h" #include "chrome/nacl/nacl_main_platform_delegate.h" +#include "components/breakpad/breakpad_client.h" #include "components/nacl/common/nacl_switches.h" #include "content/public/app/startup_helper_win.h" #include "content/public/common/content_switches.h" @@ -25,6 +28,13 @@ extern int NaClMain(const content::MainFunctionParams&); +namespace { + +base::LazyInstance<chrome::ChromeBreakpadClient>::Leaky + g_chrome_breakpad_client = LAZY_INSTANCE_INITIALIZER; + +} // namespace + // main() routine for the NaCl broker process. // This is necessary for supporting NaCl in Chrome on Win64. int NaClBrokerMain(const content::MainFunctionParams& parameters) { @@ -49,6 +59,7 @@ int APIENTRY wWinMain(HINSTANCE instance, HINSTANCE, wchar_t*, int) { base::AtExitManager exit_manager; CommandLine::Init(0, NULL); + breakpad::SetBreakpadClient(g_chrome_breakpad_client.Pointer()); InitCrashReporter(); const CommandLine& command_line = *CommandLine::ForCurrentProcess(); |