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

Side by Side Diff: ios/chrome/browser/ssl/ios_chrome_security_state_model_client.mm

Issue 2329153002: Remove the WARNING security level.
Patch Set: Restore top control test for sub.originalwebsite.com (but with ERROR instead of WARNING). Created 4 years, 3 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 unified diff | Download patch
« no previous file with comments | « content/public/common/security_style.h ('k') | ios/web/net/request_tracker_impl.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/ssl/ios_chrome_security_state_model_client.h" 5 #include "ios/chrome/browser/ssl/ios_chrome_security_state_model_client.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/metrics/field_trial.h" 8 #include "base/metrics/field_trial.h"
9 #include "base/metrics/histogram_macros.h" 9 #include "base/metrics/histogram_macros.h"
10 #include "ios/web/public/navigation_item.h" 10 #include "ios/web/public/navigation_item.h"
(...skipping 16 matching lines...) Expand all
27 security_state::SecurityStateModel::SecurityLevel 27 security_state::SecurityStateModel::SecurityLevel
28 GetSecurityLevelForSecurityStyle(web::SecurityStyle style) { 28 GetSecurityLevelForSecurityStyle(web::SecurityStyle style) {
29 switch (style) { 29 switch (style) {
30 case web::SECURITY_STYLE_UNKNOWN: 30 case web::SECURITY_STYLE_UNKNOWN:
31 NOTREACHED(); 31 NOTREACHED();
32 return security_state::SecurityStateModel::NONE; 32 return security_state::SecurityStateModel::NONE;
33 case web::SECURITY_STYLE_UNAUTHENTICATED: 33 case web::SECURITY_STYLE_UNAUTHENTICATED:
34 return security_state::SecurityStateModel::NONE; 34 return security_state::SecurityStateModel::NONE;
35 case web::SECURITY_STYLE_AUTHENTICATION_BROKEN: 35 case web::SECURITY_STYLE_AUTHENTICATION_BROKEN:
36 return security_state::SecurityStateModel::SECURITY_ERROR; 36 return security_state::SecurityStateModel::SECURITY_ERROR;
37 case web::SECURITY_STYLE_WARNING:
38 // //ios/web currently doesn't use this style.
39 NOTREACHED();
40 return security_state::SecurityStateModel::SECURITY_WARNING;
41 case web::SECURITY_STYLE_AUTHENTICATED: 37 case web::SECURITY_STYLE_AUTHENTICATED:
42 return security_state::SecurityStateModel::SECURE; 38 return security_state::SecurityStateModel::SECURE;
43 } 39 }
44 return security_state::SecurityStateModel::NONE; 40 return security_state::SecurityStateModel::NONE;
45 } 41 }
46 42
47 } // namespace 43 } // namespace
48 44
49 IOSChromeSecurityStateModelClient::IOSChromeSecurityStateModelClient( 45 IOSChromeSecurityStateModelClient::IOSChromeSecurityStateModelClient(
50 web::WebState* web_state) 46 web::WebState* web_state)
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 state->initial_security_level = 90 state->initial_security_level =
95 GetSecurityLevelForSecurityStyle(ssl.security_style); 91 GetSecurityLevelForSecurityStyle(ssl.security_style);
96 state->certificate = ssl.certificate; 92 state->certificate = ssl.certificate;
97 state->cert_status = ssl.cert_status; 93 state->cert_status = ssl.cert_status;
98 state->connection_status = ssl.connection_status; 94 state->connection_status = ssl.connection_status;
99 state->security_bits = ssl.security_bits; 95 state->security_bits = ssl.security_bits;
100 state->displayed_mixed_content = 96 state->displayed_mixed_content =
101 (ssl.content_status & web::SSLStatus::DISPLAYED_INSECURE_CONTENT) ? true 97 (ssl.content_status & web::SSLStatus::DISPLAYED_INSECURE_CONTENT) ? true
102 : false; 98 : false;
103 } 99 }
OLDNEW
« no previous file with comments | « content/public/common/security_style.h ('k') | ios/web/net/request_tracker_impl.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698