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

Unified Diff: content/shell/browser/shell_content_browser_client.cc

Issue 2303153002: Revert "Refactor CrashDump*Manager to use a shared CrashDumpObserver singleton." (Closed)
Patch Set: Created 4 years, 3 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 | « content/shell/browser/shell_browser_main_parts.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/shell/browser/shell_content_browser_client.cc
diff --git a/content/shell/browser/shell_content_browser_client.cc b/content/shell/browser/shell_content_browser_client.cc
index 643f9c1653d38d9bf700952260f3b77347872003..46c8895cc8ac05b878468db81106682ee749f4e0 100644
--- a/content/shell/browser/shell_content_browser_client.cc
+++ b/content/shell/browser/shell_content_browser_client.cc
@@ -297,8 +297,18 @@ void ShellContentBrowserClient::GetAdditionalMappedFilesForChildProcess(
regions->insert(std::make_pair(
kShellPakDescriptor,
base::GlobalDescriptors::GetInstance()->GetRegion(kShellPakDescriptor)));
- breakpad::CrashDumpObserver::GetInstance()->BrowserChildProcessStarted(
- child_process_id, mappings);
+
+ if (breakpad::IsCrashReporterEnabled()) {
+ base::File f(breakpad::CrashDumpManager::GetInstance()->CreateMinidumpFile(
+ child_process_id));
+ if (!f.IsValid()) {
+ LOG(ERROR) << "Failed to create file for minidump, crash reporting will "
+ << "be disabled for this process.";
+ } else {
+ mappings->Transfer(kAndroidMinidumpDescriptor,
+ base::ScopedFD(f.TakePlatformFile()));
+ }
+ }
}
#elif defined(OS_POSIX) && !defined(OS_MACOSX)
void ShellContentBrowserClient::GetAdditionalMappedFilesForChildProcess(
« no previous file with comments | « content/shell/browser/shell_browser_main_parts.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698