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

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: REBASE 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
« no previous file with comments | « chrome/app/chrome_main_delegate.cc ('k') | chrome/browser/chrome_browser_main_mac.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 845 matching lines...) Expand 10 before | Expand all | Expand 10 after
856 #else 856 #else
857 const std::string locale = 857 const std::string locale =
858 local_state_->GetString(prefs::kApplicationLocale); 858 local_state_->GetString(prefs::kApplicationLocale);
859 859
860 // On a POSIX OS other than ChromeOS, the parameter that is passed to the 860 // On a POSIX OS other than ChromeOS, the parameter that is passed to the
861 // method InitSharedInstance is ignored. 861 // method InitSharedInstance is ignored.
862 862
863 TRACE_EVENT_BEGIN0("startup", 863 TRACE_EVENT_BEGIN0("startup",
864 "ChromeBrowserMainParts::PreCreateThreadsImpl:InitResourceBundle"); 864 "ChromeBrowserMainParts::PreCreateThreadsImpl:InitResourceBundle");
865 const std::string loaded_locale = 865 const std::string loaded_locale =
866 ResourceBundle::InitSharedInstanceWithLocale(locale, NULL); 866 ui::ResourceBundle::InitSharedInstanceWithLocale(
867 locale, NULL, ui::ResourceBundle::LOAD_COMMON_RESOURCES);
867 TRACE_EVENT_END0("startup", 868 TRACE_EVENT_END0("startup",
868 "ChromeBrowserMainParts::PreCreateThreadsImpl:InitResourceBundle"); 869 "ChromeBrowserMainParts::PreCreateThreadsImpl:InitResourceBundle");
869 870
870 if (loaded_locale.empty() && 871 if (loaded_locale.empty() &&
871 !parsed_command_line().HasSwitch(switches::kNoErrorDialogs)) { 872 !parsed_command_line().HasSwitch(switches::kNoErrorDialogs)) {
872 ShowMissingLocaleMessageBox(); 873 ShowMissingLocaleMessageBox();
873 return chrome::RESULT_CODE_MISSING_DATA; 874 return chrome::RESULT_CODE_MISSING_DATA;
874 } 875 }
875 CHECK(!loaded_locale.empty()) << "Locale could not be found for " << locale; 876 CHECK(!loaded_locale.empty()) << "Locale could not be found for " << locale;
876 browser_process_->SetApplicationLocale(loaded_locale); 877 browser_process_->SetApplicationLocale(loaded_locale);
(...skipping 781 matching lines...) Expand 10 before | Expand all | Expand 10 after
1658 chromeos::CrosSettings::Shutdown(); 1659 chromeos::CrosSettings::Shutdown();
1659 #endif 1660 #endif
1660 #endif 1661 #endif
1661 } 1662 }
1662 1663
1663 // Public members: 1664 // Public members:
1664 1665
1665 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { 1666 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) {
1666 chrome_extra_parts_.push_back(parts); 1667 chrome_extra_parts_.push_back(parts);
1667 } 1668 }
OLDNEW
« no previous file with comments | « chrome/app/chrome_main_delegate.cc ('k') | chrome/browser/chrome_browser_main_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698