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 2760 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2771 &(*regions)[kAndroidUIResourcesPakDescriptor]); | 2771 &(*regions)[kAndroidUIResourcesPakDescriptor]); |
2772 mappings->Share(kAndroidUIResourcesPakDescriptor, fd); | 2772 mappings->Share(kAndroidUIResourcesPakDescriptor, fd); |
2773 | 2773 |
2774 fd = ui::GetCommonResourcesPackFd( | 2774 fd = ui::GetCommonResourcesPackFd( |
2775 &(*regions)[kAndroidChrome100PercentPakDescriptor]); | 2775 &(*regions)[kAndroidChrome100PercentPakDescriptor]); |
2776 mappings->Share(kAndroidChrome100PercentPakDescriptor, fd); | 2776 mappings->Share(kAndroidChrome100PercentPakDescriptor, fd); |
2777 | 2777 |
2778 fd = ui::GetLocalePackFd(&(*regions)[kAndroidLocalePakDescriptor]); | 2778 fd = ui::GetLocalePackFd(&(*regions)[kAndroidLocalePakDescriptor]); |
2779 mappings->Share(kAndroidLocalePakDescriptor, fd); | 2779 mappings->Share(kAndroidLocalePakDescriptor, fd); |
2780 | 2780 |
2781 if (breakpad::IsCrashReporterEnabled()) { | 2781 breakpad::CrashDumpObserver::GetInstance()->BrowserChildProcessStarted( |
boliu
2016/10/13 21:07:18
so now we transfer the handles regardless of wheth
boliu
2016/10/13 21:08:50
Oops, read that one wrong, ignore..
Tobias Sargeant
2016/12/08 16:41:41
Acknowledged.
| |
2782 base::File file = | 2782 child_process_id, mappings); |
2783 breakpad::CrashDumpManager::GetInstance()->CreateMinidumpFile( | |
2784 child_process_id); | |
2785 if (file.IsValid()) { | |
2786 mappings->Transfer(kAndroidMinidumpDescriptor, | |
2787 base::ScopedFD(file.TakePlatformFile())); | |
2788 } else { | |
2789 LOG(ERROR) << "Failed to create file for minidump, crash reporting will " | |
2790 "be disabled for this process."; | |
2791 } | |
2792 } | |
2793 | 2783 |
2794 base::FilePath app_data_path; | 2784 base::FilePath app_data_path; |
2795 PathService::Get(base::DIR_ANDROID_APP_DATA, &app_data_path); | 2785 PathService::Get(base::DIR_ANDROID_APP_DATA, &app_data_path); |
2796 DCHECK(!app_data_path.empty()); | 2786 DCHECK(!app_data_path.empty()); |
2797 } | 2787 } |
2798 #elif defined(OS_POSIX) && !defined(OS_MACOSX) | 2788 #elif defined(OS_POSIX) && !defined(OS_MACOSX) |
2799 void ChromeContentBrowserClient::GetAdditionalMappedFilesForChildProcess( | 2789 void ChromeContentBrowserClient::GetAdditionalMappedFilesForChildProcess( |
2800 const base::CommandLine& command_line, | 2790 const base::CommandLine& command_line, |
2801 int child_process_id, | 2791 int child_process_id, |
2802 FileDescriptorInfo* mappings) { | 2792 FileDescriptorInfo* mappings) { |
(...skipping 474 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3277 if (channel <= kMaxDisableEncryptionChannel) { | 3267 if (channel <= kMaxDisableEncryptionChannel) { |
3278 static const char* const kWebRtcDevSwitchNames[] = { | 3268 static const char* const kWebRtcDevSwitchNames[] = { |
3279 switches::kDisableWebRtcEncryption, | 3269 switches::kDisableWebRtcEncryption, |
3280 }; | 3270 }; |
3281 to_command_line->CopySwitchesFrom(from_command_line, | 3271 to_command_line->CopySwitchesFrom(from_command_line, |
3282 kWebRtcDevSwitchNames, | 3272 kWebRtcDevSwitchNames, |
3283 arraysize(kWebRtcDevSwitchNames)); | 3273 arraysize(kWebRtcDevSwitchNames)); |
3284 } | 3274 } |
3285 } | 3275 } |
3286 #endif // defined(ENABLE_WEBRTC) | 3276 #endif // defined(ENABLE_WEBRTC) |
OLD | NEW |