Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(124)

Unified Diff: ui/base/resource/resource_bundle.cc

Issue 1193613002: Convert Android WebView to store locale .pak files as res/raw resources (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@no-extractor-init
Patch Set: rebase again Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: ui/base/resource/resource_bundle.cc
diff --git a/ui/base/resource/resource_bundle.cc b/ui/base/resource/resource_bundle.cc
index cdab26ef36c04c3aa68b3667c3e3c8b54ade5451..f57c321306d1ee8dbacb9c1e16c2ae76679c6fc2 100644
--- a/ui/base/resource/resource_bundle.cc
+++ b/ui/base/resource/resource_bundle.cc
@@ -199,16 +199,12 @@ ResourceBundle& ResourceBundle::GetSharedInstance() {
}
bool ResourceBundle::LocaleDataPakExists(const std::string& locale) {
- bool locale_file_path_exists = !GetLocaleFilePath(locale, true).empty();
#if defined(OS_ANDROID)
- // TODO(mkosiba,primiano): Chrome should mmap the .pak files too, in which
- // case we'd not need to check if locale_file_path_exists here.
- // http://crbug.com/394502.
- return locale_file_path_exists ||
- AssetContainedInApk(locale + kPakFileSuffix);
-#else
- return locale_file_path_exists;
+ if (!GetPathForAndroidLocalePakWithinApk(locale).empty()) {
+ return true;
+ }
#endif
+ return !GetLocaleFilePath(locale, true).empty();
}
void ResourceBundle::AddDataPackFromPath(const base::FilePath& path,
« no previous file with comments | « ui/android/java/src/org/chromium/ui/base/ResourceBundle.java ('k') | ui/base/resource/resource_bundle_android.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698