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

Side by Side Diff: content/shell/browser/shell_content_browser_client.cc

Issue 2393853002: Refactor CrashDump*Manager to use a shared CrashDumpObserver singleton. (Closed)
Patch Set: Rebase Created 3 years, 11 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 | « content/shell/browser/shell_browser_main_parts.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 "content/shell/browser/shell_content_browser_client.h" 5 #include "content/shell/browser/shell_content_browser_client.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/base_switches.h" 10 #include "base/base_switches.h"
(...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after
334 void ShellContentBrowserClient::GetAdditionalMappedFilesForChildProcess( 334 void ShellContentBrowserClient::GetAdditionalMappedFilesForChildProcess(
335 const base::CommandLine& command_line, 335 const base::CommandLine& command_line,
336 int child_process_id, 336 int child_process_id,
337 content::FileDescriptorInfo* mappings) { 337 content::FileDescriptorInfo* mappings) {
338 #if defined(OS_ANDROID) 338 #if defined(OS_ANDROID)
339 mappings->ShareWithRegion( 339 mappings->ShareWithRegion(
340 kShellPakDescriptor, 340 kShellPakDescriptor,
341 base::GlobalDescriptors::GetInstance()->Get(kShellPakDescriptor), 341 base::GlobalDescriptors::GetInstance()->Get(kShellPakDescriptor),
342 base::GlobalDescriptors::GetInstance()->GetRegion(kShellPakDescriptor)); 342 base::GlobalDescriptors::GetInstance()->GetRegion(kShellPakDescriptor));
343 343
344 if (breakpad::IsCrashReporterEnabled()) { 344 breakpad::CrashDumpObserver::GetInstance()->BrowserChildProcessStarted(
345 base::File f(breakpad::CrashDumpManager::GetInstance()->CreateMinidumpFile( 345 child_process_id, mappings);
346 child_process_id));
347 if (!f.IsValid()) {
348 LOG(ERROR) << "Failed to create file for minidump, crash reporting will "
349 << "be disabled for this process.";
350 } else {
351 mappings->Transfer(kAndroidMinidumpDescriptor,
352 base::ScopedFD(f.TakePlatformFile()));
353 }
354 }
355
356 #else 346 #else
357 int crash_signal_fd = GetCrashSignalFD(command_line); 347 int crash_signal_fd = GetCrashSignalFD(command_line);
358 if (crash_signal_fd >= 0) { 348 if (crash_signal_fd >= 0) {
359 mappings->Share(kCrashDumpSignal, crash_signal_fd); 349 mappings->Share(kCrashDumpSignal, crash_signal_fd);
360 } 350 }
361 #endif // defined(OS_ANDROID) 351 #endif // defined(OS_ANDROID)
362 } 352 }
363 #endif // defined(OS_POSIX) && !defined(OS_MACOSX) 353 #endif // defined(OS_POSIX) && !defined(OS_MACOSX)
364 354
365 #if defined(OS_WIN) 355 #if defined(OS_WIN)
(...skipping 16 matching lines...) Expand all
382 ShellBrowserContext* ShellContentBrowserClient::browser_context() { 372 ShellBrowserContext* ShellContentBrowserClient::browser_context() {
383 return shell_browser_main_parts_->browser_context(); 373 return shell_browser_main_parts_->browser_context();
384 } 374 }
385 375
386 ShellBrowserContext* 376 ShellBrowserContext*
387 ShellContentBrowserClient::off_the_record_browser_context() { 377 ShellContentBrowserClient::off_the_record_browser_context() {
388 return shell_browser_main_parts_->off_the_record_browser_context(); 378 return shell_browser_main_parts_->off_the_record_browser_context();
389 } 379 }
390 380
391 } // namespace content 381 } // namespace content
OLDNEW
« 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