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 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
122 | 122 |
123 // EV are required to have an organization name and country. | 123 // EV are required to have an organization name and country. |
124 DCHECK(!cert->subject().organization_names.empty()); | 124 DCHECK(!cert->subject().organization_names.empty()); |
125 DCHECK(!cert->subject().country_name.empty()); | 125 DCHECK(!cert->subject().country_name.empty()); |
126 return l10n_util::GetStringFUTF16( | 126 return l10n_util::GetStringFUTF16( |
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::GetSecurityVerboseText() const { | |
133 switch (GetSecurityLevel(false)) { | |
134 case SecurityStateModel::SECURE: | |
135 return l10n_util::GetStringUTF16(IDS_SECURE_VERBOSE_STATE); | |
136 case SecurityStateModel::EV_SECURE: | |
137 return GetEVCertName(); | |
138 case SecurityStateModel::SECURITY_ERROR: | |
139 return l10n_util::GetStringUTF16(IDS_NOT_SECURE_VERBOSE_STATE); | |
140 case SecurityStateModel::NONE: | |
Peter Kasting
2016/08/18 21:15:00
Nit: I'm inclined to just change all these to a "d
spqchan
2016/08/18 21:56:32
Done.
| |
141 case SecurityStateModel::SECURITY_WARNING: | |
142 case SecurityStateModel::SECURITY_POLICY_WARNING: | |
143 return base::string16(); | |
144 } | |
145 } | |
146 | |
132 bool ToolbarModelImpl::ShouldDisplayURL() const { | 147 bool ToolbarModelImpl::ShouldDisplayURL() const { |
133 return delegate_->ShouldDisplayURL(); | 148 return delegate_->ShouldDisplayURL(); |
134 } | 149 } |
OLD | NEW |