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

Unified Diff: chrome/browser/ui/webui/fileicon_source.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: chrome/browser/ui/webui/fileicon_source.cc
diff --git a/chrome/browser/ui/webui/fileicon_source.cc b/chrome/browser/ui/webui/fileicon_source.cc
index ddb2fbee8251b705455ec3d2f297bb1faf02710a..483df0bf9bd2ae08eee130a7a7f6d38a58c44e55 100644
--- a/chrome/browser/ui/webui/fileicon_source.cc
+++ b/chrome/browser/ui/webui/fileicon_source.cc
@@ -42,7 +42,7 @@ void GetFilePathAndQuery(const std::string& url,
// We receive the url with chrome://fileicon/ stripped but GURL expects it.
const GURL gurl("chrome://fileicon/" + url);
std::string path = net::UnescapeURLComponent(
- gurl.path().substr(1),
+ gurl.path().substr(1).as_string(),
net::UnescapeRule::URL_SPECIAL_CHARS_EXCEPT_PATH_SEPARATORS |
net::UnescapeRule::PATH_SEPARATORS | net::UnescapeRule::SPACES);

Powered by Google App Engine
This is Rietveld 408576698