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

Unified Diff: android_webview/native/aw_media_url_interceptor.cc

Issue 1200393002: Add more string_util functions to base namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@string
Patch Set: Android Created 5 years, 6 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 | « no previous file | android_webview/renderer/aw_content_renderer_client.cc » ('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 96d329821c5a10b66a2ca4e24ea6334bdb58db57..39e9b549e37546100d64f993f32fd109d4cc1224 100644
--- a/android_webview/native/aw_media_url_interceptor.cc
+++ b/android_webview/native/aw_media_url_interceptor.cc
@@ -13,15 +13,16 @@
namespace android_webview {
bool AwMediaUrlInterceptor::Intercept(const std::string& url,
- int* fd, int64* offset, int64* size) const{
- const std::string asset_file_prefix(
- std::string(url::kFileScheme) +
- std::string(url::kStandardSchemeSeparator) +
- android_webview::kAndroidAssetPath);
+ int* fd,
+ int64* offset,
+ int64* size) const{
+ std::string asset_file_prefix(url::kFileScheme);
+ asset_file_prefix.append(url::kStandardSchemeSeparator);
+ asset_file_prefix.append(android_webview::kAndroidAssetPath);
if (base::StartsWithASCII(url, asset_file_prefix, true)) {
std::string filename(url);
- ReplaceFirstSubstringAfterOffset(
+ base::ReplaceFirstSubstringAfterOffset(
&filename, 0, asset_file_prefix, "assets/");
base::MemoryMappedFile::Region region =
base::MemoryMappedFile::Region::kWholeFile;
« no previous file with comments | « no previous file | android_webview/renderer/aw_content_renderer_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698