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 2797 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2808 base::MemoryMappedFile::Region region; | 2808 base::MemoryMappedFile::Region region; |
2809 int fd = ui::GetMainAndroidPackFd(®ion); | 2809 int fd = ui::GetMainAndroidPackFd(®ion); |
2810 mappings->ShareWithRegion(kAndroidUIResourcesPakDescriptor, fd, region); | 2810 mappings->ShareWithRegion(kAndroidUIResourcesPakDescriptor, fd, region); |
2811 | 2811 |
2812 fd = ui::GetCommonResourcesPackFd(®ion); | 2812 fd = ui::GetCommonResourcesPackFd(®ion); |
2813 mappings->ShareWithRegion(kAndroidChrome100PercentPakDescriptor, fd, region); | 2813 mappings->ShareWithRegion(kAndroidChrome100PercentPakDescriptor, fd, region); |
2814 | 2814 |
2815 fd = ui::GetLocalePackFd(®ion); | 2815 fd = ui::GetLocalePackFd(®ion); |
2816 mappings->ShareWithRegion(kAndroidLocalePakDescriptor, fd, region); | 2816 mappings->ShareWithRegion(kAndroidLocalePakDescriptor, fd, region); |
2817 | 2817 |
| 2818 // Optional secondary locale .pak file. |
| 2819 fd = ui::GetSecondaryLocalePackFd(®ion); |
| 2820 if (fd != -1) { |
| 2821 mappings->ShareWithRegion(kAndroidSecondaryLocalePakDescriptor, fd, region); |
| 2822 } |
| 2823 |
2818 breakpad::CrashDumpObserver::GetInstance()->BrowserChildProcessStarted( | 2824 breakpad::CrashDumpObserver::GetInstance()->BrowserChildProcessStarted( |
2819 child_process_id, mappings); | 2825 child_process_id, mappings); |
2820 | 2826 |
2821 base::FilePath app_data_path; | 2827 base::FilePath app_data_path; |
2822 PathService::Get(base::DIR_ANDROID_APP_DATA, &app_data_path); | 2828 PathService::Get(base::DIR_ANDROID_APP_DATA, &app_data_path); |
2823 DCHECK(!app_data_path.empty()); | 2829 DCHECK(!app_data_path.empty()); |
2824 #else | 2830 #else |
2825 int crash_signal_fd = GetCrashSignalFD(command_line); | 2831 int crash_signal_fd = GetCrashSignalFD(command_line); |
2826 if (crash_signal_fd >= 0) { | 2832 if (crash_signal_fd >= 0) { |
2827 mappings->Share(kCrashDumpSignal, crash_signal_fd); | 2833 mappings->Share(kCrashDumpSignal, crash_signal_fd); |
(...skipping 688 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3516 // displayed URL when rewriting chrome://help to chrome://settings/help. | 3522 // displayed URL when rewriting chrome://help to chrome://settings/help. |
3517 return url->SchemeIs(content::kChromeUIScheme) && | 3523 return url->SchemeIs(content::kChromeUIScheme) && |
3518 url->host() == chrome::kChromeUISettingsHost; | 3524 url->host() == chrome::kChromeUISettingsHost; |
3519 } | 3525 } |
3520 | 3526 |
3521 // static | 3527 // static |
3522 void ChromeContentBrowserClient::SetDefaultQuotaSettingsForTesting( | 3528 void ChromeContentBrowserClient::SetDefaultQuotaSettingsForTesting( |
3523 const storage::QuotaSettings* settings) { | 3529 const storage::QuotaSettings* settings) { |
3524 g_default_quota_settings = settings; | 3530 g_default_quota_settings = settings; |
3525 } | 3531 } |
OLD | NEW |