| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "components/toolbar/toolbar_model_impl.h" | 5 #include "components/toolbar/toolbar_model_impl.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "base/strings/utf_string_conversions.h" | 8 #include "base/strings/utf_string_conversions.h" |
| 9 #include "base/time/time.h" | 9 #include "base/time/time.h" |
| 10 #include "build/build_config.h" | 10 #include "build/build_config.h" |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 127 IDS_SECURE_CONNECTION_EV, | 127 IDS_SECURE_CONNECTION_EV, |
| 128 base::UTF8ToUTF16(cert->subject().organization_names[0]), | 128 base::UTF8ToUTF16(cert->subject().organization_names[0]), |
| 129 base::UTF8ToUTF16(cert->subject().country_name)); | 129 base::UTF8ToUTF16(cert->subject().country_name)); |
| 130 } | 130 } |
| 131 | 131 |
| 132 base::string16 ToolbarModelImpl::GetSecureVerboseText() const { | 132 base::string16 ToolbarModelImpl::GetSecureVerboseText() const { |
| 133 switch (GetSecurityLevel(false)) { | 133 switch (GetSecurityLevel(false)) { |
| 134 case SecurityStateModel::SECURE: | 134 case SecurityStateModel::SECURE: |
| 135 return l10n_util::GetStringUTF16(IDS_SECURE_VERBOSE_STATE); | 135 return l10n_util::GetStringUTF16(IDS_SECURE_VERBOSE_STATE); |
| 136 case SecurityStateModel::SECURITY_ERROR: | 136 case SecurityStateModel::SECURITY_ERROR: |
| 137 return l10n_util::GetStringUTF16(IDS_NOT_SECURE_VERBOSE_STATE); | 137 return l10n_util::GetStringUTF16(delegate_->FailsMalwareCheck() |
| 138 ? IDS_DANGEROUS_VERBOSE_STATE |
| 139 : IDS_NOT_SECURE_VERBOSE_STATE); |
| 138 default: | 140 default: |
| 139 return base::string16(); | 141 return base::string16(); |
| 140 } | 142 } |
| 141 } | 143 } |
| 142 | 144 |
| 143 bool ToolbarModelImpl::ShouldDisplayURL() const { | 145 bool ToolbarModelImpl::ShouldDisplayURL() const { |
| 144 return delegate_->ShouldDisplayURL(); | 146 return delegate_->ShouldDisplayURL(); |
| 145 } | 147 } |
| OLD | NEW |