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

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: 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..034d9f48180e659e6ffea1194ade23415d3f2673 100644
--- a/ui/base/resource/resource_bundle.cc
+++ b/ui/base/resource/resource_bundle.cc
@@ -199,16 +199,15 @@ 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
Yaron 2015/06/19 15:01:30 Nit: remove comment
agrieve 2015/06/23 15:33:22 Done.
// 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,

Powered by Google App Engine
This is Rietveld 408576698