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