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

Side by Side Diff: chrome/browser/chrome_browser_main.cc

Issue 457103003: Merge ResourceBundle's InitSharedInstanceLocaleOnly with InitSharedInstanceWithLocale(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix 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/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
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 ui::ResourceBundle::InitSharedInstanceWithLocale(
860 locale, NULL, ui::ResourceBundle::LOAD_COMMON_RESOURCES);
860 TRACE_EVENT_END0("startup", 861 TRACE_EVENT_END0("startup",
861 "ChromeBrowserMainParts::PreCreateThreadsImpl:InitResourceBundle"); 862 "ChromeBrowserMainParts::PreCreateThreadsImpl:InitResourceBundle");
862 863
863 if (loaded_locale.empty() && 864 if (loaded_locale.empty() &&
864 !parsed_command_line().HasSwitch(switches::kNoErrorDialogs)) { 865 !parsed_command_line().HasSwitch(switches::kNoErrorDialogs)) {
865 ShowMissingLocaleMessageBox(); 866 ShowMissingLocaleMessageBox();
866 return chrome::RESULT_CODE_MISSING_DATA; 867 return chrome::RESULT_CODE_MISSING_DATA;
867 } 868 }
868 CHECK(!loaded_locale.empty()) << "Locale could not be found for " << locale; 869 CHECK(!loaded_locale.empty()) << "Locale could not be found for " << locale;
869 browser_process_->SetApplicationLocale(loaded_locale); 870 browser_process_->SetApplicationLocale(loaded_locale);
(...skipping 781 matching lines...) Expand 10 before | Expand all | Expand 10 after
1651 chromeos::CrosSettings::Shutdown(); 1652 chromeos::CrosSettings::Shutdown();
1652 #endif 1653 #endif
1653 #endif 1654 #endif
1654 } 1655 }
1655 1656
1656 // Public members: 1657 // Public members:
1657 1658
1658 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { 1659 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) {
1659 chrome_extra_parts_.push_back(parts); 1660 chrome_extra_parts_.push_back(parts);
1660 } 1661 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698