summaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authormark@chromium.org <mark@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-27 00:02:32 +0000
committermark@chromium.org <mark@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-27 00:02:32 +0000
commitcfd55769dc71733c382e1aeea8e78beda7d67d88 (patch)
tree6ecfce87769d577b880d948854b1af87553ef9b6 /app
parentba6f5793c99b422edcc11fe7e5d159aa8a0057af (diff)
downloadchromium_src-cfd55769dc71733c382e1aeea8e78beda7d67d88.zip
chromium_src-cfd55769dc71733c382e1aeea8e78beda7d67d88.tar.gz
chromium_src-cfd55769dc71733c382e1aeea8e78beda7d67d88.tar.bz2
ResourceBundle::GetRawDataResource should fall back to localized resources
on Mac and Linux as it does on Windows. BUG=25869 TEST=about:terms should work. In a branded build, terms should show up. In an unbranded build, the about:terms page is supposed to be blank, but there should be some skeletal HTML visible in "View Source". Review URL: http://codereview.chromium.org/338028 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30130 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'app')
-rw-r--r--app/resource_bundle_linux.cc9
-rw-r--r--app/resource_bundle_mac.mm9
2 files changed, 14 insertions, 4 deletions
diff --git a/app/resource_bundle_linux.cc b/app/resource_bundle_linux.cc
index 929a77f..5c5cb50 100644
--- a/app/resource_bundle_linux.cc
+++ b/app/resource_bundle_linux.cc
@@ -132,8 +132,13 @@ RefCountedStaticMemory* ResourceBundle::LoadResourceBytes(
base::StringPiece ResourceBundle::GetRawDataResource(int resource_id) {
DCHECK(resources_data_);
base::StringPiece data;
- if (!resources_data_->Get(resource_id, &data))
- return base::StringPiece();
+
+ if (!resources_data_->Get(resource_id, &data)) {
+ if (!locale_resources_data_->Get(resource_id, &data)) {
+ return base::StringPiece();
+ }
+ }
+
return data;
}
diff --git a/app/resource_bundle_mac.mm b/app/resource_bundle_mac.mm
index b306602..92b9120 100644
--- a/app/resource_bundle_mac.mm
+++ b/app/resource_bundle_mac.mm
@@ -86,8 +86,13 @@ RefCountedStaticMemory* ResourceBundle::LoadResourceBytes(
base::StringPiece ResourceBundle::GetRawDataResource(int resource_id) {
DCHECK(resources_data_);
base::StringPiece data;
- if (!resources_data_->Get(resource_id, &data))
- return base::StringPiece();
+
+ if (!resources_data_->Get(resource_id, &data)) {
+ if (!locale_resources_data_->Get(resource_id, &data)) {
+ return base::StringPiece();
+ }
+ }
+
return data;
}