Index: content/browser/loader/resource_request_info_impl.h |
diff --git a/content/browser/loader/resource_request_info_impl.h b/content/browser/loader/resource_request_info_impl.h |
index afc30fff60f001720b3c58b476df6da8f2a84726..1f7bd1e50592415b69d3bd6abe67b3404693d13d 100644 |
--- a/content/browser/loader/resource_request_info_impl.h |
+++ b/content/browser/loader/resource_request_info_impl.h |
@@ -18,6 +18,8 @@ |
#include "content/public/common/resource_type.h" |
#include "net/base/load_states.h" |
+struct ResourceHostMsg_Request; |
+ |
namespace content { |
class CrossSiteResourceHandler; |
class DetachableResourceHandler; |
@@ -39,6 +41,9 @@ class ResourceRequestInfoImpl : public ResourceRequestInfo, |
CONTENT_EXPORT static const ResourceRequestInfoImpl* ForRequest( |
const net::URLRequest* request); |
+ // TODO(ricea): Something about this constructor. |
+ // |original_request| is owned by the caller. If non-NULL, it is copied by |
+ // the constructor. |
CONTENT_EXPORT ResourceRequestInfoImpl( |
int process_type, |
int child_id, |
@@ -64,7 +69,9 @@ class ResourceRequestInfoImpl : public ResourceRequestInfo, |
blink::WebPageVisibilityState visibility_state, |
ResourceContext* context, |
base::WeakPtr<ResourceMessageFilter> filter, |
- bool is_async); |
+ bool is_async, |
+ bool is_async_revalidation, |
+ const ResourceHostMsg_Request* original_request); |
~ResourceRequestInfoImpl() override; |
// ResourceRequestInfo implementation: |
@@ -88,6 +95,7 @@ class ResourceRequestInfoImpl : public ResourceRequestInfo, |
int* render_frame_id) const override; |
bool IsAsync() const override; |
bool IsDownload() const override; |
+ bool IsAsyncRevalidation() const override; |
CONTENT_EXPORT void AssociateWithRequest(net::URLRequest* request); |
@@ -178,6 +186,9 @@ class ResourceRequestInfoImpl : public ResourceRequestInfo, |
void set_do_not_prompt_for_login(bool do_not_prompt) { |
do_not_prompt_for_login_ = do_not_prompt; |
} |
+ ResourceHostMsg_Request* original_request() { |
+ return original_request_.get(); |
+ } |
private: |
FRIEND_TEST_ALL_PREFIXES(ResourceDispatcherHostTest, |
@@ -217,7 +228,15 @@ class ResourceRequestInfoImpl : public ResourceRequestInfo, |
// The filter might be deleted without deleting this object if the process |
// exits during a transfer. |
base::WeakPtr<ResourceMessageFilter> filter_; |
+ |
+ // Original request information required to clone the request if an async |
+ // revalidation will be performed. NULL if async revalidation is not |
+ // applicable to this request (eg. it is already an async revalidation, is not |
+ // method "GET", etc.). |
+ scoped_ptr<ResourceHostMsg_Request> original_request_; |
+ |
bool is_async_; |
+ bool is_async_revalidation_; |
DISALLOW_COPY_AND_ASSIGN(ResourceRequestInfoImpl); |
}; |