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