| Index: ui/base/resource/resource_bundle.cc
|
| diff --git a/ui/base/resource/resource_bundle.cc b/ui/base/resource/resource_bundle.cc
|
| index 049c5e26962a1c0c197877cc048b3f7e0d0e0104..899a8a45cb95aaf05737504cde5e9780fdf25afd 100644
|
| --- a/ui/base/resource/resource_bundle.cc
|
| +++ b/ui/base/resource/resource_bundle.cc
|
| @@ -556,6 +556,22 @@ base::string16 ResourceBundle::GetLocalizedString(int message_id) {
|
| return msg;
|
| }
|
|
|
| +base::RefCountedMemory* ResourceBundle::LoadLocalizedResourceBytes(
|
| + int resource_id) {
|
| + {
|
| + base::AutoLock lock_scope(*locale_resources_data_lock_);
|
| + base::StringPiece data;
|
| + if (locale_resources_data_.get() &&
|
| + locale_resources_data_->GetStringPiece(
|
| + static_cast<uint16_t>(resource_id), &data) &&
|
| + !data.empty()) {
|
| + return new base::RefCountedStaticMemory(data.data(), data.length());
|
| + }
|
| + }
|
| + // Release lock_scope and fall back to main data pack.
|
| + return LoadDataResourceBytes(resource_id);
|
| +}
|
| +
|
| const gfx::FontList& ResourceBundle::GetFontListWithDelta(
|
| int size_delta,
|
| gfx::Font::FontStyle style,
|
|
|