diff options
author | pkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-04-19 19:01:14 +0000 |
---|---|---|
committer | pkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-04-19 19:01:14 +0000 |
commit | eed084d901efe457300e673972a0369406bd5e66 (patch) | |
tree | 82f94f52879937ded20a1fc7932bfbc300e408bf /chrome/browser/toolbar_model.cc | |
parent | b8f41a197500eb0d6fbff3e8f1216d99a49b7d07 (diff) | |
download | chromium_src-eed084d901efe457300e673972a0369406bd5e66.zip chromium_src-eed084d901efe457300e673972a0369406bd5e66.tar.gz chromium_src-eed084d901efe457300e673972a0369406bd5e66.tar.bz2 |
SSL UI changes, Windows, code side (images are separate).
* Remove "Type to search" hint
* Remove "Untrusted website" label
* Add EV cert bubble, make it function like a location icon for clicks/drags
* Modify spacing for EV/tab-to-search bubbles to keep icons and text aligned with dropdown
* Change non-EV HTTPS coloring from blue to green
Mac and Linux should compile, but only some of the above changes have been made for them. Specifically, there is no EV cert bubble, the non-EV scheme color isn't changed, and the icon/text alignment in the tab-to-search bubble hasn't been touched.
BUG=41481
TEST=paypal.com should generate a bubble around the lock and cert holder name, which responds to clicks and drags like the location icon would
Review URL: http://codereview.chromium.org/1585043
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@44929 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/toolbar_model.cc')
-rw-r--r-- | chrome/browser/toolbar_model.cc | 34 |
1 files changed, 9 insertions, 25 deletions
diff --git a/chrome/browser/toolbar_model.cc b/chrome/browser/toolbar_model.cc index 9e79335..c641539 100644 --- a/chrome/browser/toolbar_model.cc +++ b/chrome/browser/toolbar_model.cc @@ -100,7 +100,7 @@ ToolbarModel::SecurityLevel ToolbarModel::GetSecurityLevel() const { int ToolbarModel::GetIcon() const { static int icon_ids[NUM_SECURITY_LEVELS] = { IDR_OMNIBOX_HTTP, - IDR_OMNIBOX_HTTPS_GREEN, + IDR_OMNIBOX_HTTPS_VALID, IDR_OMNIBOX_HTTPS_VALID, IDR_OMNIBOX_HTTPS_WARNING, IDR_OMNIBOX_HTTPS_INVALID, @@ -109,30 +109,14 @@ int ToolbarModel::GetIcon() const { return icon_ids[GetSecurityLevel()]; } -std::wstring ToolbarModel::GetSecurityInfoText() const { - switch (GetSecurityLevel()) { - case NONE: - case SECURE: - case SECURITY_WARNING: - return std::wstring(); - - case EV_SECURE: { - scoped_refptr<net::X509Certificate> cert; - // Note: Navigation controller and active entry are guaranteed non-NULL - // or the security level would be NONE. - CertStore::GetSharedInstance()->RetrieveCert( - GetNavigationController()->GetActiveEntry()->ssl().cert_id(), - &cert); - return SSLManager::GetEVCertName(*cert); - } - - case SECURITY_ERROR: - return l10n_util::GetString(IDS_SECURITY_BROKEN); - - default: - NOTREACHED(); - return std::wstring(); - } +std::wstring ToolbarModel::GetEVCertName() const { + DCHECK_EQ(GetSecurityLevel(), EV_SECURE); + scoped_refptr<net::X509Certificate> cert; + // Note: Navigation controller and active entry are guaranteed non-NULL or + // the security level would be NONE. + CertStore::GetSharedInstance()->RetrieveCert( + GetNavigationController()->GetActiveEntry()->ssl().cert_id(), &cert); + return SSLManager::GetEVCertName(*cert); } NavigationController* ToolbarModel::GetNavigationController() const { |