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

Unified Diff: android_webview/browser/aw_browser_main_parts.cc

Issue 2248743002: Fix missing monochrome resources. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rethink: change webview resource files to match chrome Created 4 years, 4 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 | « android_webview/BUILD.gn ('k') | ui/base/resource/resource_bundle_android.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 56c9374ab49f79902a0aebce5709dd96758cfc8d..769fcf4f1809914af4c08429e6271ae365f3e8a7 100644
--- a/android_webview/browser/aw_browser_main_parts.cc
+++ b/android_webview/browser/aw_browser_main_parts.cc
@@ -99,27 +99,19 @@ int AwBrowserMainParts::PreCreateThreads() {
std::string locale = ui::ResourceBundle::InitSharedInstanceWithLocale(
base::android::GetDefaultLocale(),
NULL,
- ui::ResourceBundle::DO_NOT_LOAD_COMMON_RESOURCES);
+ ui::ResourceBundle::LOAD_COMMON_RESOURCES);
if (locale.empty()) {
LOG(WARNING) << "Failed to load locale .pak from the apk. "
"Bringing up WebView without any locale";
}
base::i18n::SetICUDefaultLocale(locale);
- // Try to directly mmap the webviewchromium.pak from the apk. Fall back to
- // load from file, using PATH_SERVICE, otherwise.
- 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",
- 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);
- }
+ // Try to directly mmap the resources.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("resources.pak");
+ ui::LoadMainAndroidPackFile("assets/resources.pak", pak_file_path);
base::android::MemoryPressureListenerAndroid::RegisterSystemCallback(
base::android::AttachCurrentThread());
« no previous file with comments | « android_webview/BUILD.gn ('k') | ui/base/resource/resource_bundle_android.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698