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 3bdae4af5868f8e61e93fe9b4ed2d9327f65be75..278a655685b93bf78ae0794e992e748c009faef1 100644 |
--- a/chrome/browser/ui/toolbar/toolbar_model_impl.cc |
+++ b/chrome/browser/ui/toolbar/toolbar_model_impl.cc |
@@ -33,6 +33,7 @@ |
#include "net/cert/x509_certificate.h" |
#include "net/ssl/ssl_connection_status_flags.h" |
#include "ui/base/l10n/l10n_util.h" |
+#include "ui/gfx/vector_icons_public.h" |
using content::NavigationController; |
using content::NavigationEntry; |
@@ -126,9 +127,6 @@ SecurityStateModel::SecurityLevel ToolbarModelImpl::GetSecurityLevel( |
} |
int ToolbarModelImpl::GetIcon() const { |
- if (WouldPerformSearchTermReplacement(false)) |
- return IDR_OMNIBOX_SEARCH_SECURED; |
- |
return GetIconForSecurityLevel(GetSecurityLevel(false)); |
Peter Kasting
2015/10/21 19:45:47
I think GetIconForSecurityLevel() is now only call
Evan Stade
2015/10/21 23:20:01
Done.
|
} |
@@ -153,6 +151,33 @@ int ToolbarModelImpl::GetIconForSecurityLevel( |
return IDR_LOCATION_BAR_HTTP; |
} |
+gfx::VectorIconId ToolbarModelImpl::GetVectorIcon() const { |
+ return GetVectorIconForSecurityLevel(GetSecurityLevel(false)); |
+} |
+ |
+gfx::VectorIconId ToolbarModelImpl::GetVectorIconForSecurityLevel( |
+ SecurityStateModel::SecurityLevel level) const { |
+#if !defined(OS_ANDROID) && !defined(OS_MACOSX) && !defined(OS_IOS) |
+ switch (level) { |
+ 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; |
Peter Kasting
2015/10/21 19:45:47
It's not at all obvious what this is from the name
Evan Stade
2015/10/21 23:20:01
Yes, "business" is the name of this icon, which is
Peter Kasting
2015/10/22 00:05:24
FWIW, I'd like to rename all the icons to match th
|
+ case SecurityStateModel::SECURITY_ERROR: |
+ return gfx::VectorIconId::LOCATION_BAR_HTTPS_INVALID; |
+ } |
+#endif |
+ |
+ NOTREACHED(); |
+ return gfx::VectorIconId::LOCATION_BAR_HTTP; |
+} |
+ |
base::string16 ToolbarModelImpl::GetEVCertName() const { |
if (GetSecurityLevel(false) != SecurityStateModel::EV_SECURE) |
return base::string16(); |