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

Unified Diff: components/toolbar/toolbar_model_impl.cc

Issue 2968143003: Toolbar: Report offline state through icon and verbose text. (Closed)
Patch Set: . Created 3 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 c24a388aad0e259a105c68c6030818e74ca0f57a..8d3b2ac97be072df9cfa64428d7ae1c9ec6420da 100644
--- a/components/toolbar/toolbar_model_impl.cc
+++ b/components/toolbar/toolbar_model_impl.cc
@@ -79,6 +79,9 @@ const gfx::VectorIcon& ToolbarModelImpl::GetVectorIcon() const {
if (icon_override)
return *icon_override;
+ if (IsOfflinePage())
cjgrant 2017/07/06 19:19:16 I assume we want this check after the override abo
+ return toolbar::kOfflinePinIcon;
+
switch (GetSecurityLevel(false)) {
case security_state::NONE:
case security_state::HTTP_SHOW_WARNING:
@@ -121,6 +124,9 @@ base::string16 ToolbarModelImpl::GetEVCertName() const {
}
base::string16 ToolbarModelImpl::GetSecureVerboseText() const {
+ if (IsOfflinePage())
+ return l10n_util::GetStringUTF16(IDS_OFFLINE_VERBOSE_STATE);
+
switch (GetSecurityLevel(false)) {
case security_state::HTTP_SHOW_WARNING:
return l10n_util::GetStringUTF16(IDS_NOT_SECURE_VERBOSE_STATE);

Powered by Google App Engine
This is Rietveld 408576698