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 <set> | 7 #include <set> |
8 #include <utility> | 8 #include <utility> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 1822 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1833 FileDescriptor(f, true))); | 1833 FileDescriptor(f, true))); |
1834 | 1834 |
1835 FilePath resources_pack_path; | 1835 FilePath resources_pack_path; |
1836 PathService::Get(chrome::FILE_RESOURCES_PACK, &resources_pack_path); | 1836 PathService::Get(chrome::FILE_RESOURCES_PACK, &resources_pack_path); |
1837 f = base::CreatePlatformFile(resources_pack_path, flags, NULL, NULL); | 1837 f = base::CreatePlatformFile(resources_pack_path, flags, NULL, NULL); |
1838 DCHECK(f != base::kInvalidPlatformFileValue); | 1838 DCHECK(f != base::kInvalidPlatformFileValue); |
1839 mappings->push_back(FileDescriptorInfo(kAndroidUIResourcesPakDescriptor, | 1839 mappings->push_back(FileDescriptorInfo(kAndroidUIResourcesPakDescriptor, |
1840 FileDescriptor(f, true))); | 1840 FileDescriptor(f, true))); |
1841 | 1841 |
1842 #if defined(USE_LINUX_BREAKPAD) | 1842 #if defined(USE_LINUX_BREAKPAD) |
1843 f = CrashDumpManager::GetInstance()->CreateMinidumpFile(child_process_id); | 1843 if (IsCrashReporterEnabled()) { |
1844 if (f == base::kInvalidPlatformFileValue) { | 1844 f = CrashDumpManager::GetInstance()->CreateMinidumpFile(child_process_id); |
1845 LOG(ERROR) << "Failed to create file for minidump, crash reporting will be " | 1845 if (f == base::kInvalidPlatformFileValue) { |
1846 "disabled for this process."; | 1846 LOG(ERROR) << "Failed to create file for minidump, crash reporting will " |
1847 } else { | 1847 "be disabled for this process."; |
1848 mappings->push_back(FileDescriptorInfo(kAndroidMinidumpDescriptor, | 1848 } else { |
1849 FileDescriptor(f, true))); | 1849 mappings->push_back(FileDescriptorInfo(kAndroidMinidumpDescriptor, |
| 1850 FileDescriptor(f, true))); |
| 1851 } |
1850 } | 1852 } |
1851 #endif // defined(USE_LINUX_BREAKPAD) | 1853 #endif // defined(USE_LINUX_BREAKPAD) |
1852 | 1854 |
1853 #else | 1855 #else |
1854 int crash_signal_fd = GetCrashSignalFD(command_line); | 1856 int crash_signal_fd = GetCrashSignalFD(command_line); |
1855 if (crash_signal_fd >= 0) { | 1857 if (crash_signal_fd >= 0) { |
1856 mappings->push_back(FileDescriptorInfo(kCrashDumpSignal, | 1858 mappings->push_back(FileDescriptorInfo(kCrashDumpSignal, |
1857 FileDescriptor(crash_signal_fd, | 1859 FileDescriptor(crash_signal_fd, |
1858 false))); | 1860 false))); |
1859 } | 1861 } |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1895 io_thread_application_locale_ = locale; | 1897 io_thread_application_locale_ = locale; |
1896 } | 1898 } |
1897 | 1899 |
1898 void ChromeContentBrowserClient::SetApplicationLocaleOnIOThread( | 1900 void ChromeContentBrowserClient::SetApplicationLocaleOnIOThread( |
1899 const std::string& locale) { | 1901 const std::string& locale) { |
1900 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); | 1902 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
1901 io_thread_application_locale_ = locale; | 1903 io_thread_application_locale_ = locale; |
1902 } | 1904 } |
1903 | 1905 |
1904 } // namespace chrome | 1906 } // namespace chrome |
OLD | NEW |