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

Unified Diff: ui/android/java/src/org/chromium/ui/base/ResourceBundle.java

Issue 2396073002: Store only locale paks rather than all assets within BuildConfig.java (Closed)
Patch Set: remove unused constant Created 4 years, 2 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
« no previous file with comments | « build/config/android/rules.gni ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/android/java/src/org/chromium/ui/base/ResourceBundle.java
diff --git a/ui/android/java/src/org/chromium/ui/base/ResourceBundle.java b/ui/android/java/src/org/chromium/ui/base/ResourceBundle.java
index bc82307fcebac87f799629f8850526b231069f04..c1965b4b77c707e4b45b922e4827567b404f5a9a 100644
--- a/ui/android/java/src/org/chromium/ui/base/ResourceBundle.java
+++ b/ui/android/java/src/org/chromium/ui/base/ResourceBundle.java
@@ -8,7 +8,6 @@ import org.chromium.base.BuildConfig;
import org.chromium.base.annotations.CalledByNative;
import org.chromium.base.annotations.JNINamespace;
-import java.io.File;
import java.util.Arrays;
/**
@@ -17,13 +16,10 @@ import java.util.Arrays;
*/
@JNINamespace("ui")
public class ResourceBundle {
- private static final String ASSET_DIR = "assets";
-
@CalledByNative
private static String getLocalePakResourcePath(String locale) {
- String fileName = locale + ".pak";
- if (Arrays.binarySearch(BuildConfig.UNCOMPRESSED_ASSETS, fileName) >= 0) {
- return new File(ASSET_DIR, fileName).toString();
+ if (Arrays.binarySearch(BuildConfig.UNCOMPRESSED_LOCALES, locale) >= 0) {
+ return "assets/" + locale + ".pak";
}
return null;
}
« no previous file with comments | « build/config/android/rules.gni ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698