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

Unified Diff: chrome/browser/browser_main.cc

Issue 7610009: If no locale data files can be found, show a dialog and exit (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: error Created 9 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/browser_main.cc
diff --git a/chrome/browser/browser_main.cc b/chrome/browser/browser_main.cc
index 3dec4f48adfd30a41daa04a6550d9f0d56c82bae..8f8de73fd61cc86ed6b9ca8db8d1ea90e51058f6 100644
--- a/chrome/browser/browser_main.cc
+++ b/chrome/browser/browser_main.cc
@@ -1469,6 +1469,16 @@ int BrowserMain(const MainFunctionParams& parameters) {
// method InitSharedInstance is ignored.
const std::string loaded_locale =
ResourceBundle::InitSharedInstance(locale);
+ if (loaded_locale.empty() &&
+ !parsed_command_line.HasSwitch(switches::kNoErrorDialogs)) {
+ // This error message is not localized because we failed to load the
+ // localization data files.
+ const char* message =
+ "Unable to find locale data files. Please reinstall.";
+ const char* title = "Missing File Error";
+ ShowMissingLocaleMessageBox(message, title);
+ return chrome::RESULT_CODE_MISSING_DATA;
+ }
CHECK(!loaded_locale.empty()) << "Locale could not be found for " << locale;
g_browser_process->SetApplicationLocale(loaded_locale);

Powered by Google App Engine
This is Rietveld 408576698