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

Unified Diff: chrome/app/chrome_main.cc

Issue 5939002: Error handling added (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Sync up Created 10 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/browser_main.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/app/chrome_main.cc
diff --git a/chrome/app/chrome_main.cc b/chrome/app/chrome_main.cc
index e19f5501df03213dc6a408a1fadd7f815046f8d4..86d26978a393ec3bbca95cccec1ce74e70cdbad0 100644
--- a/chrome/app/chrome_main.cc
+++ b/chrome/app/chrome_main.cc
@@ -846,10 +846,13 @@ int ChromeMain(int argc, char** argv) {
// TODO(markusheintz): The command line flag --lang is actually processed
// by the CommandLinePrefStore, and made available through the PrefService
// via the preference prefs::kApplicationLocale. The browser process uses
- // the --lang flag to passe the value of the PrefService in here. Maybe this
+ // the --lang flag to pass the value of the PrefService in here. Maybe this
// value could be passed in a different way.
- ResourceBundle::InitSharedInstance(
- command_line.GetSwitchValueASCII(switches::kLang));
+ const std::string locale =
+ command_line.GetSwitchValueASCII(switches::kLang);
+ const std::string loaded_locale =
+ ResourceBundle::InitSharedInstance(locale);
+ CHECK(!loaded_locale.empty()) << "Locale could not be found for " << locale;
#if defined(OS_MACOSX)
// Update the process name (need resources to get the strings, so
« no previous file with comments | « no previous file | chrome/browser/browser_main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698