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 2599 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2610 &(*regions)[kAndroidUIResourcesPakDescriptor]); | 2610 &(*regions)[kAndroidUIResourcesPakDescriptor]); |
2611 mappings->Share(kAndroidUIResourcesPakDescriptor, fd); | 2611 mappings->Share(kAndroidUIResourcesPakDescriptor, fd); |
2612 | 2612 |
2613 fd = ui::GetCommonResourcesPackFd( | 2613 fd = ui::GetCommonResourcesPackFd( |
2614 &(*regions)[kAndroidChrome100PercentPakDescriptor]); | 2614 &(*regions)[kAndroidChrome100PercentPakDescriptor]); |
2615 mappings->Share(kAndroidChrome100PercentPakDescriptor, fd); | 2615 mappings->Share(kAndroidChrome100PercentPakDescriptor, fd); |
2616 | 2616 |
2617 fd = ui::GetLocalePackFd(&(*regions)[kAndroidLocalePakDescriptor]); | 2617 fd = ui::GetLocalePackFd(&(*regions)[kAndroidLocalePakDescriptor]); |
2618 mappings->Share(kAndroidLocalePakDescriptor, fd); | 2618 mappings->Share(kAndroidLocalePakDescriptor, fd); |
2619 | 2619 |
2620 if (breakpad::IsCrashReporterEnabled()) { | 2620 breakpad::CrashDumpObserver::GetInstance()->BrowserChildProcessStarted( |
2621 base::File file = | 2621 child_process_id, mappings); |
2622 breakpad::CrashDumpManager::GetInstance()->CreateMinidumpFile( | |
2623 child_process_id); | |
2624 if (file.IsValid()) { | |
2625 mappings->Transfer(kAndroidMinidumpDescriptor, | |
2626 base::ScopedFD(file.TakePlatformFile())); | |
2627 } else { | |
2628 LOG(ERROR) << "Failed to create file for minidump, crash reporting will " | |
2629 "be disabled for this process."; | |
2630 } | |
2631 } | |
2632 | 2622 |
2633 base::FilePath app_data_path; | 2623 base::FilePath app_data_path; |
2634 PathService::Get(base::DIR_ANDROID_APP_DATA, &app_data_path); | 2624 PathService::Get(base::DIR_ANDROID_APP_DATA, &app_data_path); |
2635 DCHECK(!app_data_path.empty()); | 2625 DCHECK(!app_data_path.empty()); |
2636 } | 2626 } |
2637 #elif defined(OS_POSIX) && !defined(OS_MACOSX) | 2627 #elif defined(OS_POSIX) && !defined(OS_MACOSX) |
2638 void ChromeContentBrowserClient::GetAdditionalMappedFilesForChildProcess( | 2628 void ChromeContentBrowserClient::GetAdditionalMappedFilesForChildProcess( |
2639 const base::CommandLine& command_line, | 2629 const base::CommandLine& command_line, |
2640 int child_process_id, | 2630 int child_process_id, |
2641 FileDescriptorInfo* mappings) { | 2631 FileDescriptorInfo* mappings) { |
(...skipping 418 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3060 if (channel <= kMaxDisableEncryptionChannel) { | 3050 if (channel <= kMaxDisableEncryptionChannel) { |
3061 static const char* const kWebRtcDevSwitchNames[] = { | 3051 static const char* const kWebRtcDevSwitchNames[] = { |
3062 switches::kDisableWebRtcEncryption, | 3052 switches::kDisableWebRtcEncryption, |
3063 }; | 3053 }; |
3064 to_command_line->CopySwitchesFrom(from_command_line, | 3054 to_command_line->CopySwitchesFrom(from_command_line, |
3065 kWebRtcDevSwitchNames, | 3055 kWebRtcDevSwitchNames, |
3066 arraysize(kWebRtcDevSwitchNames)); | 3056 arraysize(kWebRtcDevSwitchNames)); |
3067 } | 3057 } |
3068 } | 3058 } |
3069 #endif // defined(ENABLE_WEBRTC) | 3059 #endif // defined(ENABLE_WEBRTC) |
OLD | NEW |