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

Unified Diff: extensions/browser/url_request_util.cc

Issue 2626923002: Make ExtensionIconSet::ContainsPath use StringPiece. (Closed)
Patch Set: Created 3 years, 11 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 | « extensions/browser/extension_protocols.cc ('k') | extensions/common/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/browser/url_request_util.cc
diff --git a/extensions/browser/url_request_util.cc b/extensions/browser/url_request_util.cc
index 28d863389078857b11a65b32410543a20e7d433a..c7347cdbe956a4fc74d847daccf7175c1b3885d2 100644
--- a/extensions/browser/url_request_util.cc
+++ b/extensions/browser/url_request_util.cc
@@ -67,9 +67,10 @@ bool AllowCrossRendererResourceLoad(net::URLRequest* request,
// hybrid hosted/packaged apps. The one exception is access to icons, since
// some extensions want to be able to do things like create their own
// launchers.
- std::string resource_root_relative_path =
- request->url().path().empty() ? std::string()
- : request->url().path().substr(1);
+ base::StringPiece resource_root_relative_path =
+ request->url().path_piece().empty()
+ ? base::StringPiece()
+ : request->url().path_piece().substr(1);
if (extension->is_hosted_app() &&
!IconsInfo::GetIcons(extension)
.ContainsPath(resource_root_relative_path)) {
« no previous file with comments | « extensions/browser/extension_protocols.cc ('k') | extensions/common/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698