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

Unified Diff: extensions/browser/extension_navigation_throttle.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
Index: extensions/browser/extension_navigation_throttle.cc
diff --git a/extensions/browser/extension_navigation_throttle.cc b/extensions/browser/extension_navigation_throttle.cc
index 68c0a92e340da9750e1fcff31bd267476f9f0e00..1455a926bb118a1dfae03462f0c31eaf84caea8a 100644
--- a/extensions/browser/extension_navigation_throttle.cc
+++ b/extensions/browser/extension_navigation_throttle.cc
@@ -80,7 +80,7 @@ ExtensionNavigationThrottle::WillStartRequest() {
std::string partition_domain, partition_id;
bool in_memory;
- std::string resource_path = url.path();
+ std::string resource_path = url.path().as_string();
bool is_guest = WebViewGuest::GetGuestPartitionConfigForSite(
navigation_handle()->GetStartingSiteInstance()->GetSiteURL(),
&partition_domain, &partition_id, &in_memory);
@@ -143,7 +143,7 @@ ExtensionNavigationThrottle::WillStartRequest() {
// Since there was at least one origin different than the navigation URL,
// explicitly check for the resource in web_accessible_resources.
- std::string resource_path = url.path();
+ base::StringPiece resource_path = url.path();
if (!registry)
return content::NavigationThrottle::BLOCK_REQUEST;
@@ -152,8 +152,8 @@ ExtensionNavigationThrottle::WillStartRequest() {
if (!extension)
return content::NavigationThrottle::BLOCK_REQUEST;
- if (WebAccessibleResourcesInfo::IsResourceWebAccessible(extension,
- resource_path)) {
+ if (WebAccessibleResourcesInfo::IsResourceWebAccessible(
+ extension, resource_path.as_string())) {
return content::NavigationThrottle::PROCEED;
}
« no previous file with comments | « content/shell/browser/layout_test/layout_test_browser_context.cc ('k') | extensions/browser/extension_protocols.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698