diff options
author | brettw@google.com <brettw@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-08-19 15:42:20 +0000 |
---|---|---|
committer | brettw@google.com <brettw@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-08-19 15:42:20 +0000 |
commit | eb34392be36ea2948f39bd22a6beae19e0b0bd24 (patch) | |
tree | b5b4e701a3c0e01cc4a2be2ac8c2b798c472cab6 /chrome/browser/navigation_entry.cc | |
parent | d499ed582b58cf676becdc97ca7280861a9483b0 (diff) | |
download | chromium_src-eb34392be36ea2948f39bd22a6beae19e0b0bd24.zip chromium_src-eb34392be36ea2948f39bd22a6beae19e0b0bd24.tar.gz chromium_src-eb34392be36ea2948f39bd22a6beae19e0b0bd24.tar.bz2 |
Factor the SSL state out of the main NavigationEntry into a helper class. This
makes it easier to find stuff and also copy ssl state (just assign).
I made one "real" change in web_contents where I copy the entire SSL state now
to the new entry rather than just a few fields like the old one. I couldn't
figure out why this was necessary: running it shows that this leaves the other
two fields in the uninitialized state which seems wrong.
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1032 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/navigation_entry.cc')
-rw-r--r-- | chrome/browser/navigation_entry.cc | 34 |
1 files changed, 8 insertions, 26 deletions
diff --git a/chrome/browser/navigation_entry.cc b/chrome/browser/navigation_entry.cc index 89756e9..8c9e0f1 100644 --- a/chrome/browser/navigation_entry.cc +++ b/chrome/browser/navigation_entry.cc @@ -33,18 +33,21 @@ int NavigationEntry::unique_id_counter_ = 0; +NavigationEntry::SSLStatus::SSLStatus() + : security_style_(SECURITY_STYLE_UNKNOWN), + cert_id_(0), + cert_status_(0), + security_bits_(-1), + content_status_(NORMAL_CONTENT) { +} + NavigationEntry::NavigationEntry(TabContentsType type) : type_(type), unique_id_(GetUniqueID()), site_instance_(NULL), page_id_(-1), - security_style_(SECURITY_STYLE_UNKNOWN), transition_type_(PageTransition::LINK), page_type_(NORMAL_PAGE), - ssl_cert_id_(0), - ssl_cert_status_(0), - ssl_security_bits_(0), - content_status_(NORMAL_CONTENT), valid_fav_icon_(false), has_post_data_(false), restored_(false) { @@ -63,14 +66,9 @@ NavigationEntry::NavigationEntry(TabContentsType type, site_instance_(instance), page_id_(page_id), url_(url), - security_style_(SECURITY_STYLE_UNKNOWN), title_(title), transition_type_(transition_type), page_type_(NORMAL_PAGE), - ssl_cert_id_(0), - ssl_cert_status_(0), - ssl_security_bits_(-1), - content_status_(NORMAL_CONTENT), valid_fav_icon_(false), has_post_data_(false), restored_(false) { @@ -97,22 +95,6 @@ void NavigationEntry::SetContentState(const std::string& state) { state_ = state; } -void NavigationEntry::CopySSLInfoFrom(const NavigationEntry& entry) { - security_style_ = entry.security_style_; - content_status_ = entry.content_status_; - ssl_cert_id_ = entry.ssl_cert_id_; - ssl_cert_status_ = entry.ssl_cert_status_; - ssl_security_bits_ = entry.ssl_security_bits_; -} - -void NavigationEntry::ResetSSLStates() { - ssl_cert_id_ = 0; - ssl_cert_status_ = 0; - ssl_security_bits_ = -1; - security_style_ = SECURITY_STYLE_UNKNOWN; - content_status_ = NORMAL_CONTENT; -} - int NavigationEntry::GetUniqueID() { // Never return 0, as that is the "no ID" value. do { |