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

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

Issue 25772002: Allows prefetch requests to live beyond the renderer by delaying (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 7 years, 2 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
« no previous file with comments | « content/browser/loader/resource_loader.cc ('k') | content/browser/loader/resource_request_info_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 6947315aa4c436bd5229336d669cef4b125e25e7..1ab85e3afbd65e8483306712829fa72dc9034a7b 100644
--- a/content/browser/loader/resource_request_info_impl.h
+++ b/content/browser/loader/resource_request_info_impl.h
@@ -8,6 +8,7 @@
#include <string>
#include "base/basictypes.h"
+#include "base/gtest_prod_util.h"
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
#include "base/memory/weak_ptr.h"
@@ -51,6 +52,7 @@ class ResourceRequestInfoImpl : public ResourceRequestInfo,
PageTransition transition_type,
bool is_download,
bool is_stream,
+ bool is_detachable,
bool allow_download,
bool has_user_gesture,
WebKit::WebReferrerPolicy referrer_policy,
@@ -123,6 +125,17 @@ class ResourceRequestInfoImpl : public ResourceRequestInfo,
bool is_stream() const { return is_stream_; }
void set_is_stream(bool stream) { is_stream_ = stream; }
+ // Whether this is a detachable resource. Detachable resource requests can
+ // live beyond the life of the renderer.
+ bool is_detachable() const { return is_detachable_; }
+ void set_is_detachable(bool is_detachable) { is_detachable_ = is_detachable; }
+
+ // Detached resources are detachable resources that have ignored a request by
+ // the renderer to cancel and will continue to fetch but stops sending
+ // messages to the renderer. Detached resources eventually timeout.
+ bool is_detached() const { return is_detached_; }
+ void set_detached() { is_detached_ = true; }
+
void set_was_ignored_by_handler(bool value) {
was_ignored_by_handler_ = value;
}
@@ -133,6 +146,10 @@ class ResourceRequestInfoImpl : public ResourceRequestInfo,
void set_memory_cost(int cost) { memory_cost_ = cost; }
private:
+ FRIEND_TEST_ALL_PREFIXES(ResourceDispatcherHostTest,
+ DeletedFilterDetachable);
+ FRIEND_TEST_ALL_PREFIXES(ResourceDispatcherHostTest,
+ DeletedFilterDetachableRedirect);
// Non-owning, may be NULL.
CrossSiteResourceHandler* cross_site_handler_;
@@ -147,6 +164,8 @@ class ResourceRequestInfoImpl : public ResourceRequestInfo,
int64 parent_frame_id_;
bool is_download_;
bool is_stream_;
+ bool is_detachable_;
+ bool is_detached_;
bool allow_download_;
bool has_user_gesture_;
bool was_ignored_by_handler_;
« no previous file with comments | « content/browser/loader/resource_loader.cc ('k') | content/browser/loader/resource_request_info_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698