diff options
author | grt <grt@chromium.org> | 2015-10-29 12:41:11 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-10-29 19:42:09 +0000 |
commit | 02c63bf7196ea754bb762202cf28fd3cf9492a69 (patch) | |
tree | dfc7be3b2f1da09b9cdbf51ea32254a47743e6be /components/crash | |
parent | 42eb61357f2c9266a467a463510405d9194f93c4 (diff) | |
download | chromium_src-02c63bf7196ea754bb762202cf28fd3cf9492a69.zip chromium_src-02c63bf7196ea754bb762202cf28fd3cf9492a69.tar.gz chromium_src-02c63bf7196ea754bb762202cf28fd3cf9492a69.tar.bz2 |
Report channel and client id in installer crashes.
The crash component is now used to connect to breakpad. The code is
harmonized with Chrome's own connection to the service.
BUG=548216
Review URL: https://codereview.chromium.org/1409123006
Cr-Commit-Position: refs/heads/master@{#356918}
Diffstat (limited to 'components/crash')
-rw-r--r-- | components/crash/content/app/breakpad_win.cc | 5 | ||||
-rw-r--r-- | components/crash/content/app/crash_reporter_client.cc | 5 | ||||
-rw-r--r-- | components/crash/content/app/crash_reporter_client.h | 5 |
3 files changed, 13 insertions, 2 deletions
diff --git a/components/crash/content/app/breakpad_win.cc b/components/crash/content/app/breakpad_win.cc index 5f8d73f..45cdc6b 100644 --- a/components/crash/content/app/breakpad_win.cc +++ b/components/crash/content/app/breakpad_win.cc @@ -584,10 +584,11 @@ void InitCrashReporter(const std::string& process_type_switch) { default_filter = &ServiceExceptionFilter; } - if (process_type == L"browser") { + if (GetCrashReporterClient()->ShouldCreatePipeName(process_type)) InitPipeNameEnvVar(is_per_user_install); + + if (process_type == L"browser") GetCrashReporterClient()->InitBrowserCrashDumpsRegKey(); - } scoped_ptr<base::Environment> env(base::Environment::Create()); std::string pipe_name_ascii; diff --git a/components/crash/content/app/crash_reporter_client.cc b/components/crash/content/app/crash_reporter_client.cc index 66388e2..80fa046 100644 --- a/components/crash/content/app/crash_reporter_client.cc +++ b/components/crash/content/app/crash_reporter_client.cc @@ -34,6 +34,11 @@ void CrashReporterClient::SetCrashReporterClientIdFromGUID( #endif #if defined(OS_WIN) +bool CrashReporterClient::ShouldCreatePipeName( + const base::string16& process_type) { + return process_type == L"browser"; +} + bool CrashReporterClient::GetAlternativeCrashDumpLocation( base::FilePath* crash_dir) { return false; diff --git a/components/crash/content/app/crash_reporter_client.h b/components/crash/content/app/crash_reporter_client.h index 4a96954..c457f62 100644 --- a/components/crash/content/app/crash_reporter_client.h +++ b/components/crash/content/app/crash_reporter_client.h @@ -57,6 +57,11 @@ class CrashReporterClient { #endif #if defined(OS_WIN) + // Returns true if the pipe name to connect to breakpad should be computed and + // stored in the process's environment block. By default, returns true for the + // "browser" process. + virtual bool ShouldCreatePipeName(const base::string16& process_type); + // Returns true if an alternative location to store the minidump files was // specified. Returns true if |crash_dir| was set. virtual bool GetAlternativeCrashDumpLocation(base::FilePath* crash_dir); |