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 #include "content/browser/tab_contents/navigation_entry_impl.h" | 5 #include "content/browser/tab_contents/navigation_entry_impl.h" |
6 | 6 |
7 #include "base/string_util.h" | 7 #include "base/string_util.h" |
8 #include "base/utf_string_conversions.h" | 8 #include "base/utf_string_conversions.h" |
9 #include "content/public/common/content_constants.h" | 9 #include "content/public/common/content_constants.h" |
10 #include "content/public/common/url_constants.h" | 10 #include "content/public/common/url_constants.h" |
(...skipping 25 matching lines...) Expand all Loading... |
36 } | 36 } |
37 | 37 |
38 NavigationEntryImpl::NavigationEntryImpl() | 38 NavigationEntryImpl::NavigationEntryImpl() |
39 : unique_id_(GetUniqueIDInConstructor()), | 39 : unique_id_(GetUniqueIDInConstructor()), |
40 site_instance_(NULL), | 40 site_instance_(NULL), |
41 page_type_(PAGE_TYPE_NORMAL), | 41 page_type_(PAGE_TYPE_NORMAL), |
42 update_virtual_url_with_url_(false), | 42 update_virtual_url_with_url_(false), |
43 page_id_(-1), | 43 page_id_(-1), |
44 transition_type_(PAGE_TRANSITION_LINK), | 44 transition_type_(PAGE_TRANSITION_LINK), |
45 has_post_data_(false), | 45 has_post_data_(false), |
| 46 post_id_(-1), |
46 restore_type_(RESTORE_NONE), | 47 restore_type_(RESTORE_NONE), |
47 is_renderer_initiated_(false), | 48 is_renderer_initiated_(false), |
48 is_cross_site_reload_(false) { | 49 is_cross_site_reload_(false) { |
49 } | 50 } |
50 | 51 |
51 NavigationEntryImpl::NavigationEntryImpl(SiteInstanceImpl* instance, | 52 NavigationEntryImpl::NavigationEntryImpl(SiteInstanceImpl* instance, |
52 int page_id, | 53 int page_id, |
53 const GURL& url, | 54 const GURL& url, |
54 const Referrer& referrer, | 55 const Referrer& referrer, |
55 const string16& title, | 56 const string16& title, |
56 PageTransition transition_type, | 57 PageTransition transition_type, |
57 bool is_renderer_initiated) | 58 bool is_renderer_initiated) |
58 : unique_id_(GetUniqueIDInConstructor()), | 59 : unique_id_(GetUniqueIDInConstructor()), |
59 site_instance_(instance), | 60 site_instance_(instance), |
60 page_type_(PAGE_TYPE_NORMAL), | 61 page_type_(PAGE_TYPE_NORMAL), |
61 url_(url), | 62 url_(url), |
62 referrer_(referrer), | 63 referrer_(referrer), |
63 update_virtual_url_with_url_(false), | 64 update_virtual_url_with_url_(false), |
64 title_(title), | 65 title_(title), |
65 page_id_(page_id), | 66 page_id_(page_id), |
66 transition_type_(transition_type), | 67 transition_type_(transition_type), |
67 has_post_data_(false), | 68 has_post_data_(false), |
| 69 post_id_(-1), |
68 restore_type_(RESTORE_NONE), | 70 restore_type_(RESTORE_NONE), |
69 is_renderer_initiated_(is_renderer_initiated), | 71 is_renderer_initiated_(is_renderer_initiated), |
70 is_cross_site_reload_(false) { | 72 is_cross_site_reload_(false) { |
71 } | 73 } |
72 | 74 |
73 NavigationEntryImpl::~NavigationEntryImpl() { | 75 NavigationEntryImpl::~NavigationEntryImpl() { |
74 } | 76 } |
75 | 77 |
76 int NavigationEntryImpl::GetUniqueID() const { | 78 int NavigationEntryImpl::GetUniqueID() const { |
77 return unique_id_; | 79 return unique_id_; |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
185 } | 187 } |
186 | 188 |
187 void NavigationEntryImpl::SetHasPostData(bool has_post_data) { | 189 void NavigationEntryImpl::SetHasPostData(bool has_post_data) { |
188 has_post_data_ = has_post_data; | 190 has_post_data_ = has_post_data; |
189 } | 191 } |
190 | 192 |
191 bool NavigationEntryImpl::GetHasPostData() const { | 193 bool NavigationEntryImpl::GetHasPostData() const { |
192 return has_post_data_; | 194 return has_post_data_; |
193 } | 195 } |
194 | 196 |
| 197 void NavigationEntryImpl::SetPostID(int64 post_id) { |
| 198 post_id_ = post_id; |
| 199 } |
| 200 |
| 201 int64 NavigationEntryImpl::GetPostID() const { |
| 202 return post_id_; |
| 203 } |
| 204 |
195 const FaviconStatus& NavigationEntryImpl::GetFavicon() const { | 205 const FaviconStatus& NavigationEntryImpl::GetFavicon() const { |
196 return favicon_; | 206 return favicon_; |
197 } | 207 } |
198 | 208 |
199 FaviconStatus& NavigationEntryImpl::GetFavicon() { | 209 FaviconStatus& NavigationEntryImpl::GetFavicon() { |
200 return favicon_; | 210 return favicon_; |
201 } | 211 } |
202 | 212 |
203 const SSLStatus& NavigationEntryImpl::GetSSL() const { | 213 const SSLStatus& NavigationEntryImpl::GetSSL() const { |
204 return ssl_; | 214 return ssl_; |
205 } | 215 } |
206 | 216 |
207 SSLStatus& NavigationEntryImpl::GetSSL() { | 217 SSLStatus& NavigationEntryImpl::GetSSL() { |
208 return ssl_; | 218 return ssl_; |
209 } | 219 } |
210 | 220 |
211 } // namespace content | 221 } // namespace content |
OLD | NEW |