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

Unified Diff: android_webview/native/aw_media_url_interceptor.cc

Issue 1156573008: Allow OpenApkAsset() to open resource files as well as assets. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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/lib/main/aw_main_delegate.cc ('k') | base/android/apk_assets.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: android_webview/native/aw_media_url_interceptor.cc
diff --git a/android_webview/native/aw_media_url_interceptor.cc b/android_webview/native/aw_media_url_interceptor.cc
index 6923d69133e2578f5c48cca3254136e3e15af795..a2c1cddea8147dda8930b66b40264a5f5b3f9184 100644
--- a/android_webview/native/aw_media_url_interceptor.cc
+++ b/android_webview/native/aw_media_url_interceptor.cc
@@ -21,7 +21,8 @@ bool AwMediaUrlInterceptor::Intercept(const std::string& url,
if (StartsWithASCII(url, asset_file_prefix, true)) {
std::string filename(url);
- ReplaceFirstSubstringAfterOffset(&filename, 0, asset_file_prefix, "");
+ ReplaceFirstSubstringAfterOffset(
+ &filename, 0, asset_file_prefix, "assets/");
base::MemoryMappedFile::Region region =
base::MemoryMappedFile::Region::kWholeFile;
*fd = base::android::OpenApkAsset(filename, &region);
« no previous file with comments | « android_webview/lib/main/aw_main_delegate.cc ('k') | base/android/apk_assets.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698