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/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/environment.h" | 8 #include "base/environment.h" |
9 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
| 10 #include "base/i18n/rtl.h" |
10 #include "base/lazy_instance.h" | 11 #include "base/lazy_instance.h" |
11 #include "base/message_loop/message_loop.h" | 12 #include "base/message_loop/message_loop.h" |
12 #include "base/metrics/statistics_recorder.h" | 13 #include "base/metrics/statistics_recorder.h" |
13 #include "base/metrics/stats_counters.h" | 14 #include "base/metrics/stats_counters.h" |
14 #include "base/path_service.h" | 15 #include "base/path_service.h" |
15 #include "base/process/memory.h" | 16 #include "base/process/memory.h" |
16 #include "base/process/process_handle.h" | 17 #include "base/process/process_handle.h" |
17 #include "base/strings/stringprintf.h" | 18 #include "base/strings/stringprintf.h" |
18 #include "base/strings/utf_string_conversions.h" | 19 #include "base/strings/utf_string_conversions.h" |
19 #include "build/build_config.h" | 20 #include "build/build_config.h" |
(...skipping 678 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
698 kAndroidUIResourcesPakDescriptor, | 699 kAndroidUIResourcesPakDescriptor, |
699 }; | 700 }; |
700 for (size_t i = 0; i < arraysize(extra_pak_keys); ++i) { | 701 for (size_t i = 0; i < arraysize(extra_pak_keys); ++i) { |
701 int pak_fd = | 702 int pak_fd = |
702 base::GlobalDescriptors::GetInstance()->MaybeGet(extra_pak_keys[i]); | 703 base::GlobalDescriptors::GetInstance()->MaybeGet(extra_pak_keys[i]); |
703 CHECK(pak_fd != -1); | 704 CHECK(pak_fd != -1); |
704 ResourceBundle::GetSharedInstance().AddDataPackFromFile( | 705 ResourceBundle::GetSharedInstance().AddDataPackFromFile( |
705 pak_fd, ui::SCALE_FACTOR_100P); | 706 pak_fd, ui::SCALE_FACTOR_100P); |
706 } | 707 } |
707 | 708 |
| 709 base::i18n::SetICUDefaultLocale(locale); |
708 const std::string loaded_locale = locale; | 710 const std::string loaded_locale = locale; |
709 #else | 711 #else |
710 const std::string loaded_locale = | 712 const std::string loaded_locale = |
711 ResourceBundle::InitSharedInstanceWithLocale(locale, NULL); | 713 ResourceBundle::InitSharedInstanceWithLocale(locale, NULL); |
712 | 714 |
713 base::FilePath resources_pack_path; | 715 base::FilePath resources_pack_path; |
714 PathService::Get(chrome::FILE_RESOURCES_PACK, &resources_pack_path); | 716 PathService::Get(chrome::FILE_RESOURCES_PACK, &resources_pack_path); |
715 ResourceBundle::GetSharedInstance().AddDataPackFromPath( | 717 ResourceBundle::GetSharedInstance().AddDataPackFromPath( |
716 resources_pack_path, ui::SCALE_FACTOR_NONE); | 718 resources_pack_path, ui::SCALE_FACTOR_NONE); |
717 #endif | 719 #endif |
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
879 } | 881 } |
880 | 882 |
881 content::ContentUtilityClient* | 883 content::ContentUtilityClient* |
882 ChromeMainDelegate::CreateContentUtilityClient() { | 884 ChromeMainDelegate::CreateContentUtilityClient() { |
883 #if defined(CHROME_MULTIPLE_DLL_BROWSER) | 885 #if defined(CHROME_MULTIPLE_DLL_BROWSER) |
884 return NULL; | 886 return NULL; |
885 #else | 887 #else |
886 return &g_chrome_content_utility_client.Get(); | 888 return &g_chrome_content_utility_client.Get(); |
887 #endif | 889 #endif |
888 } | 890 } |
OLD | NEW |