| Index: components/toolbar/toolbar_model_impl.cc
|
| diff --git a/components/toolbar/toolbar_model_impl.cc b/components/toolbar/toolbar_model_impl.cc
|
| index 5e795f8bd96bb2cc405aa7b4657d0e9186a9c292..9329852843ea88254f9dc0016c29db741739f3d2 100644
|
| --- a/components/toolbar/toolbar_model_impl.cc
|
| +++ b/components/toolbar/toolbar_model_impl.cc
|
| @@ -8,6 +8,7 @@
|
| #include "base/strings/utf_string_conversions.h"
|
| #include "base/time/time.h"
|
| #include "build/build_config.h"
|
| +#include "components/grit/components_scaled_resources.h"
|
| #include "components/prefs/pref_service.h"
|
| #include "components/security_state/security_state_model.h"
|
| #include "components/strings/grit/components_strings.h"
|
| @@ -69,6 +70,27 @@
|
| : delegate_->GetSecurityLevel();
|
| }
|
|
|
| +int ToolbarModelImpl::GetIcon() const {
|
| + switch (GetSecurityLevel(false)) {
|
| + case SecurityStateModel::NONE:
|
| + case SecurityStateModel::HTTP_SHOW_WARNING:
|
| + return IDR_LOCATION_BAR_HTTP;
|
| + case SecurityStateModel::EV_SECURE:
|
| + case SecurityStateModel::SECURE:
|
| + return IDR_OMNIBOX_HTTPS_VALID;
|
| + case SecurityStateModel::SECURITY_WARNING:
|
| + // Surface Dubious as Neutral.
|
| + return IDR_LOCATION_BAR_HTTP;
|
| + case SecurityStateModel::SECURE_WITH_POLICY_INSTALLED_CERT:
|
| + return IDR_OMNIBOX_HTTPS_POLICY_WARNING;
|
| + case SecurityStateModel::DANGEROUS:
|
| + return IDR_OMNIBOX_HTTPS_INVALID;
|
| + }
|
| +
|
| + NOTREACHED();
|
| + return IDR_LOCATION_BAR_HTTP;
|
| +}
|
| +
|
| gfx::VectorIconId ToolbarModelImpl::GetVectorIcon() const {
|
| #if !defined(OS_ANDROID) && !defined(OS_IOS)
|
| switch (GetSecurityLevel(false)) {
|
| @@ -87,6 +109,7 @@
|
| return gfx::VectorIconId::LOCATION_BAR_HTTPS_INVALID;
|
| }
|
| #endif
|
| +
|
| NOTREACHED();
|
| return gfx::VectorIconId::VECTOR_ICON_NONE;
|
| }
|
|
|