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

Unified Diff: ios/chrome/browser/ui/history/history_search_view_controller.mm

Issue 2624963003: [ObjC ARC] Converts ios/chrome/browser/ui/history:history to ARC. (Closed)
Patch Set: Removes the rest of weak and scoped nsobjects. Created 3 years, 11 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
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];
« no previous file with comments | « ios/chrome/browser/ui/history/history_search_view.mm ('k') | ios/chrome/browser/ui/history/history_service_facade.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698