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