summaryrefslogtreecommitdiffstats
path: root/chrome/browser/ssl_manager.cc
diff options
context:
space:
mode:
authorbrettw@google.com <brettw@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-08-19 17:38:12 +0000
committerbrettw@google.com <brettw@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-08-19 17:38:12 +0000
commit6cf85906b0504908e3fd0fafa46be78903bfd6b9 (patch)
tree564d578de2118da6012571178e9f557da2e164a5 /chrome/browser/ssl_manager.cc
parentdfcb522ab183af2bfd6924e32bf43a8bd173097c (diff)
downloadchromium_src-6cf85906b0504908e3fd0fafa46be78903bfd6b9.zip
chromium_src-6cf85906b0504908e3fd0fafa46be78903bfd6b9.tar.gz
chromium_src-6cf85906b0504908e3fd0fafa46be78903bfd6b9.tar.bz2
Cleans up notifications for the NavigationController. There were several
notifications before and some of them were very unclear and misused (STATE_CHANGED). This one, and PRUNED were called unnecessarily in some cases as well. I replaced STATE_CHANGED and INDEX_CHANGED with ENTRY_COMMITTED which is more clear and covers (I think!) all the cases that the callers care about. I added a simple notification testing helper class, and used in the navigation controller unit tests to make sure we get the proper notifications. I had to change NotificationSource/Details to have a = and copy constructor so I can track them easily in my helper. I don't see why this would be bad. BUG=1325636,1321376,1325779 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1039 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/ssl_manager.cc')
-rw-r--r--chrome/browser/ssl_manager.cc6
1 files changed, 2 insertions, 4 deletions
diff --git a/chrome/browser/ssl_manager.cc b/chrome/browser/ssl_manager.cc
index be58f24..8454c09 100644
--- a/chrome/browser/ssl_manager.cc
+++ b/chrome/browser/ssl_manager.cc
@@ -247,10 +247,8 @@ void SSLManager::SetMaxSecurityStyle(SecurityStyle style) {
return;
}
- if (entry->ssl().security_style() > style) {
+ if (entry->ssl().security_style() > style)
entry->ssl().set_security_style(style);
- controller_->EntryUpdated(entry);
- }
}
// Delegate API method.
@@ -652,10 +650,10 @@ void SSLManager::DidCommitProvisionalLoad(ProvisionalLoadDetails* details) {
// We may not have an entry if this is a navigation to an initial blank
// page. Reset the SSL information and add the new data we have.
entry->ssl() = NavigationEntry::SSLStatus();
+ InitializeEntryIfNeeded(entry); // For security_style.
entry->ssl().set_cert_id(details->ssl_cert_id());
entry->ssl().set_cert_status(details->ssl_cert_status());
entry->ssl().set_security_bits(details->ssl_security_bits());
- controller_->EntryUpdated(entry);
}
if (details->interstitial_page()) {