| 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 COMPONENTS_SESSIONS_SERIALIZED_NAVIGATION_ENTRY_H_ | 5 #ifndef COMPONENTS_SESSIONS_SERIALIZED_NAVIGATION_ENTRY_H_ |
| 6 #define COMPONENTS_SESSIONS_SERIALIZED_NAVIGATION_ENTRY_H_ | 6 #define COMPONENTS_SESSIONS_SERIALIZED_NAVIGATION_ENTRY_H_ |
| 7 | 7 |
| 8 #include <set> | 8 #include <set> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 115 void set_blocked_state(BlockedState blocked_state) { | 115 void set_blocked_state(BlockedState blocked_state) { |
| 116 blocked_state_ = blocked_state; | 116 blocked_state_ = blocked_state; |
| 117 } | 117 } |
| 118 std::set<std::string> content_pack_categories() { | 118 std::set<std::string> content_pack_categories() { |
| 119 return content_pack_categories_; | 119 return content_pack_categories_; |
| 120 } | 120 } |
| 121 void set_content_pack_categories( | 121 void set_content_pack_categories( |
| 122 const std::set<std::string>& content_pack_categories) { | 122 const std::set<std::string>& content_pack_categories) { |
| 123 content_pack_categories_ = content_pack_categories; | 123 content_pack_categories_ = content_pack_categories; |
| 124 } | 124 } |
| 125 std::vector<GURL> redirect_chain() const { return redirect_chain_; } |
| 125 | 126 |
| 126 // Converts a set of SerializedNavigationEntrys into a list of | 127 // Converts a set of SerializedNavigationEntrys into a list of |
| 127 // NavigationEntrys with sequential page IDs and the given context. The caller | 128 // NavigationEntrys with sequential page IDs and the given context. The caller |
| 128 // owns the returned NavigationEntrys. | 129 // owns the returned NavigationEntrys. |
| 129 static std::vector<content::NavigationEntry*> ToNavigationEntries( | 130 static std::vector<content::NavigationEntry*> ToNavigationEntries( |
| 130 const std::vector<SerializedNavigationEntry>& navigations, | 131 const std::vector<SerializedNavigationEntry>& navigations, |
| 131 content::BrowserContext* browser_context); | 132 content::BrowserContext* browser_context); |
| 132 | 133 |
| 133 private: | 134 private: |
| 134 friend class SerializedNavigationEntryTestHelper; | 135 friend class SerializedNavigationEntryTestHelper; |
| 135 | 136 |
| 136 // Index in the NavigationController. | 137 // Index in the NavigationController. |
| 137 int index_; | 138 int index_; |
| 138 | 139 |
| 139 // Member variables corresponding to NavigationEntry fields. | 140 // Member variables corresponding to NavigationEntry fields. |
| 140 int unique_id_; | 141 int unique_id_; |
| 141 content::Referrer referrer_; | 142 content::Referrer referrer_; |
| 142 GURL virtual_url_; | 143 GURL virtual_url_; |
| 143 base::string16 title_; | 144 base::string16 title_; |
| 144 content::PageState page_state_; | 145 content::PageState page_state_; |
| 145 content::PageTransition transition_type_; | 146 content::PageTransition transition_type_; |
| 146 bool has_post_data_; | 147 bool has_post_data_; |
| 147 int64 post_id_; | 148 int64 post_id_; |
| 148 GURL original_request_url_; | 149 GURL original_request_url_; |
| 149 bool is_overriding_user_agent_; | 150 bool is_overriding_user_agent_; |
| 150 base::Time timestamp_; | 151 base::Time timestamp_; |
| 151 base::string16 search_terms_; | 152 base::string16 search_terms_; |
| 152 GURL favicon_url_; | 153 GURL favicon_url_; |
| 153 int http_status_code_; | 154 int http_status_code_; |
| 155 std::vector<GURL> redirect_chain_; |
| 154 | 156 |
| 155 // Additional information. | 157 // Additional information. |
| 156 BlockedState blocked_state_; | 158 BlockedState blocked_state_; |
| 157 std::set<std::string> content_pack_categories_; | 159 std::set<std::string> content_pack_categories_; |
| 158 }; | 160 }; |
| 159 | 161 |
| 160 } // namespace sessions | 162 } // namespace sessions |
| 161 | 163 |
| 162 #endif // COMPONENTS_SESSIONS_SERIALIZED_NAVIGATION_ENTRY_H_ | 164 #endif // COMPONENTS_SESSIONS_SERIALIZED_NAVIGATION_ENTRY_H_ |
| OLD | NEW |