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

Unified Diff: components/security_state/core/security_state_ui.cc

Issue 2574733003: Introduce security_state::ShouldAlwaysShowIcon() for mobile omnibox calculations. (Closed)
Patch Set: Typo. Created 4 years 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
« no previous file with comments | « components/security_state/core/security_state_ui.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/security_state/core/security_state_ui.cc
diff --git a/components/security_state/core/security_state_ui.cc b/components/security_state/core/security_state_ui.cc
new file mode 100644
index 0000000000000000000000000000000000000000..85e9efc58b7a9be83e671a28249b70762e407132
--- /dev/null
+++ b/components/security_state/core/security_state_ui.cc
@@ -0,0 +1,25 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "components/security_state/core/security_state_ui.h"
+
+namespace security_state {
+
+bool ShouldAlwaysShowIcon(SecurityLevel security_level) {
+ // We enumerate all |SecurityLevel| values for compile-time enforcement that
+ // all cases are explicitly handled.
+ switch (security_level) {
+ case NONE:
+ return false;
+ case HTTP_SHOW_WARNING:
+ case EV_SECURE:
+ case SECURE:
+ case SECURITY_WARNING:
+ case SECURE_WITH_POLICY_INSTALLED_CERT:
+ case DANGEROUS:
+ return true;
+ }
estark 2016/12/14 20:18:04 you'll need to add NOTREACHED(); return false; a
lgarron 2016/12/14 22:18:15 Thanks; done and done.
+}
+
+} // namespace security_state
« no previous file with comments | « components/security_state/core/security_state_ui.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698