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 b5e62b2f596cf73c96a43452c0231eb7a7aa8dd7..56c9374ab49f79902a0aebce5709dd96758cfc8d 100644 |
--- a/android_webview/browser/aw_browser_main_parts.cc |
+++ b/android_webview/browser/aw_browser_main_parts.cc |
@@ -108,10 +108,18 @@ int AwBrowserMainParts::PreCreateThreads() { |
// Try to directly mmap the webviewchromium.pak from the apk. Fall back to |
// load from file, using PATH_SERVICE, otherwise. |
- base::FilePath pak_file_path; |
- PathService::Get(ui::DIR_RESOURCE_PAKS_ANDROID, &pak_file_path); |
- pak_file_path = pak_file_path.AppendASCII("webviewchromium.pak"); |
- ui::LoadMainAndroidPackFile("assets/webviewchromium.pak", pak_file_path); |
+ base::FilePath base_pak_file_path; |
+ PathService::Get(ui::DIR_RESOURCE_PAKS_ANDROID, &base_pak_file_path); |
+ // If Webview is a separate APK from Chrome then it uses webviewchromium.pak |
+ base::FilePath webview_pak_file_path = base_pak_file_path.AppendASCII( |
+ "webviewchromium.pak"); |
+ if (!ui::LoadMainAndroidPackFile("assets/webviewchromium.pak", |
Torne
2016/08/10 13:52:54
We don't have to do this in this CL, but how diffi
aberent
2016/08/10 16:04:20
I don't know; I considered investigating and decid
|
+ webview_pak_file_path)) { |
+ // If it the same APK as Chrome (Monochrome) then it shares resources.pak |
+ base::FilePath chromium_pak_file_path = base_pak_file_path.AppendASCII( |
+ "resources.pak"); |
+ ui::LoadMainAndroidPackFile("assets/resources.pak", chromium_pak_file_path); |
+ } |
base::android::MemoryPressureListenerAndroid::RegisterSystemCallback( |
base::android::AttachCurrentThread()); |