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