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

Unified Diff: ui/base/resource/resource_bundle.cc

Issue 402603006: [android_webview] Do not extract webviewchromium.pak (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@awassets
Patch Set: WIP on US pakfiles Created 6 years, 5 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 cddb88ea0a7de5d6a8aea74e65f059b9ef9d03a1..b20601f2d8091f92845f36d7a23b40111aeee59b 100644
--- a/ui/base/resource/resource_bundle.cc
+++ b/ui/base/resource/resource_bundle.cc
@@ -176,13 +176,20 @@ std::string ResourceBundle::InitSharedInstanceLocaleOnly(
// static
void ResourceBundle::InitSharedInstanceWithPakFile(
base::File pak_file, bool should_load_common_resources) {
+ InitSharedInstanceWithPakFileRegion(
+ pak_file.Pass(), base::File::Region::WholeFile(), should_load_common_resources);
+}
+
+// static
+void ResourceBundle::InitSharedInstanceWithPakFileRegion(
+ base::File pak_file, const base::File::Region& region, bool should_load_common_resources) {
InitSharedInstance(NULL);
if (should_load_common_resources)
g_shared_instance_->LoadCommonResources();
scoped_ptr<DataPack> data_pack(
new DataPack(SCALE_FACTOR_100P));
- if (!data_pack->LoadFromFile(pak_file.Pass())) {
+ if (!data_pack->LoadFromFileRegion(pak_file.Pass(), region)) {
NOTREACHED() << "failed to load pak file";
return;
}
« android_webview/browser/aw_browser_main_parts.cc ('K') | « ui/base/resource/resource_bundle.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698