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

Side by Side Diff: chrome/browser/chrome_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, 4 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "chrome/browser/chrome_content_browser_client.h" 5 #include "chrome/browser/chrome_content_browser_client.h"
6 6
7 #include <map> 7 #include <map>
8 #include <set> 8 #include <set>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 2700 matching lines...) Expand 10 before | Expand all | Expand 10 after
2711 &(*regions)[kAndroidUIResourcesPakDescriptor]); 2711 &(*regions)[kAndroidUIResourcesPakDescriptor]);
2712 mappings->Share(kAndroidUIResourcesPakDescriptor, fd); 2712 mappings->Share(kAndroidUIResourcesPakDescriptor, fd);
2713 2713
2714 fd = ui::GetCommonResourcesPackFd( 2714 fd = ui::GetCommonResourcesPackFd(
2715 &(*regions)[kAndroidChrome100PercentPakDescriptor]); 2715 &(*regions)[kAndroidChrome100PercentPakDescriptor]);
2716 mappings->Share(kAndroidChrome100PercentPakDescriptor, fd); 2716 mappings->Share(kAndroidChrome100PercentPakDescriptor, fd);
2717 2717
2718 fd = ui::GetLocalePackFd(&(*regions)[kAndroidLocalePakDescriptor]); 2718 fd = ui::GetLocalePackFd(&(*regions)[kAndroidLocalePakDescriptor]);
2719 mappings->Share(kAndroidLocalePakDescriptor, fd); 2719 mappings->Share(kAndroidLocalePakDescriptor, fd);
2720 2720
2721 if (breakpad::IsCrashReporterEnabled()) { 2721 breakpad::CrashDumpObserver::GetInstance()->BrowserChildProcessStarted(
2722 base::File file = 2722 child_process_id, mappings);
2723 breakpad::CrashDumpManager::GetInstance()->CreateMinidumpFile(
2724 child_process_id);
2725 if (file.IsValid()) {
2726 mappings->Transfer(kAndroidMinidumpDescriptor,
2727 base::ScopedFD(file.TakePlatformFile()));
2728 } else {
2729 LOG(ERROR) << "Failed to create file for minidump, crash reporting will "
2730 "be disabled for this process.";
2731 }
2732 }
2733 2723
2734 base::FilePath app_data_path; 2724 base::FilePath app_data_path;
2735 PathService::Get(base::DIR_ANDROID_APP_DATA, &app_data_path); 2725 PathService::Get(base::DIR_ANDROID_APP_DATA, &app_data_path);
2736 DCHECK(!app_data_path.empty()); 2726 DCHECK(!app_data_path.empty());
2737 } 2727 }
2738 #elif defined(OS_POSIX) && !defined(OS_MACOSX) 2728 #elif defined(OS_POSIX) && !defined(OS_MACOSX)
2739 void ChromeContentBrowserClient::GetAdditionalMappedFilesForChildProcess( 2729 void ChromeContentBrowserClient::GetAdditionalMappedFilesForChildProcess(
2740 const base::CommandLine& command_line, 2730 const base::CommandLine& command_line,
2741 int child_process_id, 2731 int child_process_id,
2742 FileDescriptorInfo* mappings) { 2732 FileDescriptorInfo* mappings) {
(...skipping 417 matching lines...) Expand 10 before | Expand all | Expand 10 after
3160 if (channel <= kMaxDisableEncryptionChannel) { 3150 if (channel <= kMaxDisableEncryptionChannel) {
3161 static const char* const kWebRtcDevSwitchNames[] = { 3151 static const char* const kWebRtcDevSwitchNames[] = {
3162 switches::kDisableWebRtcEncryption, 3152 switches::kDisableWebRtcEncryption,
3163 }; 3153 };
3164 to_command_line->CopySwitchesFrom(from_command_line, 3154 to_command_line->CopySwitchesFrom(from_command_line,
3165 kWebRtcDevSwitchNames, 3155 kWebRtcDevSwitchNames,
3166 arraysize(kWebRtcDevSwitchNames)); 3156 arraysize(kWebRtcDevSwitchNames));
3167 } 3157 }
3168 } 3158 }
3169 #endif // defined(ENABLE_WEBRTC) 3159 #endif // defined(ENABLE_WEBRTC)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698