| Index: ui/base/resource/resource_bundle.cc
|
| diff --git a/ui/base/resource/resource_bundle.cc b/ui/base/resource/resource_bundle.cc
|
| index fba91261a1abd3c0a7a4938df2bc513635671dba..37f6c773a43ebe489772aad7f3a4b9ed16fc1a54 100644
|
| --- a/ui/base/resource/resource_bundle.cc
|
| +++ b/ui/base/resource/resource_bundle.cc
|
| @@ -250,7 +250,8 @@
|
| base::File file,
|
| const base::MemoryMappedFile::Region& region,
|
| ScaleFactor scale_factor) {
|
| - scoped_ptr<DataPack> data_pack(new DataPack(scale_factor));
|
| + scoped_ptr<DataPack> data_pack(
|
| + new DataPack(scale_factor));
|
| if (data_pack->LoadFromFileRegion(file.Pass(), region)) {
|
| AddDataPack(data_pack.release());
|
| } else {
|
| @@ -304,7 +305,8 @@
|
| return std::string();
|
| }
|
|
|
| - scoped_ptr<DataPack> data_pack(new DataPack(SCALE_FACTOR_100P));
|
| + scoped_ptr<DataPack> data_pack(
|
| + new DataPack(SCALE_FACTOR_100P));
|
| if (!data_pack->LoadFromPath(locale_file_path)) {
|
| UMA_HISTOGRAM_ENUMERATION("ResourceBundle.LoadLocaleResourcesError",
|
| logging::GetLastSystemErrorCode(), 16000);
|
| @@ -663,15 +665,17 @@
|
| if (delegate_)
|
| pack_path = delegate_->GetPathForResourcePack(pack_path, scale_factor);
|
|
|
| - // An empty path is a request from the delegate to cancel loading.
|
| - if (pack_path.empty())
|
| + // Don't try to load empty values or values that are not absolute paths.
|
| + if (pack_path.empty() || !pack_path.IsAbsolute())
|
| return;
|
|
|
| - scoped_ptr<DataPack> data_pack(new DataPack(scale_factor));
|
| + scoped_ptr<DataPack> data_pack(
|
| + new DataPack(scale_factor));
|
| if (data_pack->LoadFromPath(pack_path)) {
|
| AddDataPack(data_pack.release());
|
| } else if (!optional) {
|
| - DLOG(FATAL) << "Failed to load " << pack_path.value();
|
| + LOG(ERROR) << "Failed to load " << pack_path.value()
|
| + << "\nSome features may not be available.";
|
| }
|
| }
|
|
|
|
|