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

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: rebase to tip 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..b73661873e321446f891b6ace0463223840a2350 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,17 @@ 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 creates a loader for the |response| passed.
+ // An example of where this is used is AppCache, where the handler returns
+ // fallback content for the response passed in.
+ // The URLLoader interface pointer is returned in the |loader| parameter.
+ // The interface request for the URLLoaderClient is returned in the
+ // |client_request| parameter.
+ virtual bool MaybeCreateLoaderForResponse(
+ const ResourceResponseHead& response,
+ mojom::URLLoaderPtr* loader,
+ mojom::URLLoaderClientRequest* client_request);
};
} // namespace content
« no previous file with comments | « content/browser/loader/navigation_url_loader_network_service.cc ('k') | content/browser/loader/url_loader_request_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698