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

Unified Diff: net/test/url_request/url_request_mock_http_job.cc

Issue 686343002: Add MaybeInterceptRedirect/Response to URLRequestInterceptor (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added tests, removed DRP Created 6 years, 1 month 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/test/url_request/url_request_mock_http_job.cc
diff --git a/net/test/url_request/url_request_mock_http_job.cc b/net/test/url_request/url_request_mock_http_job.cc
index 5542ac7343d91285940fced92993fd149a4bb7e9..6585ae7fbd848e719b3a119bbc1ab376e57544b8 100644
--- a/net/test/url_request/url_request_mock_http_job.cc
+++ b/net/test/url_request/url_request_mock_http_job.cc
@@ -39,10 +39,10 @@ class MockJobInterceptor : public net::URLRequestInterceptor {
worker_pool_(worker_pool) {}
~MockJobInterceptor() override {}
- // net::URLRequestJobFactory::ProtocolHandler implementation
+ // net::URLRequestInterceptor implementation
net::URLRequestJob* MaybeInterceptRequest(
net::URLRequest* request,
- net::NetworkDelegate* network_delegate) const override {
+ net::NetworkDelegate* network_delegate) override {
return new URLRequestMockHTTPJob(
request,
network_delegate,
@@ -51,6 +51,19 @@ class MockJobInterceptor : public net::URLRequestInterceptor {
base::SequencedWorkerPool::SKIP_ON_SHUTDOWN));
}
+ net::URLRequestJob* MaybeInterceptRedirect(
+ net::URLRequest* request,
+ net::NetworkDelegate* network_delegate,
+ const GURL& location) override {
+ return NULL;
+ }
+
+ net::URLRequestJob* MaybeInterceptResponse(
+ net::URLRequest* request,
+ net::NetworkDelegate* network_delegate) override {
+ return NULL;
+ }
+
private:
base::FilePath GetOnDiskPath(net::URLRequest* request) const {
// Conceptually we just want to "return base_path_ + request->url().path()".

Powered by Google App Engine
This is Rietveld 408576698