| 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/web_contents/navigation_entry_impl.h" | 5 #include "content/browser/web_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 28 matching lines...) Expand all Loading... |
| 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 post_id_(-1), |
| 47 restore_type_(RESTORE_NONE), | 47 restore_type_(RESTORE_NONE), |
| 48 is_overriding_user_agent_(false), | 48 is_overriding_user_agent_(false), |
| 49 http_status_code_(0), |
| 49 is_renderer_initiated_(false), | 50 is_renderer_initiated_(false), |
| 50 is_cross_site_reload_(false) { | 51 is_cross_site_reload_(false) { |
| 51 } | 52 } |
| 52 | 53 |
| 53 NavigationEntryImpl::NavigationEntryImpl(SiteInstanceImpl* instance, | 54 NavigationEntryImpl::NavigationEntryImpl(SiteInstanceImpl* instance, |
| 54 int page_id, | 55 int page_id, |
| 55 const GURL& url, | 56 const GURL& url, |
| 56 const Referrer& referrer, | 57 const Referrer& referrer, |
| 57 const string16& title, | 58 const string16& title, |
| 58 PageTransition transition_type, | 59 PageTransition transition_type, |
| 59 bool is_renderer_initiated) | 60 bool is_renderer_initiated) |
| 60 : unique_id_(GetUniqueIDInConstructor()), | 61 : unique_id_(GetUniqueIDInConstructor()), |
| 61 site_instance_(instance), | 62 site_instance_(instance), |
| 62 page_type_(PAGE_TYPE_NORMAL), | 63 page_type_(PAGE_TYPE_NORMAL), |
| 63 url_(url), | 64 url_(url), |
| 64 referrer_(referrer), | 65 referrer_(referrer), |
| 65 update_virtual_url_with_url_(false), | 66 update_virtual_url_with_url_(false), |
| 66 title_(title), | 67 title_(title), |
| 67 page_id_(page_id), | 68 page_id_(page_id), |
| 68 transition_type_(transition_type), | 69 transition_type_(transition_type), |
| 69 has_post_data_(false), | 70 has_post_data_(false), |
| 70 post_id_(-1), | 71 post_id_(-1), |
| 71 restore_type_(RESTORE_NONE), | 72 restore_type_(RESTORE_NONE), |
| 72 is_overriding_user_agent_(false), | 73 is_overriding_user_agent_(false), |
| 74 http_status_code_(0), |
| 73 is_renderer_initiated_(is_renderer_initiated), | 75 is_renderer_initiated_(is_renderer_initiated), |
| 74 is_cross_site_reload_(false) { | 76 is_cross_site_reload_(false) { |
| 75 } | 77 } |
| 76 | 78 |
| 77 NavigationEntryImpl::~NavigationEntryImpl() { | 79 NavigationEntryImpl::~NavigationEntryImpl() { |
| 78 } | 80 } |
| 79 | 81 |
| 80 int NavigationEntryImpl::GetUniqueID() const { | 82 int NavigationEntryImpl::GetUniqueID() const { |
| 81 return unique_id_; | 83 return unique_id_; |
| 82 } | 84 } |
| (...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 256 } | 258 } |
| 257 | 259 |
| 258 void NavigationEntryImpl::SetTimestamp(base::Time timestamp) { | 260 void NavigationEntryImpl::SetTimestamp(base::Time timestamp) { |
| 259 timestamp_ = timestamp; | 261 timestamp_ = timestamp; |
| 260 } | 262 } |
| 261 | 263 |
| 262 base::Time NavigationEntryImpl::GetTimestamp() const { | 264 base::Time NavigationEntryImpl::GetTimestamp() const { |
| 263 return timestamp_; | 265 return timestamp_; |
| 264 } | 266 } |
| 265 | 267 |
| 268 void NavigationEntryImpl::SetHttpStatusCode(int http_status_code) { |
| 269 http_status_code_ = http_status_code; |
| 270 } |
| 271 |
| 272 int NavigationEntryImpl::GetHttpStatusCode() const { |
| 273 return http_status_code_; |
| 274 } |
| 275 |
| 266 } // namespace content | 276 } // namespace content |
| OLD | NEW |