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

Unified Diff: chrome/renderer/extensions/resource_request_policy.cc

Issue 2481923002: [WIP] make GURL::path() return a StringPiece (Closed)
Patch Set: thanks asan Created 4 years, 1 month 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 | « chrome/renderer/chrome_content_renderer_client.cc ('k') | chrome/renderer/extensions/webstore_bindings.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/extensions/resource_request_policy.cc
diff --git a/chrome/renderer/extensions/resource_request_policy.cc b/chrome/renderer/extensions/resource_request_policy.cc
index b426f0911b67bf93811e94435bd3d9816f849fed..4df0c74721b9ac569cd6204bc58ffe0cfeda9f87 100644
--- a/chrome/renderer/extensions/resource_request_policy.cc
+++ b/chrome/renderer/extensions/resource_request_policy.cc
@@ -56,7 +56,7 @@ bool ResourceRequestPolicy::CanRequestResource(
// launchers.
std::string resource_root_relative_path =
resource_url.path().empty() ? std::string()
- : resource_url.path().substr(1);
+ : resource_url.path().substr(1).as_string();
if (extension->is_hosted_app() &&
!IconsInfo::GetIcons(extension)
.ContainsPath(resource_root_relative_path)) {
@@ -68,10 +68,10 @@ bool ResourceRequestPolicy::CanRequestResource(
// Disallow loading of extension resources which are not explicitly listed
// as web or WebView accessible if the manifest version is 2 or greater.
if (!WebAccessibleResourcesInfo::IsResourceWebAccessible(
- extension, resource_url.path()) &&
+ extension, resource_url.path().as_string()) &&
!WebviewInfo::IsResourceWebviewAccessible(
extension, dispatcher_->webview_partition_id(),
- resource_url.path())) {
+ resource_url.path().as_string())) {
GURL frame_url = frame->document().url();
// The page_origin may be GURL("null") for unique origins like data URLs,
« no previous file with comments | « chrome/renderer/chrome_content_renderer_client.cc ('k') | chrome/renderer/extensions/webstore_bindings.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698