Chromium Code Reviews| Index: content/browser/loader/url_loader_request_handler.h |
| diff --git a/content/browser/loader/url_loader_request_handler.h b/content/browser/loader/url_loader_request_handler.h |
| index fb0a1f4b2f31e521926888dc0f9ac9090e4e72a9..2bc22cac7ea67c0e484d5bb337516978acc3e748 100644 |
| --- a/content/browser/loader/url_loader_request_handler.h |
| +++ b/content/browser/loader/url_loader_request_handler.h |
| @@ -10,6 +10,7 @@ |
| #include "base/macros.h" |
| #include "content/public/common/url_loader.mojom.h" |
| #include "content/public/common/url_loader_factory.mojom.h" |
| +#include "net/url_request/redirect_info.h" |
| namespace content { |
| @@ -39,6 +40,26 @@ class CONTENT_EXPORT URLLoaderRequestHandler { |
| // going forward. Subclasses who want to handle subresource requests etc may |
| // want to override this to return a custom factory. |
| virtual mojom::URLLoaderFactoryPtr MaybeCreateSubresourceFactory(); |
| + |
| + // Returns true if the handler delivers fallback content for the |response| |
| + // passed. The |client| parameter points to the URLLoaderClient instance |
| + // which is used for passing the fallback content and other information to |
| + // the client. The |request| parameter points to the bound url request. |
| + virtual bool MaybeGetFallbackForResponse(const ResourceResponseHead& response, |
| + mojom::URLLoaderClientPtr* client, |
| + mojom::URLLoaderRequest* request); |
|
kinuko
2017/07/26 01:59:14
(If we end up having this kind of hooks)
Could we
michaeln
2017/07/26 23:08:41
I don't know how much it helps, but we could expos
ananta
2017/07/27 02:40:25
Removed the functions added to the URLLoaderReques
ananta
2017/07/27 02:40:25
We decided to go with the additional callback func
kinuko
2017/07/27 13:46:26
Hm... sorry to say this, but I think I might have
jam
2017/07/27 23:19:13
If we don't want the appcache handler to make the
|
| + |
| + // Returns true if the handler delivers fallback content for the redirect |
| + // |response| passed in. The |redirect_info| parameter contains the new |
| + // location, etc. The |client| parameter points to the URLLoaderClient |
| + // instance which is used for passing the fallback content and other |
| + // information to the client. The |request| parameter points to the |
| + // bound url request. |
| + virtual bool MaybeGetFallbackForRedirect( |
| + const ResourceResponseHead& response, |
| + const net::RedirectInfo& redirect_info, |
| + mojom::URLLoaderClientPtr* client, |
| + mojom::URLLoaderRequest* request); |
| }; |
| } // namespace content |