summaryrefslogtreecommitdiffstats
path: root/chrome/browser/toolbar_model.cc
diff options
context:
space:
mode:
authorukai@chromium.org <ukai@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-25 03:06:28 +0000
committerukai@chromium.org <ukai@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-25 03:06:28 +0000
commitd4cafafac04f16475b30346609c21dca6a8906d0 (patch)
tree222c3ead2eb74d7120be8b08356996003bf53b8d /chrome/browser/toolbar_model.cc
parente9aac796f9c73762f82b79cdb49682383058b054 (diff)
downloadchromium_src-d4cafafac04f16475b30346609c21dca6a8906d0.zip
chromium_src-d4cafafac04f16475b30346609c21dca6a8906d0.tar.gz
chromium_src-d4cafafac04f16475b30346609c21dca6a8906d0.tar.bz2
Show EV cert info text next to security icon.
Use hbox to pack location entry, security icons and EV cert info text. Change ToolbarModel::GetInfoText not return SkColor. BUG=none TEST=none Review URL: http://codereview.chromium.org/126117 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19224 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/toolbar_model.cc')
-rw-r--r--chrome/browser/toolbar_model.cc20
1 files changed, 8 insertions, 12 deletions
diff --git a/chrome/browser/toolbar_model.cc b/chrome/browser/toolbar_model.cc
index 66f03f0..9107ec2 100644
--- a/chrome/browser/toolbar_model.cc
+++ b/chrome/browser/toolbar_model.cc
@@ -157,36 +157,32 @@ void ToolbarModel::GetIconHoverText(std::wstring* text, SkColor* text_color) {
}
}
-void ToolbarModel::GetInfoText(std::wstring* text,
- SkColor* text_color,
- std::wstring* tooltip) {
- static const SkColor kEVTextColor =
- SkColorSetRGB(0, 150, 20); // Green.
-
+ToolbarModel::InfoTextType ToolbarModel::GetInfoText(std::wstring* text,
+ std::wstring* tooltip) {
DCHECK(text && tooltip);
text->clear();
tooltip->clear();
NavigationController* navigation_controller = GetNavigationController();
if (!navigation_controller) // We might not have a controller on init.
- return;
+ return INFO_NO_INFO;
NavigationEntry* entry = navigation_controller->GetActiveEntry();
const NavigationEntry::SSLStatus& ssl = entry->ssl();
if (!entry || ssl.has_mixed_content() ||
net::IsCertStatusError(ssl.cert_status()) ||
((ssl.cert_status() & net::CERT_STATUS_IS_EV) == 0))
- return;
+ return INFO_NO_INFO;
scoped_refptr<net::X509Certificate> cert;
CertStore::GetSharedInstance()->RetrieveCert(ssl.cert_id(), &cert);
if (!cert.get()) {
NOTREACHED();
- return;
+ return INFO_NO_INFO;
}
- *text_color = kEVTextColor;
SSLManager::GetEVCertNames(*cert, text, tooltip);
+ return INFO_EV_TEXT;
}
void ToolbarModel::CreateErrorText(NavigationEntry* entry, std::wstring* text) {
@@ -201,8 +197,8 @@ void ToolbarModel::CreateErrorText(NavigationEntry* entry, std::wstring* text) {
NULL, GURL::EmptyGURL()));
}
if (ssl.has_unsafe_content()) {
- errors.push_back(SSLErrorInfo::CreateError(SSLErrorInfo::UNSAFE_CONTENTS,
- NULL, GURL::EmptyGURL()));
+ errors.push_back(SSLErrorInfo::CreateError(SSLErrorInfo::UNSAFE_CONTENTS,
+ NULL, GURL::EmptyGURL()));
}
int error_count = static_cast<int>(errors.size());