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

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

Issue 457103003: Merge ResourceBundle's InitSharedInstanceLocaleOnly with InitSharedInstanceWithLocale(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 724 matching lines...) Expand 10 before | Expand all | Expand 10 after
735 base::GlobalDescriptors::GetInstance()->MaybeGet(extra_pak_keys[i]); 735 base::GlobalDescriptors::GetInstance()->MaybeGet(extra_pak_keys[i]);
736 CHECK(pak_fd != -1); 736 CHECK(pak_fd != -1);
737 ResourceBundle::GetSharedInstance().AddDataPackFromFile( 737 ResourceBundle::GetSharedInstance().AddDataPackFromFile(
738 base::File(pak_fd), ui::SCALE_FACTOR_100P); 738 base::File(pak_fd), ui::SCALE_FACTOR_100P);
739 } 739 }
740 740
741 base::i18n::SetICUDefaultLocale(locale); 741 base::i18n::SetICUDefaultLocale(locale);
742 const std::string loaded_locale = locale; 742 const std::string loaded_locale = locale;
743 #else 743 #else
744 const std::string loaded_locale = 744 const std::string loaded_locale =
745 ResourceBundle::InitSharedInstanceWithLocale(locale, NULL); 745 ResourceBundle::InitSharedInstanceWithLocale(locale, NULL, true);
746 746
747 base::FilePath resources_pack_path; 747 base::FilePath resources_pack_path;
748 PathService::Get(chrome::FILE_RESOURCES_PACK, &resources_pack_path); 748 PathService::Get(chrome::FILE_RESOURCES_PACK, &resources_pack_path);
749 ResourceBundle::GetSharedInstance().AddDataPackFromPath( 749 ResourceBundle::GetSharedInstance().AddDataPackFromPath(
750 resources_pack_path, ui::SCALE_FACTOR_NONE); 750 resources_pack_path, ui::SCALE_FACTOR_NONE);
751 #endif 751 #endif
752 CHECK(!loaded_locale.empty()) << "Locale could not be found for " << 752 CHECK(!loaded_locale.empty()) << "Locale could not be found for " <<
753 locale; 753 locale;
754 754
755 #if !defined(CHROME_MULTIPLE_DLL_BROWSER) 755 #if !defined(CHROME_MULTIPLE_DLL_BROWSER)
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
925 } 925 }
926 926
927 content::ContentUtilityClient* 927 content::ContentUtilityClient*
928 ChromeMainDelegate::CreateContentUtilityClient() { 928 ChromeMainDelegate::CreateContentUtilityClient() {
929 #if defined(CHROME_MULTIPLE_DLL_BROWSER) 929 #if defined(CHROME_MULTIPLE_DLL_BROWSER)
930 return NULL; 930 return NULL;
931 #else 931 #else
932 return g_chrome_content_utility_client.Pointer(); 932 return g_chrome_content_utility_client.Pointer();
933 #endif 933 #endif
934 } 934 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698