| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "chromecast/browser/cast_content_browser_client.h" | 5 #include "chromecast/browser/cast_content_browser_client.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 438 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 449 int child_process_id, | 449 int child_process_id, |
| 450 content::FileDescriptorInfo* mappings, | 450 content::FileDescriptorInfo* mappings, |
| 451 std::map<int, base::MemoryMappedFile::Region>* regions) { | 451 std::map<int, base::MemoryMappedFile::Region>* regions) { |
| 452 mappings->Share( | 452 mappings->Share( |
| 453 kAndroidPakDescriptor, | 453 kAndroidPakDescriptor, |
| 454 base::GlobalDescriptors::GetInstance()->Get(kAndroidPakDescriptor)); | 454 base::GlobalDescriptors::GetInstance()->Get(kAndroidPakDescriptor)); |
| 455 regions->insert(std::make_pair( | 455 regions->insert(std::make_pair( |
| 456 kAndroidPakDescriptor, base::GlobalDescriptors::GetInstance()->GetRegion( | 456 kAndroidPakDescriptor, base::GlobalDescriptors::GetInstance()->GetRegion( |
| 457 kAndroidPakDescriptor))); | 457 kAndroidPakDescriptor))); |
| 458 | 458 |
| 459 breakpad::CrashDumpObserver::GetInstance()->BrowserChildProcessStarted( | 459 if (breakpad::IsCrashReporterEnabled()) { |
| 460 child_process_id, mappings); | 460 base::File minidump_file( |
| 461 breakpad::CrashDumpManager::GetInstance()->CreateMinidumpFile( |
| 462 child_process_id)); |
| 463 if (!minidump_file.IsValid()) { |
| 464 LOG(ERROR) << "Failed to create file for minidump, crash reporting will " |
| 465 << "be disabled for this process."; |
| 466 } else { |
| 467 mappings->Transfer(kAndroidMinidumpDescriptor, |
| 468 base::ScopedFD(minidump_file.TakePlatformFile())); |
| 469 } |
| 470 } |
| 461 } | 471 } |
| 462 | 472 |
| 463 #else | 473 #else |
| 464 ::media::ScopedAudioManagerPtr CastContentBrowserClient::CreateAudioManager( | 474 ::media::ScopedAudioManagerPtr CastContentBrowserClient::CreateAudioManager( |
| 465 ::media::AudioLogFactory* audio_log_factory) { | 475 ::media::AudioLogFactory* audio_log_factory) { |
| 466 return ::media::ScopedAudioManagerPtr(new media::CastAudioManager( | 476 return ::media::ScopedAudioManagerPtr(new media::CastAudioManager( |
| 467 GetMediaTaskRunner(), GetMediaTaskRunner(), audio_log_factory, | 477 GetMediaTaskRunner(), GetMediaTaskRunner(), audio_log_factory, |
| 468 media_pipeline_backend_manager())); | 478 media_pipeline_backend_manager())); |
| 469 } | 479 } |
| 470 | 480 |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 546 process_type, dumps_path, false /* upload */); | 556 process_type, dumps_path, false /* upload */); |
| 547 // StartUploaderThread() even though upload is diferred. | 557 // StartUploaderThread() even though upload is diferred. |
| 548 // Breakpad-related memory is freed in the uploader thread. | 558 // Breakpad-related memory is freed in the uploader thread. |
| 549 crash_handler->StartUploaderThread(); | 559 crash_handler->StartUploaderThread(); |
| 550 return crash_handler; | 560 return crash_handler; |
| 551 } | 561 } |
| 552 #endif // !defined(OS_ANDROID) | 562 #endif // !defined(OS_ANDROID) |
| 553 | 563 |
| 554 } // namespace shell | 564 } // namespace shell |
| 555 } // namespace chromecast | 565 } // namespace chromecast |
| OLD | NEW |