Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(43)

Side by Side Diff: chromecast/browser/cast_content_browser_client.cc

Issue 2200693002: Refactor CrashDump*Manager to use a shared CrashDumpObserver. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 432 matching lines...) Expand 10 before | Expand all | Expand 10 after
443 int child_process_id, 443 int child_process_id,
444 content::FileDescriptorInfo* mappings, 444 content::FileDescriptorInfo* mappings,
445 std::map<int, base::MemoryMappedFile::Region>* regions) { 445 std::map<int, base::MemoryMappedFile::Region>* regions) {
446 mappings->Share( 446 mappings->Share(
447 kAndroidPakDescriptor, 447 kAndroidPakDescriptor,
448 base::GlobalDescriptors::GetInstance()->Get(kAndroidPakDescriptor)); 448 base::GlobalDescriptors::GetInstance()->Get(kAndroidPakDescriptor));
449 regions->insert(std::make_pair( 449 regions->insert(std::make_pair(
450 kAndroidPakDescriptor, base::GlobalDescriptors::GetInstance()->GetRegion( 450 kAndroidPakDescriptor, base::GlobalDescriptors::GetInstance()->GetRegion(
451 kAndroidPakDescriptor))); 451 kAndroidPakDescriptor)));
452 452
453 if (breakpad::IsCrashReporterEnabled()) { 453 breakpad::CrashDumpObserver::GetInstance()->BrowserChildProcessStarted(
454 base::File minidump_file( 454 child_process_id, mappings);
455 breakpad::CrashDumpManager::GetInstance()->CreateMinidumpFile(
456 child_process_id));
457 if (!minidump_file.IsValid()) {
458 LOG(ERROR) << "Failed to create file for minidump, crash reporting will "
459 << "be disabled for this process.";
460 } else {
461 mappings->Transfer(kAndroidMinidumpDescriptor,
462 base::ScopedFD(minidump_file.TakePlatformFile()));
463 }
464 }
465 } 455 }
466 456
467 #else 457 #else
468 ::media::ScopedAudioManagerPtr CastContentBrowserClient::CreateAudioManager( 458 ::media::ScopedAudioManagerPtr CastContentBrowserClient::CreateAudioManager(
469 ::media::AudioLogFactory* audio_log_factory) { 459 ::media::AudioLogFactory* audio_log_factory) {
470 return ::media::ScopedAudioManagerPtr(new media::CastAudioManager( 460 return ::media::ScopedAudioManagerPtr(new media::CastAudioManager(
471 GetMediaTaskRunner(), GetMediaTaskRunner(), audio_log_factory, 461 GetMediaTaskRunner(), GetMediaTaskRunner(), audio_log_factory,
472 media_pipeline_backend_manager())); 462 media_pipeline_backend_manager()));
473 } 463 }
474 464
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
550 process_type, dumps_path, false /* upload */); 540 process_type, dumps_path, false /* upload */);
551 // StartUploaderThread() even though upload is diferred. 541 // StartUploaderThread() even though upload is diferred.
552 // Breakpad-related memory is freed in the uploader thread. 542 // Breakpad-related memory is freed in the uploader thread.
553 crash_handler->StartUploaderThread(); 543 crash_handler->StartUploaderThread();
554 return crash_handler; 544 return crash_handler;
555 } 545 }
556 #endif // !defined(OS_ANDROID) 546 #endif // !defined(OS_ANDROID)
557 547
558 } // namespace shell 548 } // namespace shell
559 } // namespace chromecast 549 } // namespace chromecast
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698