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

Unified Diff: ios/chrome/browser/ui/page_not_available_controller.mm

Issue 2804703002: [ObjC ARC] Converts ios/chrome/browser/ui:ui_internal_arc to ARC. (Closed)
Patch Set: comments 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
« no previous file with comments | « ios/chrome/browser/ui/page_not_available_controller.h ('k') | ios/chrome/browser/ui/preload_controller.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/chrome/browser/ui/page_not_available_controller.mm
diff --git a/ios/chrome/browser/ui/page_not_available_controller.mm b/ios/chrome/browser/ui/page_not_available_controller.mm
index b655777baa0a726729aa3b503770e527e2d5cb01..ec4d6eea6c640976d1945644311c902f37fcd869 100644
--- a/ios/chrome/browser/ui/page_not_available_controller.mm
+++ b/ios/chrome/browser/ui/page_not_available_controller.mm
@@ -6,8 +6,7 @@
#include "base/i18n/rtl.h"
#include "base/logging.h"
-#include "base/mac/objc_property_releaser.h"
-#include "base/mac/scoped_nsobject.h"
+
#include "base/strings/sys_string_conversions.h"
#include "base/strings/utf_string_conversions.h"
#include "components/strings/grit/components_strings.h"
@@ -15,6 +14,10 @@
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/l10n/l10n_util_mac.h"
+#if !defined(__has_feature) || !__has_feature(objc_arc)
+#error "This file requires ARC support."
+#endif
+
namespace {
// Top padding for |self.titleLabel|.
const CGFloat kTitleLabelTopPadding = 20.0;
@@ -33,14 +36,13 @@ const CGFloat kDescriptionViewFontSize = 17.0;
}
@interface PageNotAvailableController () {
- base::mac::ObjCPropertyReleaser _propertyReleaser_PageNotAvailableController;
}
// The title label displayed centered at the top of the screen.
-@property(nonatomic, retain) UILabel* titleLabel;
+@property(nonatomic, strong) UILabel* titleLabel;
// TextView containing a detailed description of the problem.
-@property(nonatomic, retain) UITextView* descriptionView;
+@property(nonatomic, strong) UITextView* descriptionView;
@end
@@ -53,9 +55,6 @@ const CGFloat kDescriptionViewFontSize = 17.0;
- (instancetype)initWithUrl:(const GURL&)url {
self = [super initWithNibName:nil url:url];
if (self) {
- _propertyReleaser_PageNotAvailableController.Init(
- self, [PageNotAvailableController class]);
-
// Use the host as the page title, unless the URL has a custom scheme.
if (self.url.SchemeIsHTTPOrHTTPS()) {
self.title = base::SysUTF16ToNSString(
@@ -72,8 +71,7 @@ const CGFloat kDescriptionViewFontSize = 17.0;
// |self.view| setup.
CGRect windowBounds = [UIApplication sharedApplication].keyWindow.bounds;
- base::scoped_nsobject<UIView> view(
- [[UIView alloc] initWithFrame:windowBounds]);
+ UIView* view = [[UIView alloc] initWithFrame:windowBounds];
[view setBackgroundColor:[UIColor whiteColor]];
[view setAutoresizingMask:(UIViewAutoresizingFlexibleWidth |
UIViewAutoresizingFlexibleHeight)];
@@ -123,8 +121,8 @@ const CGFloat kDescriptionViewFontSize = 17.0;
}
- (void)setDescriptionText:(NSString*)descriptionText {
- _descriptionText = descriptionText;
- _descriptionView.text = descriptionText;
+ _descriptionText = [descriptionText copy];
+ _descriptionView.text = _descriptionText;
}
@end
« no previous file with comments | « ios/chrome/browser/ui/page_not_available_controller.h ('k') | ios/chrome/browser/ui/preload_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698