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

Unified Diff: ios/chrome/browser/ui/util/snapshot_util.mm

Issue 2819283004: [ObjC ARC] Converts ios/chrome/browser/ui/util:util to ARC. (Closed)
Patch Set: Fix copy for block 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/util/snapshot_util.mm
diff --git a/ios/chrome/browser/ui/util/snapshot_util.mm b/ios/chrome/browser/ui/util/snapshot_util.mm
index e058d9ba7daa5263d002e5a03fc42d8e950e173a..cf0c5119edbf171b48c00c89acfad6a6c2deb37c 100644
--- a/ios/chrome/browser/ui/util/snapshot_util.mm
+++ b/ios/chrome/browser/ui/util/snapshot_util.mm
@@ -4,6 +4,10 @@
#import "ios/chrome/browser/ui/util/snapshot_util.h"
+#if !defined(__has_feature) || !__has_feature(objc_arc)
+#error "This file requires ARC support."
+#endif
+
namespace snapshot_util {
UIView* GenerateSnapshot(UIView* view) {
@@ -16,7 +20,7 @@ UIView* GenerateSnapshot(UIView* view) {
[view.layer renderInContext:UIGraphicsGetCurrentContext()];
UIImage* screenshot = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
- snapshot = [[[UIView alloc] initWithFrame:CGRectZero] autorelease];
+ snapshot = [[UIView alloc] initWithFrame:CGRectZero];
snapshot.layer.contents = static_cast<id>(screenshot.CGImage);
}
return snapshot;

Powered by Google App Engine
This is Rietveld 408576698