| Index: chrome/browser/ui/toolbar/toolbar_model_impl.cc
|
| diff --git a/chrome/browser/ui/toolbar/toolbar_model_impl.cc b/chrome/browser/ui/toolbar/toolbar_model_impl.cc
|
| index 4af29ad07be9f3ebada88fc6ca98337986e9b186..0cefbc6b0e367c96cecee20b110e111835a707ad 100644
|
| --- a/chrome/browser/ui/toolbar/toolbar_model_impl.cc
|
| +++ b/chrome/browser/ui/toolbar/toolbar_model_impl.cc
|
| @@ -35,6 +35,7 @@
|
| #include "net/ssl/ssl_connection_status_flags.h"
|
| #include "ui/base/l10n/l10n_util.h"
|
| #include "ui/gfx/text_elider.h"
|
| +#include "ui/gfx/vector_icons_public.h"
|
|
|
| using content::NavigationController;
|
| using content::NavigationEntry;
|
| @@ -138,15 +139,7 @@ SecurityStateModel::SecurityLevel ToolbarModelImpl::GetSecurityLevel(
|
| }
|
|
|
| int ToolbarModelImpl::GetIcon() const {
|
| - if (WouldPerformSearchTermReplacement(false))
|
| - return IDR_OMNIBOX_SEARCH_SECURED;
|
| -
|
| - return GetIconForSecurityLevel(GetSecurityLevel(false));
|
| -}
|
| -
|
| -int ToolbarModelImpl::GetIconForSecurityLevel(
|
| - SecurityStateModel::SecurityLevel level) const {
|
| - switch (level) {
|
| + switch (GetSecurityLevel(false)) {
|
| case SecurityStateModel::NONE:
|
| return IDR_LOCATION_BAR_HTTP;
|
| case SecurityStateModel::EV_SECURE:
|
| @@ -165,6 +158,28 @@ int ToolbarModelImpl::GetIconForSecurityLevel(
|
| return IDR_LOCATION_BAR_HTTP;
|
| }
|
|
|
| +gfx::VectorIconId ToolbarModelImpl::GetVectorIcon() const {
|
| +#if !defined(OS_ANDROID) && !defined(OS_MACOSX) && !defined(OS_IOS)
|
| + switch (GetSecurityLevel(false)) {
|
| + case SecurityStateModel::NONE:
|
| + return gfx::VectorIconId::LOCATION_BAR_HTTP;
|
| + case SecurityStateModel::EV_SECURE:
|
| + case SecurityStateModel::SECURE:
|
| + return gfx::VectorIconId::LOCATION_BAR_HTTPS_VALID;
|
| + case SecurityStateModel::SECURITY_WARNING:
|
| + // Surface Dubious as Neutral.
|
| + return gfx::VectorIconId::LOCATION_BAR_HTTP;
|
| + case SecurityStateModel::SECURITY_POLICY_WARNING:
|
| + return gfx::VectorIconId::BUSINESS;
|
| + case SecurityStateModel::SECURITY_ERROR:
|
| + return gfx::VectorIconId::LOCATION_BAR_HTTPS_INVALID;
|
| + }
|
| +#endif
|
| +
|
| + NOTREACHED();
|
| + return gfx::VectorIconId::VECTOR_ICON_NONE;
|
| +}
|
| +
|
| base::string16 ToolbarModelImpl::GetEVCertName() const {
|
| if (GetSecurityLevel(false) != SecurityStateModel::EV_SECURE)
|
| return base::string16();
|
|
|