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

Unified Diff: chrome/browser/component_updater/test/url_request_post_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 | « no previous file | chrome/browser/errorpage_browsertest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/component_updater/test/url_request_post_interceptor.cc
diff --git a/chrome/browser/component_updater/test/url_request_post_interceptor.cc b/chrome/browser/component_updater/test/url_request_post_interceptor.cc
index a9fd51172343bb898c04417362a9b345055db273..775e898c2ea906f44e23c05dfb9ad8a24d5ebc9a 100644
--- a/chrome/browser/component_updater/test/url_request_post_interceptor.cc
+++ b/chrome/browser/component_updater/test/url_request_post_interceptor.cc
@@ -10,7 +10,7 @@
#include "net/base/upload_bytes_element_reader.h"
#include "net/url_request/url_request.h"
#include "net/url_request/url_request_filter.h"
-#include "net/url_request/url_request_job_factory.h"
+#include "net/url_request/url_request_interceptor.h"
#include "net/url_request/url_request_simple_job.h"
#include "net/url_request/url_request_test_util.h"
@@ -121,18 +121,15 @@ void URLRequestPostInterceptor::Reset() {
ClearExpectations();
}
-class URLRequestPostInterceptor::Delegate
- : public net::URLRequestJobFactory::ProtocolHandler {
+class URLRequestPostInterceptor::Delegate : public net::URLRequestInterceptor {
public:
Delegate(const std::string& scheme, const std::string& hostname)
: scheme_(scheme), hostname_(hostname) {}
void Register() {
CHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
- net::URLRequestFilter::GetInstance()->AddHostnameProtocolHandler(
- scheme_,
- hostname_,
- scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>(this));
+ net::URLRequestFilter::GetInstance()->AddHostnameInterceptor(
+ scheme_, hostname_, scoped_ptr<net::URLRequestInterceptor>(this));
}
void Unregister() {
@@ -155,7 +152,7 @@ class URLRequestPostInterceptor::Delegate
private:
virtual ~Delegate() {}
- 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 | « no previous file | chrome/browser/errorpage_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698