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

Unified Diff: ios/chrome/browser/ui/contextual_search/contextual_search_highlighter_view.mm

Issue 2824493002: Reland of [ObjC ARC] Converts ios/chrome/browser/ui/contextual_search:contextual_search to ARC. (Closed)
Patch Set: fix test Created 3 years, 8 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/contextual_search/contextual_search_highlighter_view.mm
diff --git a/ios/chrome/browser/ui/contextual_search/contextual_search_highlighter_view.mm b/ios/chrome/browser/ui/contextual_search/contextual_search_highlighter_view.mm
index 74610013e06521da21dc1227d590499723dfc70f..bbc9ad81b17b6ff75323944d3622c2ac70ca273f 100644
--- a/ios/chrome/browser/ui/contextual_search/contextual_search_highlighter_view.mm
+++ b/ios/chrome/browser/ui/contextual_search/contextual_search_highlighter_view.mm
@@ -5,9 +5,12 @@
#import "ios/chrome/browser/ui/contextual_search/contextual_search_highlighter_view.h"
#include "base/logging.h"
-#import "base/mac/scoped_nsobject.h"
#import "ios/chrome/browser/ui/contextual_search/contextual_search_controller.h"
+#if !defined(__has_feature) || !__has_feature(objc_arc)
+#error "This file requires ARC support."
+#endif
+
@implementation ContextualSearchHighlighterView {
// Store size of the container view. If size change, text layout will likely
// change and should be updated.
@@ -18,7 +21,7 @@
CGFloat _zoom;
CGFloat _offset;
- __unsafe_unretained id<ContextualSearchHighlighterDelegate> _delegate;
+ __weak id<ContextualSearchHighlighterDelegate> _delegate;
}
- (instancetype)initWithFrame:(CGRect)frame
@@ -70,7 +73,7 @@
rect.size.height *= zoom;
rect.origin.x -= scroll.x;
rect.origin.y += offset - scroll.y;
- UIView* view = [[[UIView alloc] initWithFrame:rect] autorelease];
+ UIView* view = [[UIView alloc] initWithFrame:rect];
[self addSubview:view];
view.backgroundColor =
[UIColor colorWithRed:0.67 green:0.88 blue:0.96 alpha:0.6];

Powered by Google App Engine
This is Rietveld 408576698