Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(650)

Unified Diff: components/toolbar/toolbar_model_impl.cc

Issue 2144903004: New location security strings and animation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: components/toolbar/toolbar_model_impl.cc
diff --git a/components/toolbar/toolbar_model_impl.cc b/components/toolbar/toolbar_model_impl.cc
index f6c7410c5e0209710216d766ff20d1a8a657cad0..f5d2e8415e9a05b452e8c31658285d7798a3550f 100644
--- a/components/toolbar/toolbar_model_impl.cc
+++ b/components/toolbar/toolbar_model_impl.cc
@@ -142,10 +142,30 @@ base::string16 ToolbarModelImpl::GetEVCertName() const {
base::UTF8ToUTF16(cert->subject().country_name));
}
+base::string16 ToolbarModelImpl::GetSecureVerboseText() const {
+ switch (GetSecurityLevel(false)) {
+ case SecurityStateModel::EV_SECURE:
+ case SecurityStateModel::SECURE:
+ return l10n_util::GetStringUTF16(IDS_SECURE_VERBOSE_HTTPS);
+ case SecurityStateModel::SECURITY_ERROR:
+ case SecurityStateModel::SECURITY_WARNING:
+ case SecurityStateModel::SECURITY_POLICY_WARNING:
+ return l10n_util::GetStringUTF16(IDS_SECURE_VERBOSE_DANGEROUS);
+ case SecurityStateModel::NONE:
+ return l10n_util::GetStringUTF16(IDS_SECURE_VERBOSE_HTTP);
+ }
+
+ return base::string16();
Peter Kasting 2016/07/19 21:17:21 Nit: NOTREACHED()?
Kevin Bailey 2016/08/12 18:49:15 Done.
+}
+
bool ToolbarModelImpl::ShouldDisplayURL() const {
return delegate_->ShouldDisplayURL();
}
+scoped_refptr<net::X509Certificate> ToolbarModelImpl::GetCertificate() const {
+ return delegate_->GetCertificate();
+}
+
base::string16 ToolbarModelImpl::GetSearchTerms(bool ignore_editing) const {
if (!url_replacement_enabled() || (input_in_progress() && !ignore_editing))
return base::string16();
« components/toolbar/toolbar_model.h ('K') | « components/toolbar/toolbar_model_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698