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 1811 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1822 base::PlatformFile f = | 1822 base::PlatformFile f = |
1823 base::CreatePlatformFile(chrome_pak, flags, NULL, NULL); | 1823 base::CreatePlatformFile(chrome_pak, flags, NULL, NULL); |
1824 DCHECK(f != base::kInvalidPlatformFileValue); | 1824 DCHECK(f != base::kInvalidPlatformFileValue); |
1825 mappings->push_back(FileDescriptorInfo(kAndroidChromePakDescriptor, | 1825 mappings->push_back(FileDescriptorInfo(kAndroidChromePakDescriptor, |
1826 FileDescriptor(f, true))); | 1826 FileDescriptor(f, true))); |
1827 | 1827 |
1828 FilePath chrome_resources_pak = | 1828 FilePath chrome_resources_pak = |
1829 data_path.AppendASCII("chrome_100_percent.pak"); | 1829 data_path.AppendASCII("chrome_100_percent.pak"); |
1830 f = base::CreatePlatformFile(chrome_resources_pak, flags, NULL, NULL); | 1830 f = base::CreatePlatformFile(chrome_resources_pak, flags, NULL, NULL); |
1831 DCHECK(f != base::kInvalidPlatformFileValue); | 1831 DCHECK(f != base::kInvalidPlatformFileValue); |
1832 mappings->push_back(FileDescriptorInfo(kAndroidUIResourcesPakDescriptor, | 1832 mappings->push_back(FileDescriptorInfo(kAndroidChrome100PercentPakDescriptor, |
1833 FileDescriptor(f, true))); | 1833 FileDescriptor(f, true))); |
1834 | 1834 |
1835 const std::string locale = GetApplicationLocale(); | 1835 const std::string locale = GetApplicationLocale(); |
1836 FilePath locale_pak = ResourceBundle::GetSharedInstance(). | 1836 FilePath locale_pak = ResourceBundle::GetSharedInstance(). |
1837 GetLocaleFilePath(locale, false); | 1837 GetLocaleFilePath(locale, false); |
1838 f = base::CreatePlatformFile(locale_pak, flags, NULL, NULL); | 1838 f = base::CreatePlatformFile(locale_pak, flags, NULL, NULL); |
1839 DCHECK(f != base::kInvalidPlatformFileValue); | 1839 DCHECK(f != base::kInvalidPlatformFileValue); |
1840 mappings->push_back(FileDescriptorInfo(kAndroidLocalePakDescriptor, | 1840 mappings->push_back(FileDescriptorInfo(kAndroidLocalePakDescriptor, |
1841 FileDescriptor(f, true))); | 1841 FileDescriptor(f, true))); |
1842 | 1842 |
| 1843 FilePath resources_pack_path; |
| 1844 PathService::Get(chrome::FILE_RESOURCES_PACK, &resources_pack_path); |
| 1845 f = base::CreatePlatformFile(resources_pack_path, flags, NULL, NULL); |
| 1846 DCHECK(f != base::kInvalidPlatformFileValue); |
| 1847 mappings->push_back(FileDescriptorInfo(kAndroidUIResourcesPakDescriptor, |
| 1848 FileDescriptor(f, true))); |
| 1849 |
1843 #if defined(USE_LINUX_BREAKPAD) | 1850 #if defined(USE_LINUX_BREAKPAD) |
1844 f = CrashDumpManager::GetInstance()->CreateMinidumpFile(child_process_id); | 1851 f = CrashDumpManager::GetInstance()->CreateMinidumpFile(child_process_id); |
1845 if (f == base::kInvalidPlatformFileValue) { | 1852 if (f == base::kInvalidPlatformFileValue) { |
1846 LOG(ERROR) << "Failed to create file for minidump, crash reporting will be " | 1853 LOG(ERROR) << "Failed to create file for minidump, crash reporting will be " |
1847 "disabled for this process."; | 1854 "disabled for this process."; |
1848 } else { | 1855 } else { |
1849 mappings->push_back(FileDescriptorInfo(kAndroidMinidumpDescriptor, | 1856 mappings->push_back(FileDescriptorInfo(kAndroidMinidumpDescriptor, |
1850 FileDescriptor(f, true))); | 1857 FileDescriptor(f, true))); |
1851 } | 1858 } |
1852 #endif // defined(USE_LINUX_BREAKPAD) | 1859 #endif // defined(USE_LINUX_BREAKPAD) |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1896 io_thread_application_locale_ = locale; | 1903 io_thread_application_locale_ = locale; |
1897 } | 1904 } |
1898 | 1905 |
1899 void ChromeContentBrowserClient::SetApplicationLocaleOnIOThread( | 1906 void ChromeContentBrowserClient::SetApplicationLocaleOnIOThread( |
1900 const std::string& locale) { | 1907 const std::string& locale) { |
1901 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); | 1908 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
1902 io_thread_application_locale_ = locale; | 1909 io_thread_application_locale_ = locale; |
1903 } | 1910 } |
1904 | 1911 |
1905 } // namespace chrome | 1912 } // namespace chrome |
OLD | NEW |