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

Unified Diff: components/grpc_support/test/quic_test_server.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
Index: components/grpc_support/test/quic_test_server.cc
diff --git a/components/grpc_support/test/quic_test_server.cc b/components/grpc_support/test/quic_test_server.cc
index 8455cd6d303c4d05cbf21463dcb8514adc499a44..d57f94ce706abf6220ba0ea996ed7e52ebf9b0f7 100644
--- a/components/grpc_support/test/quic_test_server.cc
+++ b/components/grpc_support/test/quic_test_server.cc
@@ -18,7 +18,7 @@
#include "net/quic/chromium/crypto/proof_source_chromium.h"
#include "net/spdy/spdy_header_block.h"
#include "net/test/test_data_directory.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.h"
namespace grpc_support {
@@ -41,18 +41,18 @@ const char kHelloTrailerName[] = "hello_trailer";
const char kHelloTrailerValue[] = "hello trailer value";
base::Thread* g_quic_server_thread = nullptr;
-net::QuicInMemoryCache* g_quic_in_memory_cache = nullptr;
+net::QuicHttpResponseCache* g_quic_response_cache = nullptr;
net::QuicSimpleServer* g_quic_server = nullptr;
int g_quic_server_port = 0;
-void SetupQuicInMemoryCache() {
+void SetupQuicHttpResponseCache() {
net::SpdyHeaderBlock headers;
headers[kHelloHeaderName] = kHelloHeaderValue;
headers[kStatusHeader] = kHelloStatus;
net::SpdyHeaderBlock trailers;
trailers[kHelloTrailerName] = kHelloTrailerValue;
- g_quic_in_memory_cache = new net::QuicInMemoryCache();
- g_quic_in_memory_cache->AddResponse(base::StringPrintf("%s", kTestServerHost),
+ g_quic_response_cache = new net::QuicHttpResponseCache();
+ g_quic_response_cache->AddResponse(base::StringPrintf("%s", kTestServerHost),
kHelloPath, std::move(headers),
kHelloBodyValue, std::move(trailers));
}
@@ -73,12 +73,12 @@ void StartQuicServerOnServerThread(const base::FilePath& test_files_root,
directory.AppendASCII("quic_test.example.com.key.pkcs8"),
directory.AppendASCII("quic_test.example.com.key.sct")));
- SetupQuicInMemoryCache();
+ SetupQuicHttpResponseCache();
g_quic_server = new net::QuicSimpleServer(
std::move(proof_source), config,
net::QuicCryptoServerConfig::ConfigOptions(), net::AllSupportedVersions(),
- g_quic_in_memory_cache);
+ g_quic_response_cache);
// Start listening on an unbound port.
int rv = g_quic_server->Listen(
@@ -94,8 +94,8 @@ void ShutdownOnServerThread(base::WaitableEvent* server_stopped_event) {
g_quic_server->Shutdown();
delete g_quic_server;
g_quic_server = nullptr;
- delete g_quic_in_memory_cache;
- g_quic_in_memory_cache = nullptr;
+ delete g_quic_response_cache;
+ g_quic_response_cache = nullptr;
server_stopped_event->Signal();
}

Powered by Google App Engine
This is Rietveld 408576698