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 2727 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2738 &(*regions)[kAndroidUIResourcesPakDescriptor]); | 2738 &(*regions)[kAndroidUIResourcesPakDescriptor]); |
2739 mappings->Share(kAndroidUIResourcesPakDescriptor, fd); | 2739 mappings->Share(kAndroidUIResourcesPakDescriptor, fd); |
2740 | 2740 |
2741 fd = ui::GetCommonResourcesPackFd( | 2741 fd = ui::GetCommonResourcesPackFd( |
2742 &(*regions)[kAndroidChrome100PercentPakDescriptor]); | 2742 &(*regions)[kAndroidChrome100PercentPakDescriptor]); |
2743 mappings->Share(kAndroidChrome100PercentPakDescriptor, fd); | 2743 mappings->Share(kAndroidChrome100PercentPakDescriptor, fd); |
2744 | 2744 |
2745 fd = ui::GetLocalePackFd(&(*regions)[kAndroidLocalePakDescriptor]); | 2745 fd = ui::GetLocalePackFd(&(*regions)[kAndroidLocalePakDescriptor]); |
2746 mappings->Share(kAndroidLocalePakDescriptor, fd); | 2746 mappings->Share(kAndroidLocalePakDescriptor, fd); |
2747 | 2747 |
2748 if (breakpad::IsCrashReporterEnabled()) { | 2748 breakpad::CrashDumpObserver::GetInstance()->BrowserChildProcessStarted( |
2749 base::File file = | 2749 child_process_id, mappings); |
2750 breakpad::CrashDumpManager::GetInstance()->CreateMinidumpFile( | |
2751 child_process_id); | |
2752 if (file.IsValid()) { | |
2753 mappings->Transfer(kAndroidMinidumpDescriptor, | |
2754 base::ScopedFD(file.TakePlatformFile())); | |
2755 } else { | |
2756 LOG(ERROR) << "Failed to create file for minidump, crash reporting will " | |
2757 "be disabled for this process."; | |
2758 } | |
2759 } | |
2760 | 2750 |
2761 base::FilePath app_data_path; | 2751 base::FilePath app_data_path; |
2762 PathService::Get(base::DIR_ANDROID_APP_DATA, &app_data_path); | 2752 PathService::Get(base::DIR_ANDROID_APP_DATA, &app_data_path); |
2763 DCHECK(!app_data_path.empty()); | 2753 DCHECK(!app_data_path.empty()); |
2764 } | 2754 } |
2765 #elif defined(OS_POSIX) && !defined(OS_MACOSX) | 2755 #elif defined(OS_POSIX) && !defined(OS_MACOSX) |
2766 void ChromeContentBrowserClient::GetAdditionalMappedFilesForChildProcess( | 2756 void ChromeContentBrowserClient::GetAdditionalMappedFilesForChildProcess( |
2767 const base::CommandLine& command_line, | 2757 const base::CommandLine& command_line, |
2768 int child_process_id, | 2758 int child_process_id, |
2769 FileDescriptorInfo* mappings) { | 2759 FileDescriptorInfo* mappings) { |
(...skipping 463 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3233 if (channel <= kMaxDisableEncryptionChannel) { | 3223 if (channel <= kMaxDisableEncryptionChannel) { |
3234 static const char* const kWebRtcDevSwitchNames[] = { | 3224 static const char* const kWebRtcDevSwitchNames[] = { |
3235 switches::kDisableWebRtcEncryption, | 3225 switches::kDisableWebRtcEncryption, |
3236 }; | 3226 }; |
3237 to_command_line->CopySwitchesFrom(from_command_line, | 3227 to_command_line->CopySwitchesFrom(from_command_line, |
3238 kWebRtcDevSwitchNames, | 3228 kWebRtcDevSwitchNames, |
3239 arraysize(kWebRtcDevSwitchNames)); | 3229 arraysize(kWebRtcDevSwitchNames)); |
3240 } | 3230 } |
3241 } | 3231 } |
3242 #endif // defined(ENABLE_WEBRTC) | 3232 #endif // defined(ENABLE_WEBRTC) |
OLD | NEW |