| OLD | NEW |
| 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 2701 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2712 &(*regions)[kAndroidUIResourcesPakDescriptor]); | 2712 &(*regions)[kAndroidUIResourcesPakDescriptor]); |
| 2713 mappings->Share(kAndroidUIResourcesPakDescriptor, fd); | 2713 mappings->Share(kAndroidUIResourcesPakDescriptor, fd); |
| 2714 | 2714 |
| 2715 fd = ui::GetCommonResourcesPackFd( | 2715 fd = ui::GetCommonResourcesPackFd( |
| 2716 &(*regions)[kAndroidChrome100PercentPakDescriptor]); | 2716 &(*regions)[kAndroidChrome100PercentPakDescriptor]); |
| 2717 mappings->Share(kAndroidChrome100PercentPakDescriptor, fd); | 2717 mappings->Share(kAndroidChrome100PercentPakDescriptor, fd); |
| 2718 | 2718 |
| 2719 fd = ui::GetLocalePackFd(&(*regions)[kAndroidLocalePakDescriptor]); | 2719 fd = ui::GetLocalePackFd(&(*regions)[kAndroidLocalePakDescriptor]); |
| 2720 mappings->Share(kAndroidLocalePakDescriptor, fd); | 2720 mappings->Share(kAndroidLocalePakDescriptor, fd); |
| 2721 | 2721 |
| 2722 breakpad::CrashDumpObserver::GetInstance()->BrowserChildProcessStarted( | 2722 if (breakpad::IsCrashReporterEnabled()) { |
| 2723 child_process_id, mappings); | 2723 base::File file = |
| 2724 breakpad::CrashDumpManager::GetInstance()->CreateMinidumpFile( |
| 2725 child_process_id); |
| 2726 if (file.IsValid()) { |
| 2727 mappings->Transfer(kAndroidMinidumpDescriptor, |
| 2728 base::ScopedFD(file.TakePlatformFile())); |
| 2729 } else { |
| 2730 LOG(ERROR) << "Failed to create file for minidump, crash reporting will " |
| 2731 "be disabled for this process."; |
| 2732 } |
| 2733 } |
| 2724 | 2734 |
| 2725 base::FilePath app_data_path; | 2735 base::FilePath app_data_path; |
| 2726 PathService::Get(base::DIR_ANDROID_APP_DATA, &app_data_path); | 2736 PathService::Get(base::DIR_ANDROID_APP_DATA, &app_data_path); |
| 2727 DCHECK(!app_data_path.empty()); | 2737 DCHECK(!app_data_path.empty()); |
| 2728 } | 2738 } |
| 2729 #elif defined(OS_POSIX) && !defined(OS_MACOSX) | 2739 #elif defined(OS_POSIX) && !defined(OS_MACOSX) |
| 2730 void ChromeContentBrowserClient::GetAdditionalMappedFilesForChildProcess( | 2740 void ChromeContentBrowserClient::GetAdditionalMappedFilesForChildProcess( |
| 2731 const base::CommandLine& command_line, | 2741 const base::CommandLine& command_line, |
| 2732 int child_process_id, | 2742 int child_process_id, |
| 2733 FileDescriptorInfo* mappings) { | 2743 FileDescriptorInfo* mappings) { |
| (...skipping 419 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3153 if (channel <= kMaxDisableEncryptionChannel) { | 3163 if (channel <= kMaxDisableEncryptionChannel) { |
| 3154 static const char* const kWebRtcDevSwitchNames[] = { | 3164 static const char* const kWebRtcDevSwitchNames[] = { |
| 3155 switches::kDisableWebRtcEncryption, | 3165 switches::kDisableWebRtcEncryption, |
| 3156 }; | 3166 }; |
| 3157 to_command_line->CopySwitchesFrom(from_command_line, | 3167 to_command_line->CopySwitchesFrom(from_command_line, |
| 3158 kWebRtcDevSwitchNames, | 3168 kWebRtcDevSwitchNames, |
| 3159 arraysize(kWebRtcDevSwitchNames)); | 3169 arraysize(kWebRtcDevSwitchNames)); |
| 3160 } | 3170 } |
| 3161 } | 3171 } |
| 3162 #endif // defined(ENABLE_WEBRTC) | 3172 #endif // defined(ENABLE_WEBRTC) |
| OLD | NEW |