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 2824 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2835 &(*regions)[kAndroidUIResourcesPakDescriptor]); | 2835 &(*regions)[kAndroidUIResourcesPakDescriptor]); |
2836 mappings->Share(kAndroidUIResourcesPakDescriptor, fd); | 2836 mappings->Share(kAndroidUIResourcesPakDescriptor, fd); |
2837 | 2837 |
2838 fd = ui::GetCommonResourcesPackFd( | 2838 fd = ui::GetCommonResourcesPackFd( |
2839 &(*regions)[kAndroidChrome100PercentPakDescriptor]); | 2839 &(*regions)[kAndroidChrome100PercentPakDescriptor]); |
2840 mappings->Share(kAndroidChrome100PercentPakDescriptor, fd); | 2840 mappings->Share(kAndroidChrome100PercentPakDescriptor, fd); |
2841 | 2841 |
2842 fd = ui::GetLocalePackFd(&(*regions)[kAndroidLocalePakDescriptor]); | 2842 fd = ui::GetLocalePackFd(&(*regions)[kAndroidLocalePakDescriptor]); |
2843 mappings->Share(kAndroidLocalePakDescriptor, fd); | 2843 mappings->Share(kAndroidLocalePakDescriptor, fd); |
2844 | 2844 |
2845 if (breakpad::IsCrashReporterEnabled()) { | 2845 breakpad::CrashDumpObserver::GetInstance()->BrowserChildProcessStarted( |
2846 base::File file = | 2846 child_process_id, mappings); |
2847 breakpad::CrashDumpManager::GetInstance()->CreateMinidumpFile( | |
2848 child_process_id); | |
2849 if (file.IsValid()) { | |
2850 mappings->Transfer(kAndroidMinidumpDescriptor, | |
2851 base::ScopedFD(file.TakePlatformFile())); | |
2852 } else { | |
2853 LOG(ERROR) << "Failed to create file for minidump, crash reporting will " | |
2854 "be disabled for this process."; | |
2855 } | |
2856 } | |
2857 | 2847 |
2858 base::FilePath app_data_path; | 2848 base::FilePath app_data_path; |
2859 PathService::Get(base::DIR_ANDROID_APP_DATA, &app_data_path); | 2849 PathService::Get(base::DIR_ANDROID_APP_DATA, &app_data_path); |
2860 DCHECK(!app_data_path.empty()); | 2850 DCHECK(!app_data_path.empty()); |
2861 } | 2851 } |
2862 #elif defined(OS_POSIX) && !defined(OS_MACOSX) | 2852 #elif defined(OS_POSIX) && !defined(OS_MACOSX) |
2863 void ChromeContentBrowserClient::GetAdditionalMappedFilesForChildProcess( | 2853 void ChromeContentBrowserClient::GetAdditionalMappedFilesForChildProcess( |
2864 const base::CommandLine& command_line, | 2854 const base::CommandLine& command_line, |
2865 int child_process_id, | 2855 int child_process_id, |
2866 FileDescriptorInfo* mappings) { | 2856 FileDescriptorInfo* mappings) { |
(...skipping 480 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3347 GetBrowserSchedulerWorkerPoolParamsFromVariations(); | 3337 GetBrowserSchedulerWorkerPoolParamsFromVariations(); |
3348 *index_to_traits_callback = base::Bind(&task_scheduler_util::initialization:: | 3338 *index_to_traits_callback = base::Bind(&task_scheduler_util::initialization:: |
3349 BrowserWorkerPoolIndexForTraits); | 3339 BrowserWorkerPoolIndexForTraits); |
3350 } | 3340 } |
3351 | 3341 |
3352 void ChromeContentBrowserClient:: | 3342 void ChromeContentBrowserClient:: |
3353 PerformExperimentalTaskSchedulerRedirections() { | 3343 PerformExperimentalTaskSchedulerRedirections() { |
3354 task_scheduler_util::variations:: | 3344 task_scheduler_util::variations:: |
3355 MaybePerformBrowserTaskSchedulerRedirection(); | 3345 MaybePerformBrowserTaskSchedulerRedirection(); |
3356 } | 3346 } |
OLD | NEW |