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

Unified Diff: net/ocsp/nss_ocsp_unittest.cc

Issue 300693005: Make URLRequestFilter use URLRequestInterceptors. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix merge Created 6 years, 6 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
« no previous file with comments | « content/test/net/url_request_prepackaged_interceptor.cc ('k') | net/url_request/url_request_filter.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/ocsp/nss_ocsp_unittest.cc
diff --git a/net/ocsp/nss_ocsp_unittest.cc b/net/ocsp/nss_ocsp_unittest.cc
index 0530282f4a67a1f2ea31fc3764ef80cbfa332ba0..f67e3ffc7c9baddde4ffd676a69053ef98d2362e 100644
--- a/net/ocsp/nss_ocsp_unittest.cc
+++ b/net/ocsp/nss_ocsp_unittest.cc
@@ -23,6 +23,7 @@
#include "net/cert/x509_certificate.h"
#include "net/test/cert_test_util.h"
#include "net/url_request/url_request_filter.h"
+#include "net/url_request/url_request_interceptor.h"
#include "net/url_request/url_request_test_job.h"
#include "net/url_request/url_request_test_util.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -39,14 +40,14 @@ const char kAiaHeaders[] = "HTTP/1.1 200 OK\0"
"Content-type: application/pkix-cert\0"
"\0";
-class AiaResponseHandler : public net::URLRequestJobFactory::ProtocolHandler {
+class AiaResponseHandler : public net::URLRequestInterceptor {
public:
AiaResponseHandler(const std::string& headers, const std::string& cert_data)
: headers_(headers), cert_data_(cert_data), request_count_(0) {}
virtual ~AiaResponseHandler() {}
- // net::URLRequestJobFactory::ProtocolHandler implementation:
- virtual net::URLRequestJob* MaybeCreateJob(
+ // net::URLRequestInterceptor implementation:
+ virtual net::URLRequestJob* MaybeInterceptRequest(
net::URLRequest* request,
net::NetworkDelegate* network_delegate) const OVERRIDE {
++const_cast<AiaResponseHandler*>(this)->request_count_;
@@ -89,10 +90,10 @@ class NssHttpTest : public ::testing::Test {
new AiaResponseHandler(kAiaHeaders, file_contents));
handler_ = handler.get();
- URLRequestFilter::GetInstance()->AddHostnameProtocolHandler(
+ URLRequestFilter::GetInstance()->AddHostnameInterceptor(
"http",
kAiaHost,
- handler.PassAs<URLRequestJobFactory::ProtocolHandler>());
+ handler.PassAs<URLRequestInterceptor>());
SetURLRequestContextForNSSHttpIO(&context_);
EnsureNSSHttpIOInit();
« no previous file with comments | « content/test/net/url_request_prepackaged_interceptor.cc ('k') | net/url_request/url_request_filter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698