| 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);
|
| };
|
|
|