| Index: ui/base/resource/resource_bundle_ios.mm
|
| diff --git a/ui/base/resource/resource_bundle_ios.mm b/ui/base/resource/resource_bundle_ios.mm
|
| index 4f5d9bc34fd85620a1a2c9f89b6ef286a61c221c..832656dea569ef2947690f5f8791d294e433f7b8 100644
|
| --- a/ui/base/resource/resource_bundle_ios.mm
|
| +++ b/ui/base/resource/resource_bundle_ios.mm
|
| @@ -34,9 +34,16 @@ base::FilePath GetResourcesPakFilePath(NSString* name, NSString* mac_locale) {
|
| resource_path = [base::mac::FrameworkBundle() pathForResource:name
|
| ofType:@"pak"];
|
| }
|
| +
|
| if (!resource_path) {
|
| - // Return just the name of the pak file.
|
| - return base::FilePath(base::SysNSStringToUTF8(name) + ".pak");
|
| + // Trying to load a resources file that doesn't exist is an error. Return
|
| + // just the name of the pack file so that further down the line it is easier
|
| + // to track down what happened.
|
| + std::string name_string = base::SysNSStringToUTF8(name);
|
| + std::string locale_string = base::SysNSStringToUTF8(mac_locale);
|
| + LOG(ERROR) << "Tried to get the file path of a non-existent pak file '"
|
| + << name_string << "' for locale '" << locale_string << "'";
|
| + return base::FilePath(name_string + ".pak");
|
| }
|
| return base::FilePath([resource_path fileSystemRepresentation]);
|
| }
|
| @@ -44,9 +51,6 @@ base::FilePath GetResourcesPakFilePath(NSString* name, NSString* mac_locale) {
|
| } // namespace
|
|
|
| void ResourceBundle::LoadCommonResources() {
|
| - AddDataPackFromPath(GetResourcesPakFilePath(@"chrome", nil),
|
| - ui::SCALE_FACTOR_NONE);
|
| -
|
| if (IsScaleFactorSupported(SCALE_FACTOR_100P)) {
|
| AddDataPackFromPath(GetResourcesPakFilePath(@"chrome_100_percent", nil),
|
| SCALE_FACTOR_100P);
|
|
|