OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_WEB_CONTENTS_NAVIGATION_ENTRY_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_WEB_CONTENTS_NAVIGATION_ENTRY_IMPL_H_ |
6 #define CONTENT_BROWSER_WEB_CONTENTS_NAVIGATION_ENTRY_IMPL_H_ | 6 #define CONTENT_BROWSER_WEB_CONTENTS_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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 virtual const FaviconStatus& GetFavicon() const OVERRIDE; | 64 virtual const FaviconStatus& GetFavicon() const OVERRIDE; |
65 virtual FaviconStatus& GetFavicon() OVERRIDE; | 65 virtual FaviconStatus& GetFavicon() OVERRIDE; |
66 virtual const SSLStatus& GetSSL() const OVERRIDE; | 66 virtual const SSLStatus& GetSSL() const OVERRIDE; |
67 virtual SSLStatus& GetSSL() OVERRIDE; | 67 virtual SSLStatus& GetSSL() OVERRIDE; |
68 virtual void SetOriginalRequestURL(const GURL& original_url) OVERRIDE; | 68 virtual void SetOriginalRequestURL(const GURL& original_url) OVERRIDE; |
69 virtual const GURL& GetOriginalRequestURL() const OVERRIDE; | 69 virtual const GURL& GetOriginalRequestURL() const OVERRIDE; |
70 virtual void SetIsOverridingUserAgent(bool override) OVERRIDE; | 70 virtual void SetIsOverridingUserAgent(bool override) OVERRIDE; |
71 virtual bool GetIsOverridingUserAgent() const OVERRIDE; | 71 virtual bool GetIsOverridingUserAgent() const OVERRIDE; |
72 virtual void SetTimestamp(base::Time timestamp) OVERRIDE; | 72 virtual void SetTimestamp(base::Time timestamp) OVERRIDE; |
73 virtual base::Time GetTimestamp() const OVERRIDE; | 73 virtual base::Time GetTimestamp() const OVERRIDE; |
| 74 virtual void SetHttpStatusCode(int http_status_code) OVERRIDE; |
| 75 virtual int GetHttpStatusCode() const OVERRIDE; |
74 | 76 |
75 void set_unique_id(int unique_id) { | 77 void set_unique_id(int unique_id) { |
76 unique_id_ = unique_id; | 78 unique_id_ = unique_id; |
77 } | 79 } |
78 | 80 |
79 // The SiteInstance tells us how to share sub-processes. This is a reference | 81 // The SiteInstance tells us how to share sub-processes. This is a reference |
80 // counted pointer to a shared site instance. | 82 // counted pointer to a shared site instance. |
81 // | 83 // |
82 // Note that the SiteInstance should usually not be changed after it is set, | 84 // Note that the SiteInstance should usually not be changed after it is set, |
83 // but this may happen if the NavigationEntry was cloned and needs to use a | 85 // but this may happen if the NavigationEntry was cloned and needs to use a |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
159 // Resets to false after commit. | 161 // Resets to false after commit. |
160 void set_is_cross_site_reload(bool is_cross_site_reload) { | 162 void set_is_cross_site_reload(bool is_cross_site_reload) { |
161 is_cross_site_reload_ = is_cross_site_reload; | 163 is_cross_site_reload_ = is_cross_site_reload; |
162 } | 164 } |
163 bool is_cross_site_reload() const { | 165 bool is_cross_site_reload() const { |
164 return is_cross_site_reload_; | 166 return is_cross_site_reload_; |
165 } | 167 } |
166 | 168 |
167 private: | 169 private: |
168 // WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING | 170 // WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING |
169 // Session/Tab restore save portions of this class so that it can be recreated | 171 // If you add a new field that needs to be persisted you must update |
170 // later. If you add a new field that needs to be persisted you'll have to | 172 // TabNavigation in session_types.h appropriately. |
171 // update SessionService/TabRestoreService appropriately. | |
172 // WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING | 173 // WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING |
173 | 174 |
174 // See the accessors above for descriptions. | 175 // See the accessors above for descriptions. |
175 int unique_id_; | 176 int unique_id_; |
176 scoped_refptr<SiteInstanceImpl> site_instance_; | 177 scoped_refptr<SiteInstanceImpl> site_instance_; |
177 PageType page_type_; | 178 PageType page_type_; |
178 GURL url_; | 179 GURL url_; |
179 Referrer referrer_; | 180 Referrer referrer_; |
180 GURL virtual_url_; | 181 GURL virtual_url_; |
181 bool update_virtual_url_with_url_; | 182 bool update_virtual_url_with_url_; |
182 string16 title_; | 183 string16 title_; |
183 FaviconStatus favicon_; | 184 FaviconStatus favicon_; |
184 std::string content_state_; | 185 std::string content_state_; |
185 int32 page_id_; | 186 int32 page_id_; |
186 SSLStatus ssl_; | 187 SSLStatus ssl_; |
187 PageTransition transition_type_; | 188 PageTransition transition_type_; |
188 GURL user_typed_url_; | 189 GURL user_typed_url_; |
189 bool has_post_data_; | 190 bool has_post_data_; |
190 int64 post_id_; | 191 int64 post_id_; |
191 RestoreType restore_type_; | 192 RestoreType restore_type_; |
192 GURL original_request_url_; | 193 GURL original_request_url_; |
193 bool is_overriding_user_agent_; | 194 bool is_overriding_user_agent_; |
194 base::Time timestamp_; | 195 base::Time timestamp_; |
| 196 int http_status_code_; |
195 | 197 |
196 // This member is not persisted with session restore because it is transient. | 198 // This member is not persisted with session restore because it is transient. |
197 // If the post request succeeds, this field is cleared since the same | 199 // If the post request succeeds, this field is cleared since the same |
198 // information is stored in |content_state_| above. It is also only shallow | 200 // information is stored in |content_state_| above. It is also only shallow |
199 // copied with compiler provided copy constructor. | 201 // copied with compiler provided copy constructor. |
200 scoped_refptr<const base::RefCountedMemory> browser_initiated_post_data_; | 202 scoped_refptr<const base::RefCountedMemory> browser_initiated_post_data_; |
201 | 203 |
202 // This member is not persisted with session restore. | 204 // This member is not persisted with session restore. |
203 std::string extra_headers_; | 205 std::string extra_headers_; |
204 | 206 |
(...skipping 26 matching lines...) Expand all Loading... |
231 // instance, instead of a new navigation. This value should not be persisted | 233 // instance, instead of a new navigation. This value should not be persisted |
232 // and is not needed after the entry commits. | 234 // and is not needed after the entry commits. |
233 bool is_cross_site_reload_; | 235 bool is_cross_site_reload_; |
234 | 236 |
235 // Copy and assignment is explicitly allowed for this class. | 237 // Copy and assignment is explicitly allowed for this class. |
236 }; | 238 }; |
237 | 239 |
238 } // namespace content | 240 } // namespace content |
239 | 241 |
240 #endif // CONTENT_BROWSER_WEB_CONTENTS_NAVIGATION_ENTRY_IMPL_H_ | 242 #endif // CONTENT_BROWSER_WEB_CONTENTS_NAVIGATION_ENTRY_IMPL_H_ |
OLD | NEW |