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

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: NetworkDelegate fixed almost everywhere 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
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..4d0f2efc4ffedd6ff6296db582e3d47bc5b34968 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
@@ -78,10 +81,13 @@ 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;

Powered by Google App Engine
This is Rietveld 408576698