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 27 matching lines...) Expand all Loading... |
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 post_id_(-1), |
47 restore_type_(RESTORE_NONE), | 47 restore_type_(RESTORE_NONE), |
| 48 is_overriding_user_agent_(false), |
48 is_renderer_initiated_(false), | 49 is_renderer_initiated_(false), |
49 is_cross_site_reload_(false) { | 50 is_cross_site_reload_(false) { |
50 } | 51 } |
51 | 52 |
52 NavigationEntryImpl::NavigationEntryImpl(SiteInstanceImpl* instance, | 53 NavigationEntryImpl::NavigationEntryImpl(SiteInstanceImpl* instance, |
53 int page_id, | 54 int page_id, |
54 const GURL& url, | 55 const GURL& url, |
55 const Referrer& referrer, | 56 const Referrer& referrer, |
56 const string16& title, | 57 const string16& title, |
57 PageTransition transition_type, | 58 PageTransition transition_type, |
58 bool is_renderer_initiated) | 59 bool is_renderer_initiated) |
59 : unique_id_(GetUniqueIDInConstructor()), | 60 : unique_id_(GetUniqueIDInConstructor()), |
60 site_instance_(instance), | 61 site_instance_(instance), |
61 page_type_(PAGE_TYPE_NORMAL), | 62 page_type_(PAGE_TYPE_NORMAL), |
62 url_(url), | 63 url_(url), |
63 referrer_(referrer), | 64 referrer_(referrer), |
64 update_virtual_url_with_url_(false), | 65 update_virtual_url_with_url_(false), |
65 title_(title), | 66 title_(title), |
66 page_id_(page_id), | 67 page_id_(page_id), |
67 transition_type_(transition_type), | 68 transition_type_(transition_type), |
68 has_post_data_(false), | 69 has_post_data_(false), |
69 post_id_(-1), | 70 post_id_(-1), |
70 restore_type_(RESTORE_NONE), | 71 restore_type_(RESTORE_NONE), |
| 72 is_overriding_user_agent_(false), |
71 is_renderer_initiated_(is_renderer_initiated), | 73 is_renderer_initiated_(is_renderer_initiated), |
72 is_cross_site_reload_(false) { | 74 is_cross_site_reload_(false) { |
73 } | 75 } |
74 | 76 |
75 NavigationEntryImpl::~NavigationEntryImpl() { | 77 NavigationEntryImpl::~NavigationEntryImpl() { |
76 } | 78 } |
77 | 79 |
78 int NavigationEntryImpl::GetUniqueID() const { | 80 int NavigationEntryImpl::GetUniqueID() const { |
79 return unique_id_; | 81 return unique_id_; |
80 } | 82 } |
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
219 } | 221 } |
220 | 222 |
221 void NavigationEntryImpl::SetOriginalRequestURL(const GURL& original_url) { | 223 void NavigationEntryImpl::SetOriginalRequestURL(const GURL& original_url) { |
222 original_request_url_ = original_url; | 224 original_request_url_ = original_url; |
223 } | 225 } |
224 | 226 |
225 const GURL& NavigationEntryImpl::GetOriginalRequestURL() const { | 227 const GURL& NavigationEntryImpl::GetOriginalRequestURL() const { |
226 return original_request_url_; | 228 return original_request_url_; |
227 } | 229 } |
228 | 230 |
| 231 void NavigationEntryImpl::SetIsOverridingUserAgent(bool override) { |
| 232 is_overriding_user_agent_ = override; |
| 233 } |
| 234 |
| 235 bool NavigationEntryImpl::GetIsOverridingUserAgent() const { |
| 236 return is_overriding_user_agent_; |
| 237 } |
| 238 |
229 } // namespace content | 239 } // namespace content |
OLD | NEW |