Allow setting a delay for a response.
This serves as infrastructure for testing that timing metrics
measure what they're supposed to
(see https://chromium-review.googlesource.com/c/chromium/src/+/3815441)
PiperOrigin-RevId: 468108169
diff --git a/quiche/quic/tools/quic_memory_cache_backend.h b/quiche/quic/tools/quic_memory_cache_backend.h
index 7dfd372..ccdaf59 100644
--- a/quiche/quic/tools/quic_memory_cache_backend.h
+++ b/quiche/quic/tools/quic_memory_cache_backend.h
@@ -121,6 +121,12 @@
spdy::Http2HeaderBlock response_headers, absl::string_view response_body,
QuicBackendResponse::SpecialResponseType response_type);
+ // Finds a response with the given host and path, and assign it a simulated
+ // delay. Returns true if the requisite response was found and the delay was
+ // set.
+ bool SetResponseDelay(absl::string_view host, absl::string_view path,
+ QuicTime::Delta delay);
+
// Sets a default response in case of cache misses. Takes ownership of
// 'response'.
void AddDefaultResponse(QuicBackendResponse* response);