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/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 722 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
733 base::GlobalDescriptors::GetInstance()->MaybeGet(extra_pak_keys[i]); | 733 base::GlobalDescriptors::GetInstance()->MaybeGet(extra_pak_keys[i]); |
734 CHECK(pak_fd != -1); | 734 CHECK(pak_fd != -1); |
735 ResourceBundle::GetSharedInstance().AddDataPackFromFile( | 735 ResourceBundle::GetSharedInstance().AddDataPackFromFile( |
736 base::File(pak_fd), ui::SCALE_FACTOR_100P); | 736 base::File(pak_fd), ui::SCALE_FACTOR_100P); |
737 } | 737 } |
738 | 738 |
739 base::i18n::SetICUDefaultLocale(locale); | 739 base::i18n::SetICUDefaultLocale(locale); |
740 const std::string loaded_locale = locale; | 740 const std::string loaded_locale = locale; |
741 #else | 741 #else |
742 const std::string loaded_locale = | 742 const std::string loaded_locale = |
743 ResourceBundle::InitSharedInstanceWithLocale(locale, NULL); | 743 ui::ResourceBundle::InitSharedInstanceWithLocale( |
| 744 locale, NULL, ui::ResourceBundle::LOAD_COMMON_RESOURCES); |
744 | 745 |
745 base::FilePath resources_pack_path; | 746 base::FilePath resources_pack_path; |
746 PathService::Get(chrome::FILE_RESOURCES_PACK, &resources_pack_path); | 747 PathService::Get(chrome::FILE_RESOURCES_PACK, &resources_pack_path); |
747 ResourceBundle::GetSharedInstance().AddDataPackFromPath( | 748 ResourceBundle::GetSharedInstance().AddDataPackFromPath( |
748 resources_pack_path, ui::SCALE_FACTOR_NONE); | 749 resources_pack_path, ui::SCALE_FACTOR_NONE); |
749 #endif | 750 #endif |
750 CHECK(!loaded_locale.empty()) << "Locale could not be found for " << | 751 CHECK(!loaded_locale.empty()) << "Locale could not be found for " << |
751 locale; | 752 locale; |
752 | 753 |
753 #if !defined(CHROME_MULTIPLE_DLL_BROWSER) | 754 #if !defined(CHROME_MULTIPLE_DLL_BROWSER) |
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
923 } | 924 } |
924 | 925 |
925 content::ContentUtilityClient* | 926 content::ContentUtilityClient* |
926 ChromeMainDelegate::CreateContentUtilityClient() { | 927 ChromeMainDelegate::CreateContentUtilityClient() { |
927 #if defined(CHROME_MULTIPLE_DLL_BROWSER) | 928 #if defined(CHROME_MULTIPLE_DLL_BROWSER) |
928 return NULL; | 929 return NULL; |
929 #else | 930 #else |
930 return g_chrome_content_utility_client.Pointer(); | 931 return g_chrome_content_utility_client.Pointer(); |
931 #endif | 932 #endif |
932 } | 933 } |
OLD | NEW |