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

Unified Diff: ios/web/net/crw_ssl_status_updater.mm

Issue 2401683002: Removes WeakNSObject in ARC files in ios/web. (Closed)
Patch Set: Created 4 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | ios/web/web_state/crw_pass_kit_downloader.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/web/net/crw_ssl_status_updater.mm
diff --git a/ios/web/net/crw_ssl_status_updater.mm b/ios/web/net/crw_ssl_status_updater.mm
index 0d1149b930c1be28d9185b487d9241e9b8708edf..9dee9036cec439d80e81e4c5eee05347d363e293 100644
--- a/ios/web/net/crw_ssl_status_updater.mm
+++ b/ios/web/net/crw_ssl_status_updater.mm
@@ -4,7 +4,6 @@
#import "ios/web/net/crw_ssl_status_updater.h"
-#import "base/ios/weak_nsobject.h"
#import "base/mac/scoped_nsobject.h"
#import "base/strings/sys_string_conversions.h"
#import "ios/web/public/navigation_item.h"
@@ -24,9 +23,7 @@ using web::SecurityStyle;
@interface CRWSSLStatusUpdater () {
// DataSource for CRWSSLStatusUpdater.
- base::WeakNSProtocol<id<CRWSSLStatusUpdaterDataSource>> _dataSource;
- // Backs up property of the same name.
- base::WeakNSProtocol<id<CRWSSLStatusUpdaterDelegate>> _delegate;
+ __weak id<CRWSSLStatusUpdaterDataSource> _dataSource;
}
// Unowned pointer to web::NavigationManager.
@@ -54,6 +51,7 @@ using web::SecurityStyle;
@implementation CRWSSLStatusUpdater
@synthesize navigationManager = _navigationManager;
+@synthesize delegate = _delegate;
#pragma mark - Public
@@ -62,20 +60,12 @@ using web::SecurityStyle;
DCHECK(dataSource);
DCHECK(navigationManager);
if (self = [super init]) {
- _dataSource.reset(dataSource);
+ _dataSource = dataSource;
_navigationManager = navigationManager;
}
return self;
}
-- (id<CRWSSLStatusUpdaterDelegate>)delegate {
- return _delegate.get();
-}
-
-- (void)setDelegate:(id<CRWSSLStatusUpdaterDelegate>)delegate {
- _delegate.reset(delegate);
-}
-
- (void)updateSSLStatusForNavigationItem:(web::NavigationItem*)item
withCertHost:(NSString*)host
trust:(ScopedCFTypeRef<SecTrustRef>)trust
@@ -168,7 +158,7 @@ using web::SecurityStyle;
int itemID = _navigationManager->GetLastCommittedItem()->GetUniqueID();
DCHECK(_dataSource);
- base::WeakNSObject<CRWSSLStatusUpdater> weakSelf(self);
+ __weak CRWSSLStatusUpdater* weakSelf = self;
[_dataSource SSLStatusUpdater:self
querySSLStatusForTrust:trust
host:host
« no previous file with comments | « no previous file | ios/web/web_state/crw_pass_kit_downloader.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698