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