Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 CONTENT_BROWSER_FRAME_HOST_NAVIGATION_ENTRY_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_FRAME_HOST_NAVIGATION_ENTRY_IMPL_H_ |
| 6 #define CONTENT_BROWSER_FRAME_HOST_NAVIGATION_ENTRY_IMPL_H_ | 6 #define CONTENT_BROWSER_FRAME_HOST_NAVIGATION_ENTRY_IMPL_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
| 10 #include "content/browser/site_instance_impl.h" | 10 #include "content/browser/site_instance_impl.h" |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 82 virtual void SetExtraData(const std::string& key, | 82 virtual void SetExtraData(const std::string& key, |
| 83 const base::string16& data) OVERRIDE; | 83 const base::string16& data) OVERRIDE; |
| 84 virtual bool GetExtraData(const std::string& key, | 84 virtual bool GetExtraData(const std::string& key, |
| 85 base::string16* data) const OVERRIDE; | 85 base::string16* data) const OVERRIDE; |
| 86 virtual void ClearExtraData(const std::string& key) OVERRIDE; | 86 virtual void ClearExtraData(const std::string& key) OVERRIDE; |
| 87 virtual void SetHttpStatusCode(int http_status_code) OVERRIDE; | 87 virtual void SetHttpStatusCode(int http_status_code) OVERRIDE; |
| 88 virtual int GetHttpStatusCode() const OVERRIDE; | 88 virtual int GetHttpStatusCode() const OVERRIDE; |
| 89 virtual void SetRedirectChain(const std::vector<GURL>& redirects) OVERRIDE; | 89 virtual void SetRedirectChain(const std::vector<GURL>& redirects) OVERRIDE; |
| 90 virtual const std::vector<GURL>& GetRedirectChain() const OVERRIDE; | 90 virtual const std::vector<GURL>& GetRedirectChain() const OVERRIDE; |
| 91 virtual bool IsRestored() const OVERRIDE; | 91 virtual bool IsRestored() const OVERRIDE; |
| 92 virtual bool GetXssDetected() const OVERRIDE; | |
| 92 | 93 |
| 93 // Once a navigation entry is committed, we should no longer track several | 94 // Once a navigation entry is committed, we should no longer track several |
| 94 // pieces of non-persisted state, as documented on the members below. | 95 // pieces of non-persisted state, as documented on the members below. |
| 95 void ResetForCommit(); | 96 void ResetForCommit(); |
| 96 | 97 |
| 97 void set_unique_id(int unique_id) { | 98 void set_unique_id(int unique_id) { |
| 98 unique_id_ = unique_id; | 99 unique_id_ = unique_id; |
| 99 } | 100 } |
| 100 | 101 |
| 101 // The SiteInstance tells us how to share sub-processes. This is a reference | 102 // The SiteInstance tells us how to share sub-processes. This is a reference |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 211 | 212 |
| 212 // Indicates which FrameTreeNode to navigate. Currently only used if the | 213 // Indicates which FrameTreeNode to navigate. Currently only used if the |
| 213 // --site-per-process flag is passed. | 214 // --site-per-process flag is passed. |
| 214 int64 frame_tree_node_id() const { | 215 int64 frame_tree_node_id() const { |
| 215 return frame_tree_node_id_; | 216 return frame_tree_node_id_; |
| 216 } | 217 } |
| 217 void set_frame_tree_node_id(int64 frame_tree_node_id) { | 218 void set_frame_tree_node_id(int64 frame_tree_node_id) { |
| 218 frame_tree_node_id_ = frame_tree_node_id; | 219 frame_tree_node_id_ = frame_tree_node_id; |
| 219 } | 220 } |
| 220 | 221 |
| 222 // Called when an XSS detected by Blink's XSSAuditor caused the page to | |
| 223 // be blocked. | |
| 224 void set_xss_detected(bool xss_detected) { | |
| 225 xss_detected_ = xss_detected; | |
| 226 } | |
| 227 | |
| 221 private: | 228 private: |
| 222 // WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING | 229 // WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING |
| 223 // Session/Tab restore save portions of this class so that it can be recreated | 230 // Session/Tab restore save portions of this class so that it can be recreated |
| 224 // later. If you add a new field that needs to be persisted you'll have to | 231 // later. If you add a new field that needs to be persisted you'll have to |
| 225 // update SessionService/TabRestoreService and Android WebView | 232 // update SessionService/TabRestoreService and Android WebView |
| 226 // state_serializer.cc appropriately. | 233 // state_serializer.cc appropriately. |
| 227 // WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING | 234 // WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING |
| 228 | 235 |
| 229 // See the accessors above for descriptions. | 236 // See the accessors above for descriptions. |
| 230 int unique_id_; | 237 int unique_id_; |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 315 // history both on the renderer and browser side. The browser side history | 322 // history both on the renderer and browser side. The browser side history |
| 316 // won't be cleared until the renderer has committed this navigation. This | 323 // won't be cleared until the renderer has committed this navigation. This |
| 317 // entry is not persisted by the session restore system, as it is always | 324 // entry is not persisted by the session restore system, as it is always |
| 318 // cleared in |ResetForCommit|. | 325 // cleared in |ResetForCommit|. |
| 319 bool should_clear_history_list_; | 326 bool should_clear_history_list_; |
| 320 | 327 |
| 321 // Set when this entry should be able to access local file:// resources. This | 328 // Set when this entry should be able to access local file:// resources. This |
| 322 // value is not needed after the entry commits and is not persisted. | 329 // value is not needed after the entry commits and is not persisted. |
| 323 bool can_load_local_resources_; | 330 bool can_load_local_resources_; |
| 324 | 331 |
| 332 // Set when this entry was blocked by Blink's XSSAuditor. | |
| 333 bool xss_detected_; | |
|
nasko
2014/06/18 21:54:48
Is this supposed to be serialized for session rest
Tom Sepez
2014/06/18 22:13:22
Probably. Got a pointer to what should be done?
nasko
2014/06/18 22:17:24
Look up in this file for a line with lots of WARNI
| |
| 334 | |
| 325 // If not empty, the name of the frame to navigate. This field is not | 335 // If not empty, the name of the frame to navigate. This field is not |
| 326 // persisted, because it is currently only used in tests. | 336 // persisted, because it is currently only used in tests. |
| 327 std::string frame_to_navigate_; | 337 std::string frame_to_navigate_; |
| 328 | 338 |
| 329 // If not -1, this indicates which FrameTreeNode to navigate. This field is | 339 // If not -1, this indicates which FrameTreeNode to navigate. This field is |
| 330 // not persisted because it is experimental and only used when the | 340 // not persisted because it is experimental and only used when the |
| 331 // --site-per-process flag is passed. It is cleared in |ResetForCommit| | 341 // --site-per-process flag is passed. It is cleared in |ResetForCommit| |
| 332 // because we only use it while the navigation is pending. | 342 // because we only use it while the navigation is pending. |
| 333 // TODO(creis): Move this to FrameNavigationEntry. | 343 // TODO(creis): Move this to FrameNavigationEntry. |
| 334 int64 frame_tree_node_id_; | 344 int64 frame_tree_node_id_; |
| 335 | 345 |
| 336 // Used to store extra data to support browser features. This member is not | 346 // Used to store extra data to support browser features. This member is not |
| 337 // persisted, unless specific data is taken out/put back in at save/restore | 347 // persisted, unless specific data is taken out/put back in at save/restore |
| 338 // time (see TabNavigation for an example of this). | 348 // time (see TabNavigation for an example of this). |
| 339 std::map<std::string, base::string16> extra_data_; | 349 std::map<std::string, base::string16> extra_data_; |
| 340 | 350 |
| 341 // Copy and assignment is explicitly allowed for this class. | 351 // Copy and assignment is explicitly allowed for this class. |
| 342 }; | 352 }; |
| 343 | 353 |
| 344 } // namespace content | 354 } // namespace content |
| 345 | 355 |
| 346 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATION_ENTRY_IMPL_H_ | 356 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATION_ENTRY_IMPL_H_ |
| OLD | NEW |