Index: chrome/android/java/src/org/chromium/chrome/browser/ChromeApplication.java |
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ChromeApplication.java b/chrome/android/java/src/org/chromium/chrome/browser/ChromeApplication.java |
index 11668e2ad4222ce70b0ded7ea962834579dcfb0a..04fcc20a57f935529e4efe45fab93877d575006b 100644 |
--- a/chrome/android/java/src/org/chromium/chrome/browser/ChromeApplication.java |
+++ b/chrome/android/java/src/org/chromium/chrome/browser/ChromeApplication.java |
@@ -5,7 +5,6 @@ |
package org.chromium.chrome.browser; |
import android.app.Activity; |
-import android.content.Context; |
import android.content.Intent; |
import android.content.SharedPreferences; |
import android.os.Handler; |
@@ -18,11 +17,13 @@ import org.chromium.base.ApiCompatibilityUtils; |
import org.chromium.base.ApplicationStatus; |
import org.chromium.base.CommandLineInitUtil; |
import org.chromium.base.ContextUtils; |
+import org.chromium.base.ResourceExtractor; |
import org.chromium.base.ThreadUtils; |
import org.chromium.base.TraceEvent; |
import org.chromium.base.annotations.CalledByNative; |
import org.chromium.base.annotations.SuppressFBWarnings; |
import org.chromium.base.library_loader.ProcessInitException; |
+import org.chromium.chrome.R; |
import org.chromium.chrome.browser.banners.AppDetailsDelegate; |
import org.chromium.chrome.browser.customtabs.CustomTabsConnection; |
import org.chromium.chrome.browser.datausage.ExternalDataUseObserver; |
@@ -68,6 +69,7 @@ import org.chromium.content.browser.ChildProcessCreationParams; |
import org.chromium.policy.AppRestrictionsProvider; |
import org.chromium.policy.CombinedPolicyProvider; |
import org.chromium.printing.PrintingController; |
+import org.chromium.ui.base.ResourceBundle; |
/** |
* Basic application functionality that should be shared among all browser applications that use |
@@ -85,9 +87,8 @@ public class ChromeApplication extends ContentApplication { |
private PrintingController mPrintingController; |
- @Override |
- protected void attachBaseContext(Context base) { |
- super.attachBaseContext(base); |
+ public ChromeApplication() { |
+ super(); |
ContextUtils.initApplicationContext(this); |
} |
@@ -158,6 +159,14 @@ public class ChromeApplication extends ContentApplication { |
} |
@Override |
+ protected void initializeLibraryDependencies() { |
+ // The ResourceExtractor is only needed by the browser process, but this will have no |
+ // impact on the renderer process construction. |
+ ResourceBundle.initializeLocalePaks(this, R.array.locale_paks); |
+ ResourceExtractor.setResourcesToExtract(ResourceBundle.getActiveLocaleResources()); |
+ } |
+ |
+ @Override |
public void initCommandLine() { |
CommandLineInitUtil.initCommandLine(this, COMMAND_LINE_FILE); |
} |