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

Side by Side Diff: ios/web/web_state/ui/crw_web_controller.mm

Issue 2656003004: Remember user decision for bad ssl certs. (Closed)
Patch Set: Created 3 years, 10 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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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/ui/crw_web_controller.h" 5 #import "ios/web/web_state/ui/crw_web_controller.h"
6 6
7 #import <WebKit/WebKit.h> 7 #import <WebKit/WebKit.h>
8 8
9 #import <objc/runtime.h> 9 #import <objc/runtime.h>
10 #include <stddef.h> 10 #include <stddef.h>
(...skipping 4302 matching lines...) Expand 10 before | Expand all | Expand 10 after
4313 // Ask web client if this cert error should be allowed. 4313 // Ask web client if this cert error should be allowed.
4314 web::GetWebClient()->AllowCertificateError( 4314 web::GetWebClient()->AllowCertificateError(
4315 self.webState, net::MapCertStatusToNetError(info.cert_status), info, 4315 self.webState, net::MapCertStatusToNetError(info.cert_status), info,
4316 net::GURLWithNSURL(requestURL), recoverable, 4316 net::GURLWithNSURL(requestURL), recoverable,
4317 base::BindBlock(^(bool proceed) { 4317 base::BindBlock(^(bool proceed) {
4318 if (proceed) { 4318 if (proceed) {
4319 DCHECK(recoverable); 4319 DCHECK(recoverable);
4320 [_certVerificationController allowCert:leafCert 4320 [_certVerificationController allowCert:leafCert
4321 forHost:host 4321 forHost:host
4322 status:info.cert_status]; 4322 status:info.cert_status];
4323 [self.sessionController.sessionCertificatePolicyManager
4324 registerAllowedCertificate:leafCert
4325 forHost:base::SysNSStringToUTF8(host)
4326 status:info.cert_status];
4323 [self loadCurrentURL]; 4327 [self loadCurrentURL];
4324 } 4328 }
4325 })); 4329 }));
4326 4330
4327 [self didUpdateSSLStatusForCurrentNavigationItem]; 4331 [self didUpdateSSLStatusForCurrentNavigationItem];
4328 [self loadCancelled]; 4332 [self loadCancelled];
4329 } 4333 }
4330 4334
4331 - (void)ensureWebViewCreated { 4335 - (void)ensureWebViewCreated {
4332 WKWebViewConfiguration* config = 4336 WKWebViewConfiguration* config =
(...skipping 1116 matching lines...) Expand 10 before | Expand all | Expand 10 after
5449 } 5453 }
5450 5454
5451 return web::WEB_VIEW_DOCUMENT_TYPE_GENERIC; 5455 return web::WEB_VIEW_DOCUMENT_TYPE_GENERIC;
5452 } 5456 }
5453 5457
5454 - (NSString*)refererFromNavigationAction:(WKNavigationAction*)action { 5458 - (NSString*)refererFromNavigationAction:(WKNavigationAction*)action {
5455 return [action.request valueForHTTPHeaderField:@"Referer"]; 5459 return [action.request valueForHTTPHeaderField:@"Referer"];
5456 } 5460 }
5457 5461
5458 @end 5462 @end
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