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

Unified Diff: chrome/renderer/extensions/resource_request_policy.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 | « chrome/common/extensions/extension_icon_set_unittest.cc ('k') | chrome/test/BUILD.gn » ('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 3d9b08a0dda00ca31e04f8cfa2d4cd66e2c90e91..fc73f13a3fff867774e1eed5b5f63beec159402b 100644
--- a/chrome/renderer/extensions/resource_request_policy.cc
+++ b/chrome/renderer/extensions/resource_request_policy.cc
@@ -54,9 +54,9 @@ bool ResourceRequestPolicy::CanRequestResource(
// 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 =
- resource_url.path().empty() ? std::string()
- : resource_url.path().substr(1);
+ base::StringPiece resource_root_relative_path =
+ resource_url.path_piece().empty() ? base::StringPiece()
+ : resource_url.path_piece().substr(1);
if (extension->is_hosted_app() &&
!IconsInfo::GetIcons(extension)
.ContainsPath(resource_root_relative_path)) {
« no previous file with comments | « chrome/common/extensions/extension_icon_set_unittest.cc ('k') | chrome/test/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698