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 2774 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2785 base::MemoryMappedFile::Region region; | 2785 base::MemoryMappedFile::Region region; |
2786 int fd = ui::GetMainAndroidPackFd(®ion); | 2786 int fd = ui::GetMainAndroidPackFd(®ion); |
2787 mappings->ShareWithRegion(kAndroidUIResourcesPakDescriptor, fd, region); | 2787 mappings->ShareWithRegion(kAndroidUIResourcesPakDescriptor, fd, region); |
2788 | 2788 |
2789 fd = ui::GetCommonResourcesPackFd(®ion); | 2789 fd = ui::GetCommonResourcesPackFd(®ion); |
2790 mappings->ShareWithRegion(kAndroidChrome100PercentPakDescriptor, fd, region); | 2790 mappings->ShareWithRegion(kAndroidChrome100PercentPakDescriptor, fd, region); |
2791 | 2791 |
2792 fd = ui::GetLocalePackFd(®ion); | 2792 fd = ui::GetLocalePackFd(®ion); |
2793 mappings->ShareWithRegion(kAndroidLocalePakDescriptor, fd, region); | 2793 mappings->ShareWithRegion(kAndroidLocalePakDescriptor, fd, region); |
2794 | 2794 |
| 2795 // Optional secondary locale .pak file. |
| 2796 fd = ui::GetSecondaryLocalePackFd(®ion); |
| 2797 if (fd != -1) { |
| 2798 mappings->ShareWithRegion(kAndroidSecondaryLocalePakDescriptor, fd, region); |
| 2799 } |
| 2800 |
2795 breakpad::CrashDumpObserver::GetInstance()->BrowserChildProcessStarted( | 2801 breakpad::CrashDumpObserver::GetInstance()->BrowserChildProcessStarted( |
2796 child_process_id, mappings); | 2802 child_process_id, mappings); |
2797 | 2803 |
2798 base::FilePath app_data_path; | 2804 base::FilePath app_data_path; |
2799 PathService::Get(base::DIR_ANDROID_APP_DATA, &app_data_path); | 2805 PathService::Get(base::DIR_ANDROID_APP_DATA, &app_data_path); |
2800 DCHECK(!app_data_path.empty()); | 2806 DCHECK(!app_data_path.empty()); |
2801 #else | 2807 #else |
2802 int crash_signal_fd = GetCrashSignalFD(command_line); | 2808 int crash_signal_fd = GetCrashSignalFD(command_line); |
2803 if (crash_signal_fd >= 0) { | 2809 if (crash_signal_fd >= 0) { |
2804 mappings->Share(kCrashDumpSignal, crash_signal_fd); | 2810 mappings->Share(kCrashDumpSignal, crash_signal_fd); |
(...skipping 664 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3469 // displayed URL when rewriting chrome://help to chrome://settings/help. | 3475 // displayed URL when rewriting chrome://help to chrome://settings/help. |
3470 return url->SchemeIs(content::kChromeUIScheme) && | 3476 return url->SchemeIs(content::kChromeUIScheme) && |
3471 url->host() == chrome::kChromeUISettingsHost; | 3477 url->host() == chrome::kChromeUISettingsHost; |
3472 } | 3478 } |
3473 | 3479 |
3474 // static | 3480 // static |
3475 void ChromeContentBrowserClient::SetDefaultQuotaSettingsForTesting( | 3481 void ChromeContentBrowserClient::SetDefaultQuotaSettingsForTesting( |
3476 const storage::QuotaSettings* settings) { | 3482 const storage::QuotaSettings* settings) { |
3477 g_default_quota_settings = settings; | 3483 g_default_quota_settings = settings; |
3478 } | 3484 } |
OLD | NEW |