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

Unified Diff: chrome/common/resource_bundle_linux.cc

Issue 40246: Generate data packs for all languages and allow us to load (Closed)
Patch Set: comment Created 11 years, 10 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
« no previous file with comments | « chrome/app/resources/locale_settings.grd ('k') | webkit/glue/webkit_strings.grd » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/resource_bundle_linux.cc
diff --git a/chrome/common/resource_bundle_linux.cc b/chrome/common/resource_bundle_linux.cc
index 4d512154fbe9a5eaef480613006082fc4ff2fd0d..0a5112f1dd2832c06d599910af1e3292f3875fcd 100644
--- a/chrome/common/resource_bundle_linux.cc
+++ b/chrome/common/resource_bundle_linux.cc
@@ -39,12 +39,15 @@ void ResourceBundle::LoadResources(const std::wstring& pref_locale) {
bool success = resources_data_->Load(resources_data_path);
DCHECK(success) << "failed to load chrome.pak";
- FilePath locale_path;
- PathService::Get(chrome::DIR_LOCALES, &locale_path);
- // TODO(tc): Handle other locales properly.
- // http://code.google.com/p/chromium/issues/detail?id=8125
- locale_path = locale_path.Append(FILE_PATH_LITERAL("en-US.pak"));
DCHECK(locale_resources_data_ == NULL) << "locale data already loaded!";
+ const FilePath& locale_path = GetLocaleFilePath(pref_locale);
+ if (locale_path.value().empty()) {
+ // It's possible that there are no locale dlls found, in which case we just
+ // return.
+ NOTREACHED();
+ return;
Evan Martin 2009/03/06 20:39:53 Shouldn't we die horribly here?
+ }
+
locale_resources_data_ = new base::DataPack;
success = locale_resources_data_->Load(locale_path);
DCHECK(success) << "failed to load locale pak file";
« no previous file with comments | « chrome/app/resources/locale_settings.grd ('k') | webkit/glue/webkit_strings.grd » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698