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

Unified Diff: ios/chrome/browser/find_in_page/find_in_page_model.mm

Issue 2524383002: [ObjC ARC] Converts ios/chrome/browser/find_in_page:find_in_page to ARC.Automatically generated A… (Closed)
Patch Set: qwer Created 4 years, 1 month 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/find_in_page/find_in_page_model.mm
diff --git a/ios/chrome/browser/find_in_page/find_in_page_model.mm b/ios/chrome/browser/find_in_page/find_in_page_model.mm
index 8cc3ec44b081a6739852e742d083584144a602e3..1f90f2972ace26300ac2b07ec43cf6230b9c8906 100644
--- a/ios/chrome/browser/find_in_page/find_in_page_model.mm
+++ b/ios/chrome/browser/find_in_page/find_in_page_model.mm
@@ -4,20 +4,21 @@
#import "ios/chrome/browser/find_in_page/find_in_page_model.h"
-#include "base/mac/scoped_nsobject.h"
+#if !defined(__has_feature) || !__has_feature(objc_arc)
+#error "This file requires ARC support."
+#endif
-@implementation FindInPageModel {
- base::scoped_nsobject<NSString> _text;
-}
+@interface FindInPageModel ()
+// Redefined as readwrite.
+@property(copy, nonatomic, readwrite) NSString* text;
+@end
+@implementation FindInPageModel
@synthesize enabled = _enabled;
@synthesize matches = _matches;
@synthesize currentIndex = _currentIndex;
@synthesize currentPoint = _currentPoint;
-
-- (NSString*)text {
- return _text;
-}
+@synthesize text = _text;
- (void)setEnabled:(BOOL)enabled {
_enabled = enabled;
@@ -28,7 +29,7 @@
- (void)updateQuery:(NSString*)query matches:(NSUInteger)matches {
if (query)
- _text.reset([query copy]);
+ self.text = query;
_matches = matches;
_currentIndex = 0;
}
« no previous file with comments | « ios/chrome/browser/find_in_page/find_in_page_model.h ('k') | ios/chrome/browser/find_in_page/js_findinpage_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698