Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2)

Side by Side Diff: trunk/src/chrome/browser/chrome_content_browser_client.cc

Issue 22557005: Revert 216822 "Remove chrome.pak references, build resources int..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « trunk/src/chrome/app/chrome_main_delegate.cc ('k') | trunk/src/chrome/browser_tests.isolate » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 2447 matching lines...) Expand 10 before | Expand all | Expand 10 after
2458 void ChromeContentBrowserClient::GetAdditionalMappedFilesForChildProcess( 2458 void ChromeContentBrowserClient::GetAdditionalMappedFilesForChildProcess(
2459 const CommandLine& command_line, 2459 const CommandLine& command_line,
2460 int child_process_id, 2460 int child_process_id,
2461 std::vector<FileDescriptorInfo>* mappings) { 2461 std::vector<FileDescriptorInfo>* mappings) {
2462 #if defined(OS_ANDROID) 2462 #if defined(OS_ANDROID)
2463 base::FilePath data_path; 2463 base::FilePath data_path;
2464 PathService::Get(ui::DIR_RESOURCE_PAKS_ANDROID, &data_path); 2464 PathService::Get(ui::DIR_RESOURCE_PAKS_ANDROID, &data_path);
2465 DCHECK(!data_path.empty()); 2465 DCHECK(!data_path.empty());
2466 2466
2467 int flags = base::PLATFORM_FILE_OPEN | base::PLATFORM_FILE_READ; 2467 int flags = base::PLATFORM_FILE_OPEN | base::PLATFORM_FILE_READ;
2468 base::FilePath chrome_pak = data_path.AppendASCII("chrome.pak");
2469 base::PlatformFile f =
2470 base::CreatePlatformFile(chrome_pak, flags, NULL, NULL);
2471 DCHECK(f != base::kInvalidPlatformFileValue);
2472 mappings->push_back(FileDescriptorInfo(kAndroidChromePakDescriptor,
2473 FileDescriptor(f, true)));
2474
2468 base::FilePath chrome_resources_pak = 2475 base::FilePath chrome_resources_pak =
2469 data_path.AppendASCII("chrome_100_percent.pak"); 2476 data_path.AppendASCII("chrome_100_percent.pak");
2470 base::PlatformFile f = 2477 f = base::CreatePlatformFile(chrome_resources_pak, flags, NULL, NULL);
2471 base::CreatePlatformFile(chrome_resources_pak, flags, NULL, NULL);
2472 DCHECK(f != base::kInvalidPlatformFileValue); 2478 DCHECK(f != base::kInvalidPlatformFileValue);
2473 mappings->push_back(FileDescriptorInfo(kAndroidChrome100PercentPakDescriptor, 2479 mappings->push_back(FileDescriptorInfo(kAndroidChrome100PercentPakDescriptor,
2474 FileDescriptor(f, true))); 2480 FileDescriptor(f, true)));
2475 2481
2476 const std::string locale = GetApplicationLocale(); 2482 const std::string locale = GetApplicationLocale();
2477 base::FilePath locale_pak = ResourceBundle::GetSharedInstance(). 2483 base::FilePath locale_pak = ResourceBundle::GetSharedInstance().
2478 GetLocaleFilePath(locale, false); 2484 GetLocaleFilePath(locale, false);
2479 f = base::CreatePlatformFile(locale_pak, flags, NULL, NULL); 2485 f = base::CreatePlatformFile(locale_pak, flags, NULL, NULL);
2480 DCHECK(f != base::kInvalidPlatformFileValue); 2486 DCHECK(f != base::kInvalidPlatformFileValue);
2481 mappings->push_back(FileDescriptorInfo(kAndroidLocalePakDescriptor, 2487 mappings->push_back(FileDescriptorInfo(kAndroidLocalePakDescriptor,
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
2546 #if defined(USE_NSS) 2552 #if defined(USE_NSS)
2547 crypto::CryptoModuleBlockingPasswordDelegate* 2553 crypto::CryptoModuleBlockingPasswordDelegate*
2548 ChromeContentBrowserClient::GetCryptoPasswordDelegate( 2554 ChromeContentBrowserClient::GetCryptoPasswordDelegate(
2549 const GURL& url) { 2555 const GURL& url) {
2550 return chrome::NewCryptoModuleBlockingDialogDelegate( 2556 return chrome::NewCryptoModuleBlockingDialogDelegate(
2551 chrome::kCryptoModulePasswordKeygen, url.host()); 2557 chrome::kCryptoModulePasswordKeygen, url.host());
2552 } 2558 }
2553 #endif 2559 #endif
2554 2560
2555 } // namespace chrome 2561 } // namespace chrome
OLDNEW
« no previous file with comments | « trunk/src/chrome/app/chrome_main_delegate.cc ('k') | trunk/src/chrome/browser_tests.isolate » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698