Index: ios/chrome/browser/ui/history/history_search_view_controller.mm |
diff --git a/ios/chrome/browser/ui/history/history_search_view_controller.mm b/ios/chrome/browser/ui/history/history_search_view_controller.mm |
index 5d30562461508011877ee3f429d31d25d5f0d12b..653e5b74c761fe5c271db7596c768a75d3f90396 100644 |
--- a/ios/chrome/browser/ui/history/history_search_view_controller.mm |
+++ b/ios/chrome/browser/ui/history/history_search_view_controller.mm |
@@ -4,15 +4,15 @@ |
#import "ios/chrome/browser/ui/history/history_search_view_controller.h" |
-#include "base/ios/weak_nsobject.h" |
-#include "base/mac/scoped_nsobject.h" |
#import "ios/chrome/browser/ui/history/history_search_view.h" |
+#if !defined(__has_feature) || !__has_feature(objc_arc) |
+#error "This file requires ARC support." |
+#endif |
+ |
@interface HistorySearchViewController ()<UITextFieldDelegate> { |
- // Delegate for forwarding interactions with the search view. |
- base::WeakNSProtocol<id<HistorySearchViewControllerDelegate>> _delegate; |
// View displayed by the HistorySearchViewController |
- base::scoped_nsobject<HistorySearchView> _searchView; |
+ HistorySearchView* _searchView; |
} |
// Action for the cancel button. |
@@ -21,11 +21,11 @@ |
@end |
@implementation HistorySearchViewController |
- |
+@synthesize delegate = _delegate; |
@synthesize enabled = _enabled; |
- (void)loadView { |
- _searchView.reset([[HistorySearchView alloc] init]); |
+ _searchView = [[HistorySearchView alloc] init]; |
[_searchView setSearchBarDelegate:self]; |
[_searchView setCancelTarget:self action:@selector(cancelButtonClicked:)]; |
self.view = _searchView; |
@@ -36,14 +36,6 @@ |
[_searchView becomeFirstResponder]; |
} |
-- (void)setDelegate:(id<HistorySearchViewControllerDelegate>)delegate { |
- _delegate.reset(delegate); |
-} |
- |
-- (id<HistorySearchViewControllerDelegate>)delegate { |
- return _delegate; |
-} |
- |
- (void)setEnabled:(BOOL)enabled { |
_enabled = enabled; |
[_searchView setEnabled:enabled]; |