Index: net/url_request/url_request_test_util.h |
diff --git a/net/url_request/url_request_test_util.h b/net/url_request/url_request_test_util.h |
index a18ef8ce1303a8bfc11779a9e95f59f0139cad2e..1c5b4784a389636bb6c6e48d27ef0494c0fd0f46 100644 |
--- a/net/url_request/url_request_test_util.h |
+++ b/net/url_request/url_request_test_util.h |
@@ -38,6 +38,7 @@ |
#include "net/http/http_request_headers.h" |
#include "net/proxy/proxy_service.h" |
#include "net/ssl/ssl_config_service_defaults.h" |
+#include "net/url_request/http_protocol_handler.h" |
#include "net/url_request/url_request.h" |
#include "net/url_request/url_request_context.h" |
#include "net/url_request/url_request_context_getter.h" |
@@ -409,7 +410,9 @@ class TestNetworkDelegate : public NetworkDelegateImpl { |
//----------------------------------------------------------------------------- |
-// A simple ProtocolHandler that returns a pre-built URLRequestJob only once. |
+// A simple ProtocolHandler that returns a pre-built URLRequestJob only once, |
+// and falls back to a normal HttpProtocolHandler implementation if no pre-built |
+// URLRequestJob is present. |
class TestJobInterceptor : public URLRequestJobFactory::ProtocolHandler { |
public: |
TestJobInterceptor(); |
@@ -421,6 +424,7 @@ class TestJobInterceptor : public URLRequestJobFactory::ProtocolHandler { |
void set_main_intercept_job(std::unique_ptr<URLRequestJob> job); |
private: |
+ std::unique_ptr<HttpProtocolHandler> http_protocol_handler_; |
mutable std::unique_ptr<URLRequestJob> main_intercept_job_; |
}; |