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/browser/chrome_browser_main.h" | 5 #include "chrome/browser/chrome_browser_main.h" |
6 | 6 |
7 #include <set> | 7 #include <set> |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 838 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
849 #else | 849 #else |
850 const std::string locale = | 850 const std::string locale = |
851 local_state_->GetString(prefs::kApplicationLocale); | 851 local_state_->GetString(prefs::kApplicationLocale); |
852 | 852 |
853 // On a POSIX OS other than ChromeOS, the parameter that is passed to the | 853 // On a POSIX OS other than ChromeOS, the parameter that is passed to the |
854 // method InitSharedInstance is ignored. | 854 // method InitSharedInstance is ignored. |
855 | 855 |
856 TRACE_EVENT_BEGIN0("startup", | 856 TRACE_EVENT_BEGIN0("startup", |
857 "ChromeBrowserMainParts::PreCreateThreadsImpl:InitResourceBundle"); | 857 "ChromeBrowserMainParts::PreCreateThreadsImpl:InitResourceBundle"); |
858 const std::string loaded_locale = | 858 const std::string loaded_locale = |
859 ResourceBundle::InitSharedInstanceWithLocale(locale, NULL); | 859 ResourceBundle::InitSharedInstanceWithLocale(locale, NULL, true); |
860 TRACE_EVENT_END0("startup", | 860 TRACE_EVENT_END0("startup", |
861 "ChromeBrowserMainParts::PreCreateThreadsImpl:InitResourceBundle"); | 861 "ChromeBrowserMainParts::PreCreateThreadsImpl:InitResourceBundle"); |
862 | 862 |
863 if (loaded_locale.empty() && | 863 if (loaded_locale.empty() && |
864 !parsed_command_line().HasSwitch(switches::kNoErrorDialogs)) { | 864 !parsed_command_line().HasSwitch(switches::kNoErrorDialogs)) { |
865 ShowMissingLocaleMessageBox(); | 865 ShowMissingLocaleMessageBox(); |
866 return chrome::RESULT_CODE_MISSING_DATA; | 866 return chrome::RESULT_CODE_MISSING_DATA; |
867 } | 867 } |
868 CHECK(!loaded_locale.empty()) << "Locale could not be found for " << locale; | 868 CHECK(!loaded_locale.empty()) << "Locale could not be found for " << locale; |
869 browser_process_->SetApplicationLocale(loaded_locale); | 869 browser_process_->SetApplicationLocale(loaded_locale); |
(...skipping 781 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1651 chromeos::CrosSettings::Shutdown(); | 1651 chromeos::CrosSettings::Shutdown(); |
1652 #endif | 1652 #endif |
1653 #endif | 1653 #endif |
1654 } | 1654 } |
1655 | 1655 |
1656 // Public members: | 1656 // Public members: |
1657 | 1657 |
1658 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { | 1658 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { |
1659 chrome_extra_parts_.push_back(parts); | 1659 chrome_extra_parts_.push_back(parts); |
1660 } | 1660 } |
OLD | NEW |