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

Side by Side Diff: chrome/app/chrome_main_delegate.cc

Issue 451283002: Drop the bool parameter from InitSharedInstanceWithPakFileRegion(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: REBASE Created 6 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
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/app/chrome_main_delegate.h" 5 #include "chrome/app/chrome_main_delegate.h"
6 6
7 #include "base/base_paths.h" 7 #include "base/base_paths.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/cpu.h" 9 #include "base/cpu.h"
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 702 matching lines...) Expand 10 before | Expand all | Expand 10 after
713 const std::string locale = 713 const std::string locale =
714 command_line.GetSwitchValueASCII(switches::kLang); 714 command_line.GetSwitchValueASCII(switches::kLang);
715 #if defined(OS_ANDROID) 715 #if defined(OS_ANDROID)
716 // The renderer sandbox prevents us from accessing our .pak files directly. 716 // The renderer sandbox prevents us from accessing our .pak files directly.
717 // Therefore file descriptors to the .pak files that we need are passed in 717 // Therefore file descriptors to the .pak files that we need are passed in
718 // at process creation time. 718 // at process creation time.
719 int locale_pak_fd = base::GlobalDescriptors::GetInstance()->MaybeGet( 719 int locale_pak_fd = base::GlobalDescriptors::GetInstance()->MaybeGet(
720 kAndroidLocalePakDescriptor); 720 kAndroidLocalePakDescriptor);
721 CHECK(locale_pak_fd != -1); 721 CHECK(locale_pak_fd != -1);
722 ResourceBundle::InitSharedInstanceWithPakFileRegion( 722 ResourceBundle::InitSharedInstanceWithPakFileRegion(
723 base::File(locale_pak_fd), 723 base::File(locale_pak_fd), base::MemoryMappedFile::Region::kWholeFile);
724 base::MemoryMappedFile::Region::kWholeFile,
725 false);
726 724
727 int extra_pak_keys[] = { 725 int extra_pak_keys[] = {
728 kAndroidChrome100PercentPakDescriptor, 726 kAndroidChrome100PercentPakDescriptor,
729 kAndroidUIResourcesPakDescriptor, 727 kAndroidUIResourcesPakDescriptor,
730 }; 728 };
731 for (size_t i = 0; i < arraysize(extra_pak_keys); ++i) { 729 for (size_t i = 0; i < arraysize(extra_pak_keys); ++i) {
732 int pak_fd = 730 int pak_fd =
733 base::GlobalDescriptors::GetInstance()->MaybeGet(extra_pak_keys[i]); 731 base::GlobalDescriptors::GetInstance()->MaybeGet(extra_pak_keys[i]);
734 CHECK(pak_fd != -1); 732 CHECK(pak_fd != -1);
735 ResourceBundle::GetSharedInstance().AddDataPackFromFile( 733 ResourceBundle::GetSharedInstance().AddDataPackFromFile(
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
923 } 921 }
924 922
925 content::ContentUtilityClient* 923 content::ContentUtilityClient*
926 ChromeMainDelegate::CreateContentUtilityClient() { 924 ChromeMainDelegate::CreateContentUtilityClient() {
927 #if defined(CHROME_MULTIPLE_DLL_BROWSER) 925 #if defined(CHROME_MULTIPLE_DLL_BROWSER)
928 return NULL; 926 return NULL;
929 #else 927 #else
930 return g_chrome_content_utility_client.Pointer(); 928 return g_chrome_content_utility_client.Pointer();
931 #endif 929 #endif
932 } 930 }
OLDNEW
« no previous file with comments | « android_webview/browser/aw_browser_main_parts.cc ('k') | content/shell/app/shell_main_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698