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

Unified Diff: storage/common/fileapi/file_system_util.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 | « storage/browser/fileapi/file_system_url_request_job_factory.cc ('k') | ui/base/webui/web_ui_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: storage/common/fileapi/file_system_util.cc
diff --git a/storage/common/fileapi/file_system_util.cc b/storage/common/fileapi/file_system_util.cc
index 1116fcd563118eaf1b97315c2cd83d5bd964f8a6..16d6acaa674498854006d100c6ec94ca755e3e6b 100644
--- a/storage/common/fileapi/file_system_util.cc
+++ b/storage/common/fileapi/file_system_util.cc
@@ -172,7 +172,7 @@ bool ParseFileSystemSchemeURL(const GURL& url,
// A path of the inner_url contains only mount type part (e.g. "/temporary").
DCHECK(url.inner_url());
- std::string inner_path = url.inner_url()->path();
+ base::StringPiece inner_path = url.inner_url()->path();
for (size_t i = 0; i < arraysize(kValidTypes); ++i) {
if (inner_path == kValidTypes[i].dir) {
file_system_type = kValidTypes[i].type;
@@ -183,10 +183,11 @@ bool ParseFileSystemSchemeURL(const GURL& url,
if (file_system_type == kFileSystemTypeUnknown)
return false;
- std::string path = net::UnescapeURLComponent(url.path(),
+ std::string path = net::UnescapeURLComponent(
+ url.path().as_string(),
net::UnescapeRule::SPACES | net::UnescapeRule::PATH_SEPARATORS |
- net::UnescapeRule::URL_SPECIAL_CHARS_EXCEPT_PATH_SEPARATORS |
- net::UnescapeRule::SPOOFING_AND_CONTROL_CHARS);
+ net::UnescapeRule::URL_SPECIAL_CHARS_EXCEPT_PATH_SEPARATORS |
+ net::UnescapeRule::SPOOFING_AND_CONTROL_CHARS);
// Ensure the path is relative.
while (!path.empty() && path[0] == '/')
« no previous file with comments | « storage/browser/fileapi/file_system_url_request_job_factory.cc ('k') | ui/base/webui/web_ui_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698