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

Unified Diff: content/test/net/url_request_prepackaged_interceptor.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_mock_http_job.cc ('k') | net/ocsp/nss_ocsp_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/test/net/url_request_prepackaged_interceptor.cc
diff --git a/content/test/net/url_request_prepackaged_interceptor.cc b/content/test/net/url_request_prepackaged_interceptor.cc
index 484f260182606b346317552c3232bbe07e6cb844..8e821b9408d3c87180289ccd963b8564a10c693d 100644
--- a/content/test/net/url_request_prepackaged_interceptor.cc
+++ b/content/test/net/url_request_prepackaged_interceptor.cc
@@ -11,6 +11,7 @@
#include "net/url_request/url_request.h"
#include "net/url_request/url_request_file_job.h"
#include "net/url_request/url_request_filter.h"
+#include "net/url_request/url_request_interceptor.h"
#include "testing/gtest/include/gtest/gtest.h"
using content::BrowserThread;
@@ -41,16 +42,16 @@ class URLRequestPrepackagedJob : public net::URLRequestFileJob {
} // namespace
class URLRequestPrepackagedInterceptor::Delegate
- : public net::URLRequestJobFactory::ProtocolHandler {
+ : public net::URLRequestInterceptor {
public:
Delegate(const std::string& scheme, const std::string& hostname)
: scheme_(scheme), hostname_(hostname), hit_count_(0) {}
virtual ~Delegate() {}
void Register() {
- net::URLRequestFilter::GetInstance()->AddHostnameProtocolHandler(
+ net::URLRequestFilter::GetInstance()->AddHostnameInterceptor(
scheme_, hostname_,
- scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>(this));
+ scoped_ptr<net::URLRequestInterceptor>(this));
}
static void Unregister(
@@ -88,7 +89,7 @@ class URLRequestPrepackagedInterceptor::Delegate
typedef std::map<GURL, base::FilePath> ResponseMap;
// When computing matches, this ignores the query parameters of the url.
- virtual net::URLRequestJob* MaybeCreateJob(
+ virtual net::URLRequestJob* MaybeInterceptRequest(
net::URLRequest* request,
net::NetworkDelegate* network_delegate) const OVERRIDE {
CHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
« no previous file with comments | « content/test/net/url_request_mock_http_job.cc ('k') | net/ocsp/nss_ocsp_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698