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 2802 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2813 base::MemoryMappedFile::Region region; | 2813 base::MemoryMappedFile::Region region; |
2814 int fd = ui::GetMainAndroidPackFd(®ion); | 2814 int fd = ui::GetMainAndroidPackFd(®ion); |
2815 mappings->ShareWithRegion(kAndroidUIResourcesPakDescriptor, fd, region); | 2815 mappings->ShareWithRegion(kAndroidUIResourcesPakDescriptor, fd, region); |
2816 | 2816 |
2817 fd = ui::GetCommonResourcesPackFd(®ion); | 2817 fd = ui::GetCommonResourcesPackFd(®ion); |
2818 mappings->ShareWithRegion(kAndroidChrome100PercentPakDescriptor, fd, region); | 2818 mappings->ShareWithRegion(kAndroidChrome100PercentPakDescriptor, fd, region); |
2819 | 2819 |
2820 fd = ui::GetLocalePackFd(®ion); | 2820 fd = ui::GetLocalePackFd(®ion); |
2821 mappings->ShareWithRegion(kAndroidLocalePakDescriptor, fd, region); | 2821 mappings->ShareWithRegion(kAndroidLocalePakDescriptor, fd, region); |
2822 | 2822 |
2823 if (breakpad::IsCrashReporterEnabled()) { | 2823 breakpad::CrashDumpObserver::GetInstance()->BrowserChildProcessStarted( |
2824 base::File file = | 2824 child_process_id, mappings); |
2825 breakpad::CrashDumpManager::GetInstance()->CreateMinidumpFile( | |
2826 child_process_id); | |
2827 if (file.IsValid()) { | |
2828 mappings->Transfer(kAndroidMinidumpDescriptor, | |
2829 base::ScopedFD(file.TakePlatformFile())); | |
2830 } else { | |
2831 LOG(ERROR) << "Failed to create file for minidump, crash reporting will " | |
2832 "be disabled for this process."; | |
2833 } | |
2834 } | |
2835 | 2825 |
2836 base::FilePath app_data_path; | 2826 base::FilePath app_data_path; |
2837 PathService::Get(base::DIR_ANDROID_APP_DATA, &app_data_path); | 2827 PathService::Get(base::DIR_ANDROID_APP_DATA, &app_data_path); |
2838 DCHECK(!app_data_path.empty()); | 2828 DCHECK(!app_data_path.empty()); |
2839 #else | 2829 #else |
2840 int crash_signal_fd = GetCrashSignalFD(command_line); | 2830 int crash_signal_fd = GetCrashSignalFD(command_line); |
2841 if (crash_signal_fd >= 0) { | 2831 if (crash_signal_fd >= 0) { |
2842 mappings->Share(kCrashDumpSignal, crash_signal_fd); | 2832 mappings->Share(kCrashDumpSignal, crash_signal_fd); |
2843 } | 2833 } |
2844 #endif // defined(OS_ANDROID) | 2834 #endif // defined(OS_ANDROID) |
(...skipping 518 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3363 bool ChromeContentBrowserClient::ShouldRedirectDOMStorageTaskRunner() { | 3353 bool ChromeContentBrowserClient::ShouldRedirectDOMStorageTaskRunner() { |
3364 return variations::GetVariationParamValue( | 3354 return variations::GetVariationParamValue( |
3365 "BrowserScheduler", "RedirectDOMStorageTaskRunner") == "true"; | 3355 "BrowserScheduler", "RedirectDOMStorageTaskRunner") == "true"; |
3366 } | 3356 } |
3367 | 3357 |
3368 bool ChromeContentBrowserClient:: | 3358 bool ChromeContentBrowserClient:: |
3369 RedirectNonUINonIOBrowserThreadsToTaskScheduler() { | 3359 RedirectNonUINonIOBrowserThreadsToTaskScheduler() { |
3370 return variations::GetVariationParamValue( | 3360 return variations::GetVariationParamValue( |
3371 "BrowserScheduler", "RedirectNonUINonIOBrowserThreads") == "true"; | 3361 "BrowserScheduler", "RedirectNonUINonIOBrowserThreads") == "true"; |
3372 } | 3362 } |
OLD | NEW |