Index: android_webview/browser/aw_browser_main_parts.cc |
diff --git a/android_webview/browser/aw_browser_main_parts.cc b/android_webview/browser/aw_browser_main_parts.cc |
index dc75d4b9902363aaf4ac7aa414c829081f390751..7e587344c846300b38ea0d0645b50ce5dfb1f9fa 100644 |
--- a/android_webview/browser/aw_browser_main_parts.cc |
+++ b/android_webview/browser/aw_browser_main_parts.cc |
@@ -26,6 +26,7 @@ |
#include "ui/base/l10n/l10n_util.h" |
#include "ui/base/layout.h" |
#include "ui/base/resource/resource_bundle.h" |
+#include "ui/base/resource/resource_bundle_android.h" |
#include "ui/base/ui_base_paths.h" |
#include "ui/gl/gl_surface.h" |
@@ -62,15 +63,15 @@ int AwBrowserMainParts::PreCreateThreads() { |
base::android::GetDefaultLocale(), |
NULL, |
ui::ResourceBundle::DO_NOT_LOAD_COMMON_RESOURCES); |
- std::string locale = |
- "assets/" + l10n_util::GetApplicationLocale(std::string()) + ".pak"; |
- int pak_fd = base::android::OpenApkAsset(locale, &pak_region); |
+ std::string locale = l10n_util::GetApplicationLocale(std::string()); |
+ std::string pak_path = ui::GetPathForAndroidLocalePakWithinApk(locale); |
+ int pak_fd = base::android::OpenApkAsset(pak_path, &pak_region); |
if (pak_fd != -1) { |
ui::ResourceBundle::CleanupSharedInstance(); |
ui::ResourceBundle::InitSharedInstanceWithPakFileRegion( |
base::File(pak_fd), pak_region); |
} else { |
- LOG(WARNING) << "Failed to load " << locale << ".pak from the apk too. " |
+ LOG(WARNING) << "Failed to load " << locale << ".pak from the apk. " |
"Bringing up WebView without any locale"; |
} |