Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 Loading... | |
| 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 | 300 breakpad::CrashDumpObserver::GetInstance()->BrowserChildProcessStarted( |
| 301 if (breakpad::IsCrashReporterEnabled()) { | 301 child_process_id, mappings); |
|
Torne
2016/08/03 16:33:48
Where did this condition (and the equivalent in th
| |
| 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 } | |
| 312 } | 302 } |
| 313 #elif defined(OS_POSIX) && !defined(OS_MACOSX) | 303 #elif defined(OS_POSIX) && !defined(OS_MACOSX) |
| 314 void ShellContentBrowserClient::GetAdditionalMappedFilesForChildProcess( | 304 void ShellContentBrowserClient::GetAdditionalMappedFilesForChildProcess( |
| 315 const base::CommandLine& command_line, | 305 const base::CommandLine& command_line, |
| 316 int child_process_id, | 306 int child_process_id, |
| 317 content::FileDescriptorInfo* mappings) { | 307 content::FileDescriptorInfo* mappings) { |
| 318 int crash_signal_fd = GetCrashSignalFD(command_line); | 308 int crash_signal_fd = GetCrashSignalFD(command_line); |
| 319 if (crash_signal_fd >= 0) { | 309 if (crash_signal_fd >= 0) { |
| 320 mappings->Share(kCrashDumpSignal, crash_signal_fd); | 310 mappings->Share(kCrashDumpSignal, crash_signal_fd); |
| 321 } | 311 } |
| (...skipping 20 matching lines...) Expand all Loading... | |
| 342 ShellBrowserContext* ShellContentBrowserClient::browser_context() { | 332 ShellBrowserContext* ShellContentBrowserClient::browser_context() { |
| 343 return shell_browser_main_parts_->browser_context(); | 333 return shell_browser_main_parts_->browser_context(); |
| 344 } | 334 } |
| 345 | 335 |
| 346 ShellBrowserContext* | 336 ShellBrowserContext* |
| 347 ShellContentBrowserClient::off_the_record_browser_context() { | 337 ShellContentBrowserClient::off_the_record_browser_context() { |
| 348 return shell_browser_main_parts_->off_the_record_browser_context(); | 338 return shell_browser_main_parts_->off_the_record_browser_context(); |
| 349 } | 339 } |
| 350 | 340 |
| 351 } // namespace content | 341 } // namespace content |
| OLD | NEW |