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

Unified Diff: net/tools/quic/quic_simple_server_stream.cc

Issue 2547583002: Landing Recent QUIC changes until Fri Nov 18 23:21:04 2016 +0000 (Closed)
Patch Set: Remove explicit HTTP/2 enum usage Created 4 years 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/tools/quic/quic_simple_server_stream.h ('k') | net/tools/quic/quic_simple_server_stream_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/tools/quic/quic_simple_server_stream.cc
diff --git a/net/tools/quic/quic_simple_server_stream.cc b/net/tools/quic/quic_simple_server_stream.cc
index ccfd683561efdfb55c56c989e93507439d07ff37..1d32f9c0bf9bfbb9fb22802bce583fc90831c47d 100644
--- a/net/tools/quic/quic_simple_server_stream.cc
+++ b/net/tools/quic/quic_simple_server_stream.cc
@@ -17,7 +17,7 @@
#include "net/quic/core/quic_spdy_stream.h"
#include "net/quic/core/spdy_utils.h"
#include "net/spdy/spdy_protocol.h"
-#include "net/tools/quic/quic_in_memory_cache.h"
+#include "net/tools/quic/quic_http_response_cache.h"
#include "net/tools/quic/quic_simple_server_session.h"
using base::StringPiece;
@@ -29,10 +29,10 @@ namespace net {
QuicSimpleServerStream::QuicSimpleServerStream(
QuicStreamId id,
QuicSpdySession* session,
- QuicInMemoryCache* in_memory_cache)
+ QuicHttpResponseCache* response_cache)
: QuicSpdyStream(id, session),
content_length_(-1),
- in_memory_cache_(in_memory_cache) {}
+ response_cache_(response_cache) {}
QuicSimpleServerStream::~QuicSimpleServerStream() {}
@@ -130,11 +130,11 @@ void QuicSimpleServerStream::SendResponse() {
}
// Find response in cache. If not found, send error response.
- const QuicInMemoryCache::Response* response = nullptr;
+ const QuicHttpResponseCache::Response* response = nullptr;
auto authority = request_headers_.find(":authority");
auto path = request_headers_.find(":path");
if (authority != request_headers_.end() && path != request_headers_.end()) {
- response = in_memory_cache_->GetResponse(authority->second, path->second);
+ response = response_cache_->GetResponse(authority->second, path->second);
}
if (response == nullptr) {
DVLOG(1) << "Response not found in cache.";
@@ -142,13 +142,13 @@ void QuicSimpleServerStream::SendResponse() {
return;
}
- if (response->response_type() == QuicInMemoryCache::CLOSE_CONNECTION) {
+ if (response->response_type() == QuicHttpResponseCache::CLOSE_CONNECTION) {
DVLOG(1) << "Special response: closing connection.";
CloseConnectionWithDetails(QUIC_NO_ERROR, "Toy server forcing close");
return;
}
- if (response->response_type() == QuicInMemoryCache::IGNORE_REQUEST) {
+ if (response->response_type() == QuicHttpResponseCache::IGNORE_REQUEST) {
DVLOG(1) << "Special response: ignoring request.";
return;
}
@@ -184,8 +184,8 @@ void QuicSimpleServerStream::SendResponse() {
return;
}
}
- std::list<QuicInMemoryCache::ServerPushInfo> resources =
- in_memory_cache_->GetServerPushResources(request_url);
+ std::list<QuicHttpResponseCache::ServerPushInfo> resources =
+ response_cache_->GetServerPushResources(request_url);
DVLOG(1) << "Found " << resources.size() << " push resources for stream "
<< id();
« no previous file with comments | « net/tools/quic/quic_simple_server_stream.h ('k') | net/tools/quic/quic_simple_server_stream_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698