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

Unified Diff: chrome/app/chrome_main_delegate.cc

Issue 25733002: Fix crash reporting of child process command line switches. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/chrome_tests_unit.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/app/chrome_main_delegate.cc
diff --git a/chrome/app/chrome_main_delegate.cc b/chrome/app/chrome_main_delegate.cc
index 2ab55a5a15c796ff4473d8c6ebbb28586d36e60b..100014d394a8c2c3b9acda83c86de0d18a958c05 100644
--- a/chrome/app/chrome_main_delegate.cc
+++ b/chrome/app/chrome_main_delegate.cc
@@ -27,6 +27,7 @@
#include "chrome/common/chrome_paths_internal.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/chrome_version_info.h"
+#include "chrome/common/crash_keys.h"
#include "chrome/common/logging_chrome.h"
#include "chrome/common/profiling.h"
#include "chrome/common/url_constants.h"
@@ -744,6 +745,10 @@ void ChromeMainDelegate::PreSandboxStartup() {
#endif
}
#endif
+
+ // After all the platform Breakpads have been initialized, store the command
+ // line for crash reporting.
+ crash_keys::SetSwitchesFromCommandLine(&command_line);
}
void ChromeMainDelegate::SandboxInitialized(const std::string& process_type) {
@@ -841,6 +846,9 @@ void ChromeMainDelegate::ZygoteForked() {
// Needs to be called after we have chrome::DIR_USER_DATA. BrowserMain sets
// this up for the browser process in a different manner.
InitCrashReporter();
+
+ // Reset the command line for the newly spawned process.
+ crash_keys::SetSwitchesFromCommandLine(CommandLine::ForCurrentProcess());
#endif
}
« no previous file with comments | « no previous file | chrome/chrome_tests_unit.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698