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 427 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
438 int child_process_id, | 438 int child_process_id, |
439 content::FileDescriptorInfo* mappings, | 439 content::FileDescriptorInfo* mappings, |
440 std::map<int, base::MemoryMappedFile::Region>* regions) { | 440 std::map<int, base::MemoryMappedFile::Region>* regions) { |
441 mappings->Share( | 441 mappings->Share( |
442 kAndroidPakDescriptor, | 442 kAndroidPakDescriptor, |
443 base::GlobalDescriptors::GetInstance()->Get(kAndroidPakDescriptor)); | 443 base::GlobalDescriptors::GetInstance()->Get(kAndroidPakDescriptor)); |
444 regions->insert(std::make_pair( | 444 regions->insert(std::make_pair( |
445 kAndroidPakDescriptor, base::GlobalDescriptors::GetInstance()->GetRegion( | 445 kAndroidPakDescriptor, base::GlobalDescriptors::GetInstance()->GetRegion( |
446 kAndroidPakDescriptor))); | 446 kAndroidPakDescriptor))); |
447 | 447 |
448 if (breakpad::IsCrashReporterEnabled()) { | 448 breakpad::CrashDumpObserver::GetInstance()->BrowserChildProcessStarted( |
449 base::File minidump_file( | 449 child_process_id, mappings); |
450 breakpad::CrashDumpManager::GetInstance()->CreateMinidumpFile( | |
451 child_process_id)); | |
452 if (!minidump_file.IsValid()) { | |
453 LOG(ERROR) << "Failed to create file for minidump, crash reporting will " | |
454 << "be disabled for this process."; | |
455 } else { | |
456 mappings->Transfer(kAndroidMinidumpDescriptor, | |
457 base::ScopedFD(minidump_file.TakePlatformFile())); | |
458 } | |
459 } | |
460 } | 450 } |
461 | 451 |
462 #else | 452 #else |
463 ::media::ScopedAudioManagerPtr CastContentBrowserClient::CreateAudioManager( | 453 ::media::ScopedAudioManagerPtr CastContentBrowserClient::CreateAudioManager( |
464 ::media::AudioLogFactory* audio_log_factory) { | 454 ::media::AudioLogFactory* audio_log_factory) { |
465 return ::media::ScopedAudioManagerPtr(new media::CastAudioManager( | 455 return ::media::ScopedAudioManagerPtr(new media::CastAudioManager( |
466 GetMediaTaskRunner(), GetMediaTaskRunner(), audio_log_factory, | 456 GetMediaTaskRunner(), GetMediaTaskRunner(), audio_log_factory, |
467 media_pipeline_backend_manager())); | 457 media_pipeline_backend_manager())); |
468 } | 458 } |
469 | 459 |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
533 process_type, dumps_path, false /* upload */); | 523 process_type, dumps_path, false /* upload */); |
534 // StartUploaderThread() even though upload is diferred. | 524 // StartUploaderThread() even though upload is diferred. |
535 // Breakpad-related memory is freed in the uploader thread. | 525 // Breakpad-related memory is freed in the uploader thread. |
536 crash_handler->StartUploaderThread(); | 526 crash_handler->StartUploaderThread(); |
537 return crash_handler; | 527 return crash_handler; |
538 } | 528 } |
539 #endif // !defined(OS_ANDROID) | 529 #endif // !defined(OS_ANDROID) |
540 | 530 |
541 } // namespace shell | 531 } // namespace shell |
542 } // namespace chromecast | 532 } // namespace chromecast |
OLD | NEW |