diff options
author | wtc@chromium.org <wtc@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-02 02:07:44 +0000 |
---|---|---|
committer | wtc@chromium.org <wtc@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-02 02:07:44 +0000 |
commit | c88d24f1f8aaf609db1fdcc06c3a4b5ca528c7ed (patch) | |
tree | 1bba1823b5277ee9f096e04ab2234bf8856ec500 /chrome/browser/page_info_model.cc | |
parent | 76451fe7fbce667742dff671cad06cbd039f8296 (diff) | |
download | chromium_src-c88d24f1f8aaf609db1fdcc06c3a4b5ca528c7ed.zip chromium_src-c88d24f1f8aaf609db1fdcc06c3a4b5ca528c7ed.tar.gz chromium_src-c88d24f1f8aaf609db1fdcc06c3a4b5ca528c7ed.tar.bz2 |
Do not say the connection is not encrypted if security_bits
is -1 (unknown). Say nothing in that case.
If the description for the connection section is empty, omit
the connection section in the dialog.
R=finnur,jcivelli
BUG=53366,13049
TEST=Visit https://alioth.debian.org/. Bring up the Security
info dialog while Chrome is displaying the SSL certificate
error page. The security info dialog should not say "Your
connection to alioth.debian.org is not encrypted."
Review URL: http://codereview.chromium.org/3243008
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@58302 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/page_info_model.cc')
-rw-r--r-- | chrome/browser/page_info_model.cc | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/chrome/browser/page_info_model.cc b/chrome/browser/page_info_model.cc index 997e2b6..1f2ffbd 100644 --- a/chrome/browser/page_info_model.cc +++ b/chrome/browser/page_info_model.cc @@ -110,7 +110,10 @@ PageInfoModel::PageInfoModel(Profile* profile, state = SECTION_STATE_OK; headline.clear(); description.clear(); - if (ssl.security_bits() <= 0) { + if (ssl.security_bits() < 0) { + // Security strength is unknown. Say nothing. + state = SECTION_STATE_ERROR; + } else if (ssl.security_bits() == 0) { state = SECTION_STATE_ERROR; description.assign(l10n_util::GetStringFUTF16( IDS_PAGE_INFO_SECURITY_TAB_NOT_ENCRYPTED_CONNECTION_TEXT, @@ -184,12 +187,14 @@ PageInfoModel::PageInfoModel(Profile* profile, } } - sections_.push_back(SectionInfo( - state, - l10n_util::GetStringUTF16(IDS_PAGE_INFO_SECURITY_TAB_CONNECTION_TITLE), - headline, - description, - SECTION_INFO_CONNECTION)); + if (!description.empty()) { + sections_.push_back(SectionInfo( + state, + l10n_util::GetStringUTF16(IDS_PAGE_INFO_SECURITY_TAB_CONNECTION_TITLE), + headline, + description, + SECTION_INFO_CONNECTION)); + } // Request the number of visits. HistoryService* history = profile->GetHistoryService( |