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

Unified Diff: net/url_request/url_request_test_util.h

Issue 1888963004: Add HttpProtocolHandler and convert everything to use it (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@remove-supports-scheme
Patch Set: even more rebase Created 4 years, 8 months 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: 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_;
};

Powered by Google App Engine
This is Rietveld 408576698