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