OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "ios/chrome/browser/ui/omnibox/omnibox_util.h" | 5 #include "ios/chrome/browser/ui/omnibox/omnibox_util.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "ios/chrome/grit/ios_theme_resources.h" | 8 #include "ios/chrome/grit/ios_theme_resources.h" |
9 | 9 |
10 int GetIconForAutocompleteMatchType(AutocompleteMatchType::Type type, | 10 int GetIconForAutocompleteMatchType(AutocompleteMatchType::Type type, |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 return is_incognito ? IDR_IOS_OMNIBOX_SEARCH_INCOGNITO | 42 return is_incognito ? IDR_IOS_OMNIBOX_SEARCH_INCOGNITO |
43 : IDR_IOS_OMNIBOX_SEARCH; | 43 : IDR_IOS_OMNIBOX_SEARCH; |
44 case AutocompleteMatchType::CALCULATOR: | 44 case AutocompleteMatchType::CALCULATOR: |
45 case AutocompleteMatchType::EXTENSION_APP: | 45 case AutocompleteMatchType::EXTENSION_APP: |
46 case AutocompleteMatchType::NUM_TYPES: | 46 case AutocompleteMatchType::NUM_TYPES: |
47 NOTREACHED(); | 47 NOTREACHED(); |
48 return IDR_IOS_OMNIBOX_HTTP; | 48 return IDR_IOS_OMNIBOX_HTTP; |
49 } | 49 } |
50 } | 50 } |
51 | 51 |
52 int GetIconForSecurityState( | 52 int GetIconForSecurityState(security_state::SecurityLevel security_level) { |
53 security_state::SecurityStateModel::SecurityLevel security_level) { | |
54 switch (security_level) { | 53 switch (security_level) { |
55 case security_state::SecurityStateModel::NONE: | 54 case security_state::NONE: |
56 case security_state::SecurityStateModel::HTTP_SHOW_WARNING: | 55 case security_state::HTTP_SHOW_WARNING: |
57 return IDR_IOS_OMNIBOX_HTTP; | 56 return IDR_IOS_OMNIBOX_HTTP; |
58 case security_state::SecurityStateModel::EV_SECURE: | 57 case security_state::EV_SECURE: |
59 case security_state::SecurityStateModel::SECURE: | 58 case security_state::SECURE: |
60 return IDR_IOS_OMNIBOX_HTTPS_VALID; | 59 return IDR_IOS_OMNIBOX_HTTPS_VALID; |
61 case security_state::SecurityStateModel::SECURITY_WARNING: | 60 case security_state::SECURITY_WARNING: |
62 // Surface Dubious as Neutral. | 61 // Surface Dubious as Neutral. |
63 return IDR_IOS_OMNIBOX_HTTP; | 62 return IDR_IOS_OMNIBOX_HTTP; |
64 case security_state::SecurityStateModel::SECURE_WITH_POLICY_INSTALLED_CERT: | 63 case security_state::SECURE_WITH_POLICY_INSTALLED_CERT: |
65 return IDR_IOS_OMNIBOX_HTTPS_POLICY_WARNING; | 64 return IDR_IOS_OMNIBOX_HTTPS_POLICY_WARNING; |
66 case security_state::SecurityStateModel::DANGEROUS: | 65 case security_state::DANGEROUS: |
67 return IDR_IOS_OMNIBOX_HTTPS_INVALID; | 66 return IDR_IOS_OMNIBOX_HTTPS_INVALID; |
68 } | 67 } |
69 } | 68 } |
OLD | NEW |