Index: net/spdy/spdy_test_utils.cc |
diff --git a/net/spdy/spdy_test_utils.cc b/net/spdy/spdy_test_utils.cc |
index 610c09179d647b92511053d76abd36565786d245..e2c327eec2251fc1ace8d4f078d5f75859f1dec0 100644 |
--- a/net/spdy/spdy_test_utils.cc |
+++ b/net/spdy/spdy_test_utils.cc |
@@ -189,5 +189,22 @@ void TestHeadersHandler::OnHeaderBlockEnd( |
header_bytes_parsed_ = header_bytes_parsed; |
} |
+TestServerPushDelegate::TestServerPushDelegate() {} |
+ |
+TestServerPushDelegate::~TestServerPushDelegate() {} |
+ |
+void TestServerPushDelegate::OnPush( |
+ std::unique_ptr<ServerPushHelper> push_helper) { |
+ push_helpers[push_helper->GetURL()] = std::move(push_helper); |
+} |
+ |
+bool TestServerPushDelegate::CancelPush(GURL url) { |
+ auto itr = push_helpers.find(url); |
+ DCHECK(itr != push_helpers.end()); |
+ itr->second->Cancel(); |
+ push_helpers.erase(itr); |
+ return true; |
+} |
+ |
} // namespace test |
} // namespace net |