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

Unified Diff: extensions/browser/extension_protocols.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 | « extensions/browser/extension_navigation_throttle.cc ('k') | extensions/browser/info_map.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/browser/extension_protocols.cc
diff --git a/extensions/browser/extension_protocols.cc b/extensions/browser/extension_protocols.cc
index c231083a1b2533c7e094c3d88a128a4ff3f8db8d..3bdbc18927532b962916a42eba2ba3e1b14a83d3 100644
--- a/extensions/browser/extension_protocols.cc
+++ b/extensions/browser/extension_protocols.cc
@@ -392,7 +392,7 @@ bool URLIsForExtensionIcon(const GURL& url, const Extension* extension) {
if (!extension)
return false;
- std::string path = url.path();
+ std::string path = url.path().as_string();
DCHECK_EQ(url.host(), extension->id());
DCHECK(path.length() > 0 && path[0] == '/');
path = path.substr(1);
@@ -454,7 +454,7 @@ ExtensionProtocolHandler::MaybeCreateJob(
bool follow_symlinks_anywhere = false;
if (extension) {
- std::string resource_path = request->url().path();
+ std::string resource_path = request->url().path().as_string();
// Use default CSP for <webview>.
if (!url_request_util::IsWebViewRequest(request)) {
@@ -477,7 +477,7 @@ ExtensionProtocolHandler::MaybeCreateJob(
}
// Create a job for a generated background page.
- std::string path = request->url().path();
+ std::string path = request->url().path().as_string();
if (path.size() > 1 &&
path.substr(1) == extensions::kGeneratedBackgroundPageFilename) {
return new GeneratedBackgroundPageJob(
« no previous file with comments | « extensions/browser/extension_navigation_throttle.cc ('k') | extensions/browser/info_map.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698