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

Unified Diff: ios/web/public/test/fakes/crw_test_js_injection_receiver.mm

Issue 2922973004: [ObjC ARC] Converts ios/web/public/test/fakes:fakes to ARC. (Closed)
Patch Set: scoped_nsobject in .h Created 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ios/web/public/test/fakes/BUILD.gn ('k') | ios/web/public/test/fakes/crw_test_web_state_observer.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/web/public/test/fakes/crw_test_js_injection_receiver.mm
diff --git a/ios/web/public/test/fakes/crw_test_js_injection_receiver.mm b/ios/web/public/test/fakes/crw_test_js_injection_receiver.mm
index 7ab44212f6dca66b7d5a250f84ba9c8ec6414cf8..e97bd62095c3ce19ee364f4843cb2b731d58af2b 100644
--- a/ios/web/public/test/fakes/crw_test_js_injection_receiver.mm
+++ b/ios/web/public/test/fakes/crw_test_js_injection_receiver.mm
@@ -7,16 +7,18 @@
#import <UIKit/UIKit.h>
#import <WebKit/WebKit.h>
-#import "base/ios/weak_nsobject.h"
-#import "base/mac/scoped_nsobject.h"
#import "ios/web/public/web_state/js/crw_js_injection_evaluator.h"
#import "ios/web/web_state/ui/web_view_js_utils.h"
+#if !defined(__has_feature) || !__has_feature(objc_arc)
+#error "This file requires ARC support."
+#endif
+
@interface CRWTestWKWebViewEvaluator : NSObject<CRWJSInjectionEvaluator> {
// Web view for JavaScript evaluation.
- base::scoped_nsobject<WKWebView> _webView;
+ WKWebView* _webView;
// Set to track injected script managers.
- base::scoped_nsobject<NSMutableSet> _injectedScriptManagers;
+ NSMutableSet* _injectedScriptManagers;
}
@end
@@ -24,8 +26,8 @@
- (instancetype)init {
if (self = [super init]) {
- _webView.reset([[WKWebView alloc] init]);
- _injectedScriptManagers.reset([[NSMutableSet alloc] init]);
+ _webView = [[WKWebView alloc] init];
+ _injectedScriptManagers = [[NSMutableSet alloc] init];
}
return self;
}
@@ -50,17 +52,17 @@
@end
@interface CRWTestJSInjectionReceiver () {
- base::scoped_nsobject<CRWTestWKWebViewEvaluator> evaluator_;
+ CRWTestWKWebViewEvaluator* evaluator_;
}
@end
@implementation CRWTestJSInjectionReceiver
- (id)init {
- base::scoped_nsobject<CRWTestWKWebViewEvaluator> evaluator(
- [[CRWTestWKWebViewEvaluator alloc] init]);
+ CRWTestWKWebViewEvaluator* evaluator =
+ [[CRWTestWKWebViewEvaluator alloc] init];
if (self = [super initWithEvaluator:evaluator])
- evaluator_.swap(evaluator);
+ evaluator_ = evaluator;
return self;
}
« no previous file with comments | « ios/web/public/test/fakes/BUILD.gn ('k') | ios/web/public/test/fakes/crw_test_web_state_observer.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698