| 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 <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 136 base::Time GetTimestamp() const override; | 136 base::Time GetTimestamp() const override; |
| 137 void SetCanLoadLocalResources(bool allow) override; | 137 void SetCanLoadLocalResources(bool allow) override; |
| 138 bool GetCanLoadLocalResources() const override; | 138 bool GetCanLoadLocalResources() const override; |
| 139 void SetExtraData(const std::string& key, | 139 void SetExtraData(const std::string& key, |
| 140 const base::string16& data) override; | 140 const base::string16& data) override; |
| 141 bool GetExtraData(const std::string& key, | 141 bool GetExtraData(const std::string& key, |
| 142 base::string16* data) const override; | 142 base::string16* data) const override; |
| 143 void ClearExtraData(const std::string& key) override; | 143 void ClearExtraData(const std::string& key) override; |
| 144 void SetHttpStatusCode(int http_status_code) override; | 144 void SetHttpStatusCode(int http_status_code) override; |
| 145 int GetHttpStatusCode() const override; | 145 int GetHttpStatusCode() const override; |
| 146 void SetRedirectChain(const std::vector<GURL>& redirects) override; | 146 void SetMainFrameRedirectChain(const std::vector<GURL>& redirects) override; |
| 147 const std::vector<GURL>& GetRedirectChain() const override; | 147 const std::vector<GURL>& GetMainFrameRedirectChain() const override; |
| 148 bool IsRestored() const override; | 148 bool IsRestored() const override; |
| 149 | 149 |
| 150 // Creates a copy of this NavigationEntryImpl that can be modified | 150 // Creates a copy of this NavigationEntryImpl that can be modified |
| 151 // independently from the original. Does not copy any value that would be | 151 // independently from the original. Does not copy any value that would be |
| 152 // cleared in ResetForCommit. Unlike |CloneAndReplace|, this does not check | 152 // cleared in ResetForCommit. Unlike |CloneAndReplace|, this does not check |
| 153 // whether the subframe history items are for frames that are still in the | 153 // whether the subframe history items are for frames that are still in the |
| 154 // current page. | 154 // current page. |
| 155 std::unique_ptr<NavigationEntryImpl> Clone() const; | 155 std::unique_ptr<NavigationEntryImpl> Clone() const; |
| 156 | 156 |
| 157 // Like |Clone|, but replaces the FrameNavigationEntry corresponding to | 157 // Like |Clone|, but replaces the FrameNavigationEntry corresponding to |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 212 // exists, or else the existing one (which might be shared with other | 212 // exists, or else the existing one (which might be shared with other |
| 213 // NavigationEntries) is updated with the given parameters. | 213 // NavigationEntries) is updated with the given parameters. |
| 214 // Does nothing if there is no entry already and |url| is about:blank, since | 214 // Does nothing if there is no entry already and |url| is about:blank, since |
| 215 // that does not count as a real commit. | 215 // that does not count as a real commit. |
| 216 void AddOrUpdateFrameEntry( | 216 void AddOrUpdateFrameEntry( |
| 217 FrameTreeNode* frame_tree_node, | 217 FrameTreeNode* frame_tree_node, |
| 218 int64_t item_sequence_number, | 218 int64_t item_sequence_number, |
| 219 int64_t document_sequence_number, | 219 int64_t document_sequence_number, |
| 220 SiteInstanceImpl* site_instance, | 220 SiteInstanceImpl* site_instance, |
| 221 scoped_refptr<SiteInstanceImpl> source_site_instance, | 221 scoped_refptr<SiteInstanceImpl> source_site_instance, |
| 222 const std::vector<GURL>& redirect_chain, |
| 222 const GURL& url, | 223 const GURL& url, |
| 223 const Referrer& referrer, | 224 const Referrer& referrer, |
| 224 const PageState& page_state, | 225 const PageState& page_state, |
| 225 const std::string& method, | 226 const std::string& method, |
| 226 int64_t post_id); | 227 int64_t post_id); |
| 227 | 228 |
| 228 // Returns the FrameNavigationEntry corresponding to |frame_tree_node|, if | 229 // Returns the FrameNavigationEntry corresponding to |frame_tree_node|, if |
| 229 // there is one in this NavigationEntry. | 230 // there is one in this NavigationEntry. |
| 230 FrameNavigationEntry* GetFrameEntry(FrameTreeNode* frame_tree_node) const; | 231 FrameNavigationEntry* GetFrameEntry(FrameTreeNode* frame_tree_node) const; |
| 231 | 232 |
| (...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 476 // the state of the URL, it has to be reloaded in a different site instance. | 477 // the state of the URL, it has to be reloaded in a different site instance. |
| 477 // In such case, we must treat it as an existing navigation in the new site | 478 // In such case, we must treat it as an existing navigation in the new site |
| 478 // instance, instead of a new navigation. This value should not be persisted | 479 // instance, instead of a new navigation. This value should not be persisted |
| 479 // and is cleared in |ResetForCommit|. | 480 // and is cleared in |ResetForCommit|. |
| 480 // | 481 // |
| 481 // We also use this flag for cross-process redirect navigations, so that the | 482 // We also use this flag for cross-process redirect navigations, so that the |
| 482 // browser will replace the current navigation entry (which is the page | 483 // browser will replace the current navigation entry (which is the page |
| 483 // doing the redirect). | 484 // doing the redirect). |
| 484 bool should_replace_entry_; | 485 bool should_replace_entry_; |
| 485 | 486 |
| 486 // This is used when transferring a pending entry from one process to another. | |
| 487 // We also send this data through session sync for offline analysis. | |
| 488 // It is preserved after commit but should not be persisted. | |
| 489 std::vector<GURL> redirect_chain_; | |
| 490 | |
| 491 // This is set to true when this entry's navigation should clear the session | 487 // This is set to true when this entry's navigation should clear the session |
| 492 // history both on the renderer and browser side. The browser side history | 488 // history both on the renderer and browser side. The browser side history |
| 493 // won't be cleared until the renderer has committed this navigation. This | 489 // won't be cleared until the renderer has committed this navigation. This |
| 494 // entry is not persisted by the session restore system, as it is always | 490 // entry is not persisted by the session restore system, as it is always |
| 495 // cleared in |ResetForCommit|. | 491 // cleared in |ResetForCommit|. |
| 496 bool should_clear_history_list_; | 492 bool should_clear_history_list_; |
| 497 | 493 |
| 498 // Set when this entry should be able to access local file:// resources. This | 494 // Set when this entry should be able to access local file:// resources. This |
| 499 // value is not needed after the entry commits and is not persisted. | 495 // value is not needed after the entry commits and is not persisted. |
| 500 bool can_load_local_resources_; | 496 bool can_load_local_resources_; |
| (...skipping 18 matching lines...) Expand all Loading... |
| 519 // persisted, unless specific data is taken out/put back in at save/restore | 515 // persisted, unless specific data is taken out/put back in at save/restore |
| 520 // time (see TabNavigation for an example of this). | 516 // time (see TabNavigation for an example of this). |
| 521 std::map<std::string, base::string16> extra_data_; | 517 std::map<std::string, base::string16> extra_data_; |
| 522 | 518 |
| 523 DISALLOW_COPY_AND_ASSIGN(NavigationEntryImpl); | 519 DISALLOW_COPY_AND_ASSIGN(NavigationEntryImpl); |
| 524 }; | 520 }; |
| 525 | 521 |
| 526 } // namespace content | 522 } // namespace content |
| 527 | 523 |
| 528 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATION_ENTRY_IMPL_H_ | 524 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATION_ENTRY_IMPL_H_ |
| OLD | NEW |