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

Unified Diff: chrome/app/chrome_main.cc

Issue 5939002: Error handling added (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: return code CHECK fixed 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') | chrome/browser/browser_main.cc » ('J')
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..80d0e7a70e225f39ff2215431ecc7afbb40eca4e 100644
--- a/chrome/app/chrome_main.cc
+++ b/chrome/app/chrome_main.cc
@@ -846,10 +846,11 @@ 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));
+ std::string locale = command_line.GetSwitchValueASCII(switches::kLang);
+ const std::string res = ResourceBundle::InitSharedInstance(locale);
Peter Kasting 2010/12/21 18:35:58 Nit: |res| is a poor name; consider |loaded_locale
glotov 2010/12/21 20:33:34 Agree, just wanted a short name to fit the line. M
+ CHECK(!res.empty()) << "Locale could not be found for " << locale;
Peter Kasting 2010/12/21 18:35:58 Nit: Shouldn't we be checking that these are equal
glotov 2010/12/21 20:33:34 That was my mistake that time. No, we shouldn't. B
#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') | chrome/browser/browser_main.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698