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

Unified Diff: components/toolbar/toolbar_model_impl.cc

Issue 2119033002: [Material][Mac] Implement Omnibox Verbose State Chips (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nit Created 4 years, 4 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..58f82415f2f288013a77ed2119a3866c04b4745f 100644
--- a/components/toolbar/toolbar_model_impl.cc
+++ b/components/toolbar/toolbar_model_impl.cc
@@ -142,6 +142,17 @@ base::string16 ToolbarModelImpl::GetEVCertName() const {
base::UTF8ToUTF16(cert->subject().country_name));
}
+base::string16 ToolbarModelImpl::GetVerboseStateText() const {
+ switch (GetSecurityLevel(false)) {
+ case SecurityStateModel::SECURE:
+ return l10n_util::GetStringUTF16(IDS_SECURE_VERBOSE_STATE);
+ case SecurityStateModel::SECURITY_ERROR:
+ return l10n_util::GetStringUTF16(IDS_NOT_SECURE_VERBOSE_STATE);
+ default:
+ return base::string16();
+ }
+}
+
bool ToolbarModelImpl::ShouldDisplayURL() const {
return delegate_->ShouldDisplayURL();
}

Powered by Google App Engine
This is Rietveld 408576698