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 440 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
451 int child_process_id, | 451 int child_process_id, |
452 content::FileDescriptorInfo* mappings, | 452 content::FileDescriptorInfo* mappings, |
453 std::map<int, base::MemoryMappedFile::Region>* regions) { | 453 std::map<int, base::MemoryMappedFile::Region>* regions) { |
454 mappings->Share( | 454 mappings->Share( |
455 kAndroidPakDescriptor, | 455 kAndroidPakDescriptor, |
456 base::GlobalDescriptors::GetInstance()->Get(kAndroidPakDescriptor)); | 456 base::GlobalDescriptors::GetInstance()->Get(kAndroidPakDescriptor)); |
457 regions->insert(std::make_pair( | 457 regions->insert(std::make_pair( |
458 kAndroidPakDescriptor, base::GlobalDescriptors::GetInstance()->GetRegion( | 458 kAndroidPakDescriptor, base::GlobalDescriptors::GetInstance()->GetRegion( |
459 kAndroidPakDescriptor))); | 459 kAndroidPakDescriptor))); |
460 | 460 |
461 if (breakpad::IsCrashReporterEnabled()) { | 461 breakpad::CrashDumpObserver::GetInstance()->BrowserChildProcessStarted( |
462 base::File minidump_file( | 462 child_process_id, mappings); |
463 breakpad::CrashDumpManager::GetInstance()->CreateMinidumpFile( | |
464 child_process_id)); | |
465 if (!minidump_file.IsValid()) { | |
466 LOG(ERROR) << "Failed to create file for minidump, crash reporting will " | |
467 << "be disabled for this process."; | |
468 } else { | |
469 mappings->Transfer(kAndroidMinidumpDescriptor, | |
470 base::ScopedFD(minidump_file.TakePlatformFile())); | |
471 } | |
472 } | |
473 } | 463 } |
474 | 464 |
475 #else | 465 #else |
476 ::media::ScopedAudioManagerPtr CastContentBrowserClient::CreateAudioManager( | 466 ::media::ScopedAudioManagerPtr CastContentBrowserClient::CreateAudioManager( |
477 ::media::AudioLogFactory* audio_log_factory) { | 467 ::media::AudioLogFactory* audio_log_factory) { |
478 return ::media::ScopedAudioManagerPtr(new media::CastAudioManager( | 468 return ::media::ScopedAudioManagerPtr(new media::CastAudioManager( |
479 GetMediaTaskRunner(), GetMediaTaskRunner(), audio_log_factory, | 469 GetMediaTaskRunner(), GetMediaTaskRunner(), audio_log_factory, |
480 media_pipeline_backend_manager())); | 470 media_pipeline_backend_manager())); |
481 } | 471 } |
482 | 472 |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
546 process_type, dumps_path, false /* upload */); | 536 process_type, dumps_path, false /* upload */); |
547 // StartUploaderThread() even though upload is diferred. | 537 // StartUploaderThread() even though upload is diferred. |
548 // Breakpad-related memory is freed in the uploader thread. | 538 // Breakpad-related memory is freed in the uploader thread. |
549 crash_handler->StartUploaderThread(); | 539 crash_handler->StartUploaderThread(); |
550 return crash_handler; | 540 return crash_handler; |
551 } | 541 } |
552 #endif // !defined(OS_ANDROID) | 542 #endif // !defined(OS_ANDROID) |
553 | 543 |
554 } // namespace shell | 544 } // namespace shell |
555 } // namespace chromecast | 545 } // namespace chromecast |
OLD | NEW |