Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1568)

Unified Diff: chrome/browser/page_info_model.cc

Issue 4210004: We should use SSLInfo or related types for HTTPS... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Remove cert_store.cc Created 10 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/renderer_host/resource_dispatcher_host.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/page_info_model.cc
===================================================================
--- chrome/browser/page_info_model.cc (revision 64489)
+++ chrome/browser/page_info_model.cc (working copy)
@@ -161,12 +161,19 @@
icon_id = ICON_STATE_OK;
headline.clear();
description.clear();
- if (ssl.security_bits() < 0) {
+ if (!ssl.cert_id()) {
+ // Not HTTPS.
+ DCHECK_EQ(ssl.security_style(), SECURITY_STYLE_UNAUTHENTICATED);
Finnur 2010/11/09 11:40:04 Wait... we are not failing safe in this case, are
wtc 2010/11/10 20:40:56 In general I trust our code maintains invariants c
+ icon_id = ICON_STATE_WARNING_MAJOR;
+ description.assign(l10n_util::GetStringFUTF16(
+ IDS_PAGE_INFO_SECURITY_TAB_NOT_ENCRYPTED_CONNECTION_TEXT,
+ subject_name));
+ } else if (ssl.security_bits() < 0) {
// Security strength is unknown. Say nothing.
icon_id = ICON_STATE_ERROR;
} else if (ssl.security_bits() == 0) {
- icon_id = ssl.security_style() == SECURITY_STYLE_UNAUTHENTICATED ?
- ICON_STATE_WARNING_MAJOR : ICON_STATE_ERROR;
+ DCHECK_NE(ssl.security_style(), SECURITY_STYLE_UNAUTHENTICATED);
+ icon_id = ICON_STATE_ERROR;
description.assign(l10n_util::GetStringFUTF16(
IDS_PAGE_INFO_SECURITY_TAB_NOT_ENCRYPTED_CONNECTION_TEXT,
subject_name));
« no previous file with comments | « no previous file | chrome/browser/renderer_host/resource_dispatcher_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698