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 2448 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2459 void ChromeContentBrowserClient::GetAdditionalMappedFilesForChildProcess( | 2459 void ChromeContentBrowserClient::GetAdditionalMappedFilesForChildProcess( |
2460 const CommandLine& command_line, | 2460 const CommandLine& command_line, |
2461 int child_process_id, | 2461 int child_process_id, |
2462 std::vector<FileDescriptorInfo>* mappings) { | 2462 std::vector<FileDescriptorInfo>* mappings) { |
2463 #if defined(OS_ANDROID) | 2463 #if defined(OS_ANDROID) |
2464 base::FilePath data_path; | 2464 base::FilePath data_path; |
2465 PathService::Get(ui::DIR_RESOURCE_PAKS_ANDROID, &data_path); | 2465 PathService::Get(ui::DIR_RESOURCE_PAKS_ANDROID, &data_path); |
2466 DCHECK(!data_path.empty()); | 2466 DCHECK(!data_path.empty()); |
2467 | 2467 |
2468 int flags = base::PLATFORM_FILE_OPEN | base::PLATFORM_FILE_READ; | 2468 int flags = base::PLATFORM_FILE_OPEN | base::PLATFORM_FILE_READ; |
2469 base::FilePath chrome_pak = data_path.AppendASCII("chrome.pak"); | |
2470 base::PlatformFile f = | |
2471 base::CreatePlatformFile(chrome_pak, flags, NULL, NULL); | |
2472 DCHECK(f != base::kInvalidPlatformFileValue); | |
2473 mappings->push_back(FileDescriptorInfo(kAndroidChromePakDescriptor, | |
2474 FileDescriptor(f, true))); | |
2475 | |
2476 base::FilePath chrome_resources_pak = | 2469 base::FilePath chrome_resources_pak = |
2477 data_path.AppendASCII("chrome_100_percent.pak"); | 2470 data_path.AppendASCII("chrome_100_percent.pak"); |
2478 f = base::CreatePlatformFile(chrome_resources_pak, flags, NULL, NULL); | 2471 f = base::CreatePlatformFile(chrome_resources_pak, flags, NULL, NULL); |
2479 DCHECK(f != base::kInvalidPlatformFileValue); | 2472 DCHECK(f != base::kInvalidPlatformFileValue); |
2480 mappings->push_back(FileDescriptorInfo(kAndroidChrome100PercentPakDescriptor, | 2473 mappings->push_back(FileDescriptorInfo(kAndroidChrome100PercentPakDescriptor, |
2481 FileDescriptor(f, true))); | 2474 FileDescriptor(f, true))); |
2482 | 2475 |
2483 const std::string locale = GetApplicationLocale(); | 2476 const std::string locale = GetApplicationLocale(); |
2484 base::FilePath locale_pak = ResourceBundle::GetSharedInstance(). | 2477 base::FilePath locale_pak = ResourceBundle::GetSharedInstance(). |
2485 GetLocaleFilePath(locale, false); | 2478 GetLocaleFilePath(locale, false); |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2553 #if defined(USE_NSS) | 2546 #if defined(USE_NSS) |
2554 crypto::CryptoModuleBlockingPasswordDelegate* | 2547 crypto::CryptoModuleBlockingPasswordDelegate* |
2555 ChromeContentBrowserClient::GetCryptoPasswordDelegate( | 2548 ChromeContentBrowserClient::GetCryptoPasswordDelegate( |
2556 const GURL& url) { | 2549 const GURL& url) { |
2557 return chrome::NewCryptoModuleBlockingDialogDelegate( | 2550 return chrome::NewCryptoModuleBlockingDialogDelegate( |
2558 chrome::kCryptoModulePasswordKeygen, url.host()); | 2551 chrome::kCryptoModulePasswordKeygen, url.host()); |
2559 } | 2552 } |
2560 #endif | 2553 #endif |
2561 | 2554 |
2562 } // namespace chrome | 2555 } // namespace chrome |
OLD | NEW |