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

Unified Diff: chrome/renderer/navigation_state.h

Issue 341043: Changes session restore to use a normal load rather than preferring... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 1 month 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 | « chrome/common/render_messages.h ('k') | chrome/renderer/render_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/navigation_state.h
===================================================================
--- chrome/renderer/navigation_state.h (revision 30525)
+++ chrome/renderer/navigation_state.h (working copy)
@@ -9,6 +9,7 @@
#include "base/time.h"
#include "chrome/common/page_transition_types.h"
#include "webkit/api/public/WebDataSource.h"
+#include "webkit/api/public/WebURLRequest.h"
#include "webkit/glue/alt_error_page_resource_fetcher.h"
#include "webkit/glue/password_form.h"
@@ -162,6 +163,25 @@
return postponed_data_;
}
+ // Sets the cache policy. The cache policy is only used if explicitly set and
+ // by default is not set. You can mark a NavigationState as not having a cache
+ // state by way of clear_cache_policy_override.
+ void set_cache_policy_override(
+ WebKit::WebURLRequest::CachePolicy cache_policy) {
+ cache_policy_override_ = cache_policy;
+ cache_policy_override_set_ = true;
+ }
+ WebKit::WebURLRequest::CachePolicy cache_policy_override() const {
+ return cache_policy_override_;
+ }
+ void clear_cache_policy_override() {
+ cache_policy_override_set_ = false;
+ cache_policy_override_ = WebKit::WebURLRequest::UseProtocolCachePolicy;
+ }
+ bool is_cache_policy_override_set() const {
+ return cache_policy_override_set_;
+ }
+
private:
NavigationState(PageTransition::Type transition_type,
const base::Time& request_time,
@@ -173,7 +193,9 @@
request_committed_(false),
is_content_initiated_(is_content_initiated),
pending_page_id_(pending_page_id),
- postpone_loading_data_(false) {
+ postpone_loading_data_(false),
+ cache_policy_override_set_(false),
+ cache_policy_override_(WebKit::WebURLRequest::UseProtocolCachePolicy) {
}
PageTransition::Type transition_type_;
@@ -195,6 +217,8 @@
std::string security_info_;
bool postpone_loading_data_;
std::string postponed_data_;
+ bool cache_policy_override_set_;
+ WebKit::WebURLRequest::CachePolicy cache_policy_override_;
DISALLOW_COPY_AND_ASSIGN(NavigationState);
};
« no previous file with comments | « chrome/common/render_messages.h ('k') | chrome/renderer/render_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698