diff options
author | michaeln@google.com <michaeln@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-16 21:05:47 +0000 |
---|---|---|
committer | michaeln@google.com <michaeln@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-16 21:05:47 +0000 |
commit | a5c713fdc8d0bf21f65ebdae95827e423d14b07c (patch) | |
tree | 82e553e97f38aa159978805e415fa683189201e0 /net/url_request/url_request_job_manager.h | |
parent | 2cb1ecb7aa5b6bf5c17cfaa75293121c8bd73130 (diff) | |
download | chromium_src-a5c713fdc8d0bf21f65ebdae95827e423d14b07c.zip chromium_src-a5c713fdc8d0bf21f65ebdae95827e423d14b07c.tar.gz chromium_src-a5c713fdc8d0bf21f65ebdae95827e423d14b07c.tar.bz2 |
URLRequest::Interceptor enhancements1) Allow an interceptor to change its mind and not intercept after all. This allows the decision to start or not to start to be made asynchronously.2) Allow an interceptor to intercept on error conditions if the original job fails. This is to support the FALLBACK semantics in the appcache.Info about where this is going can be found in the appcache design doc at https://docs.google.com/a/google.com/Doc?docid=agv6ghfsqr_15f749cgt3&hl=enI still have to put together test cases, so I'm not ready to submit this yet, but wanted to get some feedback at this point.
Review URL: http://codereview.chromium.org/67019
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13877 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/url_request/url_request_job_manager.h')
-rw-r--r-- | net/url_request/url_request_job_manager.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/net/url_request/url_request_job_manager.h b/net/url_request/url_request_job_manager.h index 2dfbe13..9930e17 100644 --- a/net/url_request/url_request_job_manager.h +++ b/net/url_request/url_request_job_manager.h @@ -6,6 +6,7 @@ #define NET_URL_REQUEST_URL_REQUEST_JOB_MANAGER_H__ #include <map> +#include <vector> #include "base/lock.h" #include "base/platform_thread.h" @@ -31,6 +32,17 @@ class URLRequestJobManager { // returning a job unless we are--in the extreme case--out of memory. URLRequestJob* CreateJob(URLRequest* request) const; + // Allows interceptors to hijack the request after examining the new location + // of a redirect. Returns NULL if no interceptor intervenes. + URLRequestJob* MaybeInterceptRedirect(URLRequest* request, + const GURL& location) const; + + // Allows interceptors to hijack the request after examining the response + // status and headers. This is also called when there is no server response + // at all to allow interception of failed requests due to network errors. + // Returns NULL if no interceptor intervenes. + URLRequestJob* MaybeInterceptResponse(URLRequest* request) const; + // Returns true if there is a protocol factory registered for the given // scheme. Note: also returns true if there is a built-in handler for the // given scheme. |