| 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 #ifndef IOS_WEB_NET_CRW_SSL_STATUS_UPDATER_H_ | 5 #ifndef IOS_WEB_NET_CRW_SSL_STATUS_UPDATER_H_ |
| 6 #define IOS_WEB_NET_CRW_SSL_STATUS_UPDATER_H_ | 6 #define IOS_WEB_NET_CRW_SSL_STATUS_UPDATER_H_ |
| 7 | 7 |
| 8 #import <Foundation/Foundation.h> | 8 #import <Foundation/Foundation.h> |
| 9 #import <Security/Security.h> | 9 #import <Security/Security.h> |
| 10 | 10 |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 @protocol CRWSSLStatusUpdaterDelegate; | 21 @protocol CRWSSLStatusUpdaterDelegate; |
| 22 | 22 |
| 23 // Updates SSL Status for web::NavigationItem. | 23 // Updates SSL Status for web::NavigationItem. |
| 24 @interface CRWSSLStatusUpdater : NSObject | 24 @interface CRWSSLStatusUpdater : NSObject |
| 25 | 25 |
| 26 // Delegate for CRWSSLStatusUpdater. Can be nil. | 26 // Delegate for CRWSSLStatusUpdater. Can be nil. |
| 27 @property(nonatomic, weak) id<CRWSSLStatusUpdaterDelegate> delegate; | 27 @property(nonatomic, weak) id<CRWSSLStatusUpdaterDelegate> delegate; |
| 28 | 28 |
| 29 // Initializes CRWSSLStatusUpdater. |navManager| can not be null, will be stored | 29 // Initializes CRWSSLStatusUpdater. |navManager| can not be null, will be stored |
| 30 // as a weak pointer and must outlive updater. |dataSource| can not be nil, will | 30 // as a weak pointer and must outlive updater. |dataSource| can not be nil, will |
| 31 // be stored as a weak reference and must outlive updater. |certGroupID| will be | 31 // be stored as a weak reference and must outlive updater. |
| 32 // used for accessing web::CertStore. | |
| 33 - (instancetype)initWithDataSource:(id<CRWSSLStatusUpdaterDataSource>)dataSource | 32 - (instancetype)initWithDataSource:(id<CRWSSLStatusUpdaterDataSource>)dataSource |
| 34 navigationManager:(web::NavigationManager*)navigationManager | 33 navigationManager:(web::NavigationManager*)navigationManager |
| 35 certGroupID:(int)certGroupID NS_DESIGNATED_INITIALIZER; | 34 NS_DESIGNATED_INITIALIZER; |
| 36 | 35 |
| 37 - (instancetype)init NS_UNAVAILABLE; | 36 - (instancetype)init NS_UNAVAILABLE; |
| 38 | 37 |
| 39 // Updates SSL status for the current navigation item. The SSL Status is | 38 // Updates SSL status for the current navigation item. The SSL Status is |
| 40 // obtained from |host|, |chain| and |hasOnlySecureContent| flag. | 39 // obtained from |host|, |chain| and |hasOnlySecureContent| flag. |
| 41 - (void)updateSSLStatusForNavigationItem:(web::NavigationItem*)navigationItem | 40 - (void)updateSSLStatusForNavigationItem:(web::NavigationItem*)navigationItem |
| 42 withCertHost:(NSString*)host | 41 withCertHost:(NSString*)host |
| 43 trust: | 42 trust: |
| 44 (base::ScopedCFTypeRef<SecTrustRef>)trust | 43 (base::ScopedCFTypeRef<SecTrustRef>)trust |
| 45 hasOnlySecureContent:(BOOL)hasOnlySecureContent; | 44 hasOnlySecureContent:(BOOL)hasOnlySecureContent; |
| (...skipping 26 matching lines...) Expand all Loading... |
| 72 | 71 |
| 73 // Called if SSLStatus has been changed for the given navigation item. May be | 72 // Called if SSLStatus has been changed for the given navigation item. May be |
| 74 // called multiple times for a single update or not called at all if SSLStatus | 73 // called multiple times for a single update or not called at all if SSLStatus |
| 75 // has not been changed for the requested navigation item. | 74 // has not been changed for the requested navigation item. |
| 76 - (void)SSLStatusUpdater:(CRWSSLStatusUpdater*)SSLStatusUpdater | 75 - (void)SSLStatusUpdater:(CRWSSLStatusUpdater*)SSLStatusUpdater |
| 77 didChangeSSLStatusForNavigationItem:(web::NavigationItem*)navigationItem; | 76 didChangeSSLStatusForNavigationItem:(web::NavigationItem*)navigationItem; |
| 78 | 77 |
| 79 @end | 78 @end |
| 80 | 79 |
| 81 #endif // IOS_WEB_NET_CRW_SSL_STATUS_UPDATER_H_ | 80 #endif // IOS_WEB_NET_CRW_SSL_STATUS_UPDATER_H_ |
| OLD | NEW |