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

Side by Side Diff: components/security_state/core/security_state_ui.cc

Issue 2574733003: Introduce security_state::ShouldAlwaysShowIcon() for mobile omnibox calculations. (Closed)
Patch Set: Fix code and add comment. 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 unified diff | Download patch
« no previous file with comments | « components/security_state/core/security_state_ui.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "components/security_state/core/security_state_ui.h"
6
7 namespace security_state {
8
9 bool ShouldAlwaysShowIcon(SecurityLevel security_level) {
10 // Enumerate all |SecurityLevel| values for compile-time enforcement that all
11 // cases are explicitly handled.
12 switch (security_level) {
13 case NONE:
14 return false;
15 case HTTP_SHOW_WARNING:
16 case EV_SECURE:
17 case SECURE:
18 case SECURITY_WARNING:
19 case SECURE_WITH_POLICY_INSTALLED_CERT:
20 case DANGEROUS:
21 return true;
22 }
23 NOTREACHED();
24 return false;
25 }
26
27 } // namespace security_state
OLDNEW
« 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