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

Unified Diff: content/browser/loader/url_loader_request_handler.h

Issue 2982363002: Add support for fallback content for the frame. This includes main and subframes. (Closed)
Patch Set: More cleanup Created 3 years, 5 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: 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);
+
+ // 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

Powered by Google App Engine
This is Rietveld 408576698