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 const 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; |
(...skipping 14 matching lines...) Expand all Loading... |
149 content::PageTransition transition_type_; | 150 content::PageTransition transition_type_; |
150 bool has_post_data_; | 151 bool has_post_data_; |
151 int64 post_id_; | 152 int64 post_id_; |
152 GURL original_request_url_; | 153 GURL original_request_url_; |
153 bool is_overriding_user_agent_; | 154 bool is_overriding_user_agent_; |
154 base::Time timestamp_; | 155 base::Time timestamp_; |
155 base::string16 search_terms_; | 156 base::string16 search_terms_; |
156 GURL favicon_url_; | 157 GURL favicon_url_; |
157 int http_status_code_; | 158 int http_status_code_; |
158 bool is_restored_; // Not persisted. | 159 bool is_restored_; // Not persisted. |
| 160 std::vector<GURL> redirect_chain_; // Not persisted. |
159 | 161 |
160 // Additional information. | 162 // Additional information. |
161 BlockedState blocked_state_; | 163 BlockedState blocked_state_; |
162 std::set<std::string> content_pack_categories_; | 164 std::set<std::string> content_pack_categories_; |
163 }; | 165 }; |
164 | 166 |
165 } // namespace sessions | 167 } // namespace sessions |
166 | 168 |
167 #endif // COMPONENTS_SESSIONS_SERIALIZED_NAVIGATION_ENTRY_H_ | 169 #endif // COMPONENTS_SESSIONS_SERIALIZED_NAVIGATION_ENTRY_H_ |
OLD | NEW |