| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_RENDERER_NAVIGATION_STATE_H_ | 5 #ifndef CHROME_RENDERER_NAVIGATION_STATE_H_ |
| 6 #define CHROME_RENDERER_NAVIGATION_STATE_H_ | 6 #define CHROME_RENDERER_NAVIGATION_STATE_H_ |
| 7 | 7 |
| 8 #include "base/scoped_ptr.h" | 8 #include "base/scoped_ptr.h" |
| 9 #include "base/time.h" | 9 #include "base/time.h" |
| 10 #include "chrome/common/page_transition_types.h" | 10 #include "chrome/common/page_transition_types.h" |
| (...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 204 cache_policy_override_ = WebKit::WebURLRequest::UseProtocolCachePolicy; | 204 cache_policy_override_ = WebKit::WebURLRequest::UseProtocolCachePolicy; |
| 205 } | 205 } |
| 206 bool is_cache_policy_override_set() const { | 206 bool is_cache_policy_override_set() const { |
| 207 return cache_policy_override_set_; | 207 return cache_policy_override_set_; |
| 208 } | 208 } |
| 209 | 209 |
| 210 // Indicator if SPDY was used as part of this page load. | 210 // Indicator if SPDY was used as part of this page load. |
| 211 void set_was_fetched_via_spdy(bool value) { was_fetched_via_spdy_ = value; } | 211 void set_was_fetched_via_spdy(bool value) { was_fetched_via_spdy_ = value; } |
| 212 bool was_fetched_via_spdy() const { return was_fetched_via_spdy_; } | 212 bool was_fetched_via_spdy() const { return was_fetched_via_spdy_; } |
| 213 | 213 |
| 214 // Whether the frame text contents was translated to a different language. |
| 215 void set_was_translated(bool value) { was_translated_ = value; } |
| 216 bool was_translated() const { return was_translated_; } |
| 217 |
| 214 private: | 218 private: |
| 215 NavigationState(PageTransition::Type transition_type, | 219 NavigationState(PageTransition::Type transition_type, |
| 216 const base::Time& request_time, | 220 const base::Time& request_time, |
| 217 bool is_content_initiated, | 221 bool is_content_initiated, |
| 218 int32 pending_page_id) | 222 int32 pending_page_id) |
| 219 : transition_type_(transition_type), | 223 : transition_type_(transition_type), |
| 220 load_type_(UNDEFINED_LOAD), | 224 load_type_(UNDEFINED_LOAD), |
| 221 request_time_(request_time), | 225 request_time_(request_time), |
| 222 load_histograms_recorded_(false), | 226 load_histograms_recorded_(false), |
| 223 request_committed_(false), | 227 request_committed_(false), |
| 224 is_content_initiated_(is_content_initiated), | 228 is_content_initiated_(is_content_initiated), |
| 225 pending_page_id_(pending_page_id), | 229 pending_page_id_(pending_page_id), |
| 226 postpone_loading_data_(false), | 230 postpone_loading_data_(false), |
| 227 cache_policy_override_set_(false), | 231 cache_policy_override_set_(false), |
| 228 cache_policy_override_(WebKit::WebURLRequest::UseProtocolCachePolicy), | 232 cache_policy_override_(WebKit::WebURLRequest::UseProtocolCachePolicy), |
| 229 user_script_idle_scheduler_(NULL), | 233 user_script_idle_scheduler_(NULL), |
| 230 was_fetched_via_spdy_(false) { | 234 was_fetched_via_spdy_(false), |
| 235 was_translated_(false) { |
| 231 } | 236 } |
| 232 | 237 |
| 233 PageTransition::Type transition_type_; | 238 PageTransition::Type transition_type_; |
| 234 LoadType load_type_; | 239 LoadType load_type_; |
| 235 base::Time request_time_; | 240 base::Time request_time_; |
| 236 base::Time start_load_time_; | 241 base::Time start_load_time_; |
| 237 base::Time commit_load_time_; | 242 base::Time commit_load_time_; |
| 238 base::Time finish_document_load_time_; | 243 base::Time finish_document_load_time_; |
| 239 base::Time finish_load_time_; | 244 base::Time finish_load_time_; |
| 240 base::Time first_paint_time_; | 245 base::Time first_paint_time_; |
| (...skipping 10 matching lines...) Expand all Loading... |
| 251 bool postpone_loading_data_; | 256 bool postpone_loading_data_; |
| 252 std::string postponed_data_; | 257 std::string postponed_data_; |
| 253 | 258 |
| 254 bool cache_policy_override_set_; | 259 bool cache_policy_override_set_; |
| 255 WebKit::WebURLRequest::CachePolicy cache_policy_override_; | 260 WebKit::WebURLRequest::CachePolicy cache_policy_override_; |
| 256 | 261 |
| 257 scoped_ptr<UserScriptIdleScheduler> user_script_idle_scheduler_; | 262 scoped_ptr<UserScriptIdleScheduler> user_script_idle_scheduler_; |
| 258 | 263 |
| 259 bool was_fetched_via_spdy_; | 264 bool was_fetched_via_spdy_; |
| 260 | 265 |
| 266 bool was_translated_; |
| 267 |
| 261 DISALLOW_COPY_AND_ASSIGN(NavigationState); | 268 DISALLOW_COPY_AND_ASSIGN(NavigationState); |
| 262 }; | 269 }; |
| 263 | 270 |
| 264 #endif // CHROME_RENDERER_NAVIGATION_STATE_H_ | 271 #endif // CHROME_RENDERER_NAVIGATION_STATE_H_ |
| OLD | NEW |