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

Unified Diff: net/url_request/url_request_job_factory.h

Issue 10855209: Refactoring: ProtocolHandler::MaybeCreateJob takes NetworkDelegate as argument (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Latest merge Created 8 years, 4 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 | « net/url_request/url_request_http_job.cc ('k') | net/url_request/url_request_job_factory.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/url_request/url_request_job_factory.h
diff --git a/net/url_request/url_request_job_factory.h b/net/url_request/url_request_job_factory.h
index 746e9486894546b36f8d9fb20a5ffdaec8109bb7..5f4e1ae3f6727758c571a1d23fe5dbc74fc01a06 100644
--- a/net/url_request/url_request_job_factory.h
+++ b/net/url_request/url_request_job_factory.h
@@ -16,6 +16,7 @@ class GURL;
namespace net {
+class NetworkDelegate;
class URLRequest;
class URLRequestJob;
@@ -26,7 +27,8 @@ class NET_EXPORT URLRequestJobFactory
public:
virtual ~ProtocolHandler();
- virtual URLRequestJob* MaybeCreateJob(URLRequest* request) const = 0;
+ virtual URLRequestJob* MaybeCreateJob(
+ URLRequest* request, NetworkDelegate* network_delegate) const = 0;
};
class NET_EXPORT Interceptor {
@@ -36,7 +38,8 @@ class NET_EXPORT URLRequestJobFactory
// Called for every request made. Should return a new job to handle the
// request if it should be intercepted, or NULL to allow the request to
// be handled in the normal manner.
- virtual URLRequestJob* MaybeIntercept(URLRequest* request) const = 0;
+ virtual URLRequestJob* MaybeIntercept(
+ URLRequest* request, NetworkDelegate* network_delegate) const = 0;
// Called after having received a redirect response, but prior to the
// the request delegate being informed of the redirect. Can return a new
@@ -46,7 +49,8 @@ class NET_EXPORT URLRequestJobFactory
// response produced by the intercept job will be returned.
virtual URLRequestJob* MaybeInterceptRedirect(
const GURL& location,
- URLRequest* request) const = 0;
+ URLRequest* request,
+ NetworkDelegate* network_delegate) const = 0;
// Called after having received a final response, but prior to the
// the request delegate being informed of the response. This is also
@@ -57,7 +61,7 @@ class NET_EXPORT URLRequestJobFactory
// response, instead the response produced by the intercept job will be
// returned.
virtual URLRequestJob* MaybeInterceptResponse(
- URLRequest* request) const = 0;
+ URLRequest* request, NetworkDelegate* network_delegate) const = 0;
// Returns true if this interceptor handles requests for URLs with the
// given protocol. Returning false does not imply that this interceptor
@@ -78,15 +82,21 @@ class NET_EXPORT URLRequestJobFactory
// list.
void AddInterceptor(Interceptor* interceptor);
- URLRequestJob* MaybeCreateJobWithInterceptor(URLRequest* request) const;
+ URLRequestJob* MaybeCreateJobWithInterceptor(
+ URLRequest* request, NetworkDelegate* network_delegate) const;
- URLRequestJob* MaybeCreateJobWithProtocolHandler(const std::string& scheme,
- URLRequest* request) const;
+ URLRequestJob* MaybeCreateJobWithProtocolHandler(
+ const std::string& scheme,
+ URLRequest* request,
+ NetworkDelegate* network_delegate) const;
- URLRequestJob* MaybeInterceptRedirect(const GURL& location,
- URLRequest* request) const;
+ URLRequestJob* MaybeInterceptRedirect(
+ const GURL& location,
+ URLRequest* request,
+ NetworkDelegate* network_delegate) const;
- URLRequestJob* MaybeInterceptResponse(URLRequest* request) const;
+ URLRequestJob* MaybeInterceptResponse(
+ URLRequest* request, NetworkDelegate* network_delegate) const;
bool IsHandledProtocol(const std::string& scheme) const;
« no previous file with comments | « net/url_request/url_request_http_job.cc ('k') | net/url_request/url_request_job_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698