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

Side by Side 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 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 279 matching lines...) Expand 10 before | Expand all | Expand 10 after
290 const base::CommandLine& command_line, 290 const base::CommandLine& command_line,
291 int child_process_id, 291 int child_process_id,
292 content::FileDescriptorInfo* mappings, 292 content::FileDescriptorInfo* mappings,
293 std::map<int, base::MemoryMappedFile::Region>* regions) { 293 std::map<int, base::MemoryMappedFile::Region>* regions) {
294 mappings->Share( 294 mappings->Share(
295 kShellPakDescriptor, 295 kShellPakDescriptor,
296 base::GlobalDescriptors::GetInstance()->Get(kShellPakDescriptor)); 296 base::GlobalDescriptors::GetInstance()->Get(kShellPakDescriptor));
297 regions->insert(std::make_pair( 297 regions->insert(std::make_pair(
298 kShellPakDescriptor, 298 kShellPakDescriptor,
299 base::GlobalDescriptors::GetInstance()->GetRegion(kShellPakDescriptor))); 299 base::GlobalDescriptors::GetInstance()->GetRegion(kShellPakDescriptor)));
300 breakpad::CrashDumpObserver::GetInstance()->BrowserChildProcessStarted( 300
301 child_process_id, mappings); 301 if (breakpad::IsCrashReporterEnabled()) {
302 base::File f(breakpad::CrashDumpManager::GetInstance()->CreateMinidumpFile(
303 child_process_id));
304 if (!f.IsValid()) {
305 LOG(ERROR) << "Failed to create file for minidump, crash reporting will "
306 << "be disabled for this process.";
307 } else {
308 mappings->Transfer(kAndroidMinidumpDescriptor,
309 base::ScopedFD(f.TakePlatformFile()));
310 }
311 }
302 } 312 }
303 #elif defined(OS_POSIX) && !defined(OS_MACOSX) 313 #elif defined(OS_POSIX) && !defined(OS_MACOSX)
304 void ShellContentBrowserClient::GetAdditionalMappedFilesForChildProcess( 314 void ShellContentBrowserClient::GetAdditionalMappedFilesForChildProcess(
305 const base::CommandLine& command_line, 315 const base::CommandLine& command_line,
306 int child_process_id, 316 int child_process_id,
307 content::FileDescriptorInfo* mappings) { 317 content::FileDescriptorInfo* mappings) {
308 int crash_signal_fd = GetCrashSignalFD(command_line); 318 int crash_signal_fd = GetCrashSignalFD(command_line);
309 if (crash_signal_fd >= 0) { 319 if (crash_signal_fd >= 0) {
310 mappings->Share(kCrashDumpSignal, crash_signal_fd); 320 mappings->Share(kCrashDumpSignal, crash_signal_fd);
311 } 321 }
(...skipping 20 matching lines...) Expand all
332 ShellBrowserContext* ShellContentBrowserClient::browser_context() { 342 ShellBrowserContext* ShellContentBrowserClient::browser_context() {
333 return shell_browser_main_parts_->browser_context(); 343 return shell_browser_main_parts_->browser_context();
334 } 344 }
335 345
336 ShellBrowserContext* 346 ShellBrowserContext*
337 ShellContentBrowserClient::off_the_record_browser_context() { 347 ShellContentBrowserClient::off_the_record_browser_context() {
338 return shell_browser_main_parts_->off_the_record_browser_context(); 348 return shell_browser_main_parts_->off_the_record_browser_context();
339 } 349 }
340 350
341 } // namespace content 351 } // 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