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

Side by Side Diff: ios/web/web_state/wk_web_view_security_util.mm

Issue 2061103003: Updates WKWebViewSecurityUtil to handle deprecated enum values. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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 | « no previous file | 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
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #import "ios/web/web_state/wk_web_view_security_util.h" 5 #import "ios/web/web_state/wk_web_view_security_util.h"
6 6
7 #include "base/mac/scoped_cftyperef.h" 7 #include "base/mac/scoped_cftyperef.h"
8 #include "base/strings/sys_string_conversions.h" 8 #include "base/strings/sys_string_conversions.h"
9 #include "net/cert/x509_certificate.h" 9 #include "net/cert/x509_certificate.h"
10 #include "net/ssl/ssl_info.h" 10 #include "net/ssl/ssl_info.h"
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 case kSecTrustResultInvalid: 132 case kSecTrustResultInvalid:
133 return SECURITY_STYLE_UNKNOWN; 133 return SECURITY_STYLE_UNKNOWN;
134 case kSecTrustResultProceed: 134 case kSecTrustResultProceed:
135 case kSecTrustResultUnspecified: 135 case kSecTrustResultUnspecified:
136 return SECURITY_STYLE_AUTHENTICATED; 136 return SECURITY_STYLE_AUTHENTICATED;
137 case kSecTrustResultDeny: 137 case kSecTrustResultDeny:
138 case kSecTrustResultRecoverableTrustFailure: 138 case kSecTrustResultRecoverableTrustFailure:
139 case kSecTrustResultFatalTrustFailure: 139 case kSecTrustResultFatalTrustFailure:
140 case kSecTrustResultOtherError: 140 case kSecTrustResultOtherError:
141 return SECURITY_STYLE_AUTHENTICATION_BROKEN; 141 return SECURITY_STYLE_AUTHENTICATION_BROKEN;
142
143 // TODO(crbug.com/): This default clause exists because
144 // kSecTrustResultConfirm was deprecated in iOS7, but leads to a compile
145 // error if used with newer SDKs. Remove the default clause once this
146 // switch statement successfully compiles without kSecTrustResultConfirm.
147 default:
rohitrao (ping after 24h) 2016/06/14 15:20:32 Eugene asked whether this should be hidden behind
Eugene But (OOO till 7-30) 2016/06/14 15:35:07 I'm totally fine with having default. And I'm not
sdefresne 2016/06/14 18:03:09 +1 to eugenebut comment.
148 NOTREACHED();
149 return SECURITY_STYLE_UNKNOWN;
142 } 150 }
143 NOTREACHED();
144 return SECURITY_STYLE_UNKNOWN;
145 } 151 }
146 152
147 } // namespace web 153 } // namespace web
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698