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

Unified Diff: net/tools/quic/quic_in_memory_cache.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 | « net/test/url_request/url_request_mock_http_job.cc ('k') | net/tools/quic/quic_in_memory_cache_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/tools/quic/quic_in_memory_cache.cc
diff --git a/net/tools/quic/quic_in_memory_cache.cc b/net/tools/quic/quic_in_memory_cache.cc
index 392a848b48c1f3c76db39f361ed5c17b19bb5137..5635f71ec0d4539edf8ea7cda600cfd7efa06b18 100644
--- a/net/tools/quic/quic_in_memory_cache.cc
+++ b/net/tools/quic/quic_in_memory_cache.cc
@@ -266,7 +266,7 @@ void QuicInMemoryCache::InitializeFromDirectory(const string& cache_directory) {
resource_file->SetHostPathFromBase(base);
resource_file->Read();
- AddResponse(resource_file->host(), resource_file->path(),
+ AddResponse(resource_file->host(), resource_file->path().as_string(),
resource_file->spdy_headers().Clone(), resource_file->body());
resource_files.push_back(std::move(resource_file));
@@ -276,7 +276,8 @@ void QuicInMemoryCache::InitializeFromDirectory(const string& cache_directory) {
std::list<ServerPushInfo> push_resources;
for (const auto& push_url : resource_file->push_urls()) {
GURL url(push_url);
- const Response* response = GetResponse(url.host(), url.path());
+ const Response* response =
+ GetResponse(url.host(), url.path().as_string());
if (!response) {
QUIC_BUG << "Push URL '" << push_url << "' not found.";
return;
@@ -285,7 +286,8 @@ void QuicInMemoryCache::InitializeFromDirectory(const string& cache_directory) {
net::kV3LowestPriority,
response->body().as_string()));
}
- MaybeAddServerPushResources(resource_file->host(), resource_file->path(),
+ MaybeAddServerPushResources(resource_file->host(),
+ resource_file->path().as_string(),
push_resources);
}
}
@@ -360,7 +362,7 @@ void QuicInMemoryCache::MaybeAddServerPushResources(
if (host.empty()) {
host = request_host.as_string();
}
- string path = push_resource.request_url.path();
+ string path = push_resource.request_url.path().as_string();
bool found_existing_response = false;
{
base::AutoLock lock(response_mutex_);
« no previous file with comments | « net/test/url_request/url_request_mock_http_job.cc ('k') | net/tools/quic/quic_in_memory_cache_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698