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

Unified Diff: net/url_request/url_request_job_factory.h

Issue 12217095: Remove unused pieces of URLRequestJobFactory API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 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 adff7f1d818ef46c679d2b93d53aa6dbe503feeb..bbd1d09f09ccf1bfbfafb4a633645a4ec45c3232 100644
--- a/net/url_request/url_request_job_factory.h
+++ b/net/url_request/url_request_job_factory.h
@@ -32,78 +32,14 @@ class NET_EXPORT URLRequestJobFactory
URLRequest* request, NetworkDelegate* network_delegate) const = 0;
};
- // TODO(shalev): Move this to URLRequestJobFactoryImpl.
- class NET_EXPORT Interceptor {
- public:
- virtual ~Interceptor();
-
- // 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, 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
- // job to replace the existing job if it should be intercepted, or NULL
- // to allow the normal handling to continue. If a new job is provided,
- // the delegate never sees the original redirect response, instead the
- // response produced by the intercept job will be returned.
- virtual URLRequestJob* MaybeInterceptRedirect(
- const GURL& location,
- 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
- // called when there is no server response at all to allow interception
- // on DNS or network errors. Can return a new job to replace the existing
- // job if it should be intercepted, or NULL to allow the normal handling to
- // continue. If a new job is provided, the delegate never sees the original
- // response, instead the response produced by the intercept job will be
- // returned.
- virtual URLRequestJob* MaybeInterceptResponse(
- 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
- // can't or won't handle requests with the given protocol.
- virtual bool WillHandleProtocol(const std::string& protocol) const;
- };
-
URLRequestJobFactory();
virtual ~URLRequestJobFactory();
- // TODO(shalev): Remove this from the interface.
- // Sets the ProtocolHandler for a scheme. Returns true on success, false on
- // failure (a ProtocolHandler already exists for |scheme|). On success,
- // URLRequestJobFactory takes ownership of |protocol_handler|.
- virtual bool SetProtocolHandler(const std::string& scheme,
- ProtocolHandler* protocol_handler) = 0;
-
- // TODO(shalev): Remove this from the interface.
- // Takes ownership of |interceptor|. Adds it to the end of the Interceptor
- // list.
- virtual void AddInterceptor(Interceptor* interceptor) = 0;
-
- // TODO(shalev): Consolidate MaybeCreateJobWithInterceptor and
- // MaybeCreateJobWithProtocolHandler into a single method.
- virtual URLRequestJob* MaybeCreateJobWithInterceptor(
- URLRequest* request, NetworkDelegate* network_delegate) const = 0;
-
virtual URLRequestJob* MaybeCreateJobWithProtocolHandler(
const std::string& scheme,
URLRequest* request,
NetworkDelegate* network_delegate) const = 0;
- virtual URLRequestJob* MaybeInterceptRedirect(
- const GURL& location,
- URLRequest* request,
- NetworkDelegate* network_delegate) const = 0;
-
- virtual URLRequestJob* MaybeInterceptResponse(
- URLRequest* request, NetworkDelegate* network_delegate) const = 0;
-
virtual bool IsHandledProtocol(const std::string& scheme) const = 0;
virtual bool IsHandledURL(const GURL& url) const = 0;

Powered by Google App Engine
This is Rietveld 408576698