| 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 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 126 DCHECK(!cert->subject().organization_names.empty()); | 126 DCHECK(!cert->subject().organization_names.empty()); |
| 127 DCHECK(!cert->subject().country_name.empty()); | 127 DCHECK(!cert->subject().country_name.empty()); |
| 128 return l10n_util::GetStringFUTF16( | 128 return l10n_util::GetStringFUTF16( |
| 129 IDS_SECURE_CONNECTION_EV, | 129 IDS_SECURE_CONNECTION_EV, |
| 130 base::UTF8ToUTF16(cert->subject().organization_names[0]), | 130 base::UTF8ToUTF16(cert->subject().organization_names[0]), |
| 131 base::UTF8ToUTF16(cert->subject().country_name)); | 131 base::UTF8ToUTF16(cert->subject().country_name)); |
| 132 } | 132 } |
| 133 | 133 |
| 134 base::string16 ToolbarModelImpl::GetSecureVerboseText() const { | 134 base::string16 ToolbarModelImpl::GetSecureVerboseText() const { |
| 135 switch (GetSecurityLevel(false)) { | 135 switch (GetSecurityLevel(false)) { |
| 136 case SecurityStateModel::HTTP_SHOW_WARNING: |
| 137 return l10n_util::GetStringUTF16(IDS_NOT_SECURE_VERBOSE_STATE); |
| 136 case SecurityStateModel::SECURE: | 138 case SecurityStateModel::SECURE: |
| 137 return l10n_util::GetStringUTF16(IDS_SECURE_VERBOSE_STATE); | 139 return l10n_util::GetStringUTF16(IDS_SECURE_VERBOSE_STATE); |
| 138 case SecurityStateModel::DANGEROUS: | 140 case SecurityStateModel::DANGEROUS: |
| 139 return l10n_util::GetStringUTF16(delegate_->FailsMalwareCheck() | 141 return l10n_util::GetStringUTF16(delegate_->FailsMalwareCheck() |
| 140 ? IDS_DANGEROUS_VERBOSE_STATE | 142 ? IDS_DANGEROUS_VERBOSE_STATE |
| 141 : IDS_NOT_SECURE_VERBOSE_STATE); | 143 : IDS_NOT_SECURE_VERBOSE_STATE); |
| 142 default: | 144 default: |
| 143 return base::string16(); | 145 return base::string16(); |
| 144 } | 146 } |
| 145 } | 147 } |
| 146 | 148 |
| 147 bool ToolbarModelImpl::ShouldDisplayURL() const { | 149 bool ToolbarModelImpl::ShouldDisplayURL() const { |
| 148 return delegate_->ShouldDisplayURL(); | 150 return delegate_->ShouldDisplayURL(); |
| 149 } | 151 } |
| OLD | NEW |