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

Unified Diff: ios/chrome/app/chrome_overlay_window.mm

Issue 2933823002: [ObjC ARC] Converts ios/chrome/app:app_internal to ARC. (Closed)
Patch Set: Rebased Created 3 years, 6 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/app/chrome_app_startup_parameters.mm ('k') | ios/chrome/app/main_application_delegate.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/chrome/app/chrome_overlay_window.mm
diff --git a/ios/chrome/app/chrome_overlay_window.mm b/ios/chrome/app/chrome_overlay_window.mm
index 7962b2088c416060be5fd2d230b8a100150cacd9..529f11462471784b3e7069f2c4f3495a605a43ee 100644
--- a/ios/chrome/app/chrome_overlay_window.mm
+++ b/ios/chrome/app/chrome_overlay_window.mm
@@ -5,14 +5,17 @@
#import "ios/chrome/app/chrome_overlay_window.h"
#include "base/logging.h"
-#import "base/mac/scoped_nsobject.h"
#import "ios/chrome/browser/crash_report/breakpad_helper.h"
#import "ios/chrome/browser/metrics/size_class_recorder.h"
#import "ios/chrome/browser/tabs/tab_model.h"
#import "ios/chrome/browser/ui/ui_util.h"
+#if !defined(__has_feature) || !__has_feature(objc_arc)
+#error "This file requires ARC support."
+#endif
+
@interface ChromeOverlayWindow () {
- base::scoped_nsobject<SizeClassRecorder> _recorder;
+ SizeClassRecorder* _recorder;
}
// Initializes the size class recorder. On iPad iOS 9+, it starts tracking
@@ -48,8 +51,8 @@
- (void)initializeRecorderIfNeeded {
DCHECK(!_recorder);
if (IsIPadIdiom()) {
- _recorder.reset([[SizeClassRecorder alloc]
- initWithHorizontalSizeClass:self.traitCollection.horizontalSizeClass]);
+ _recorder = [[SizeClassRecorder alloc]
+ initWithHorizontalSizeClass:self.traitCollection.horizontalSizeClass];
[[NSNotificationCenter defaultCenter]
addObserver:self
selector:@selector(pageLoaded:)
@@ -65,7 +68,6 @@
- (void)dealloc {
[[NSNotificationCenter defaultCenter] removeObserver:self];
- [super dealloc];
}
#pragma mark - UITraitEnvironment
@@ -90,7 +92,7 @@
#pragma mark - Testing methods
- (void)unsetSizeClassRecorder {
- _recorder.reset();
+ _recorder = nil;
}
@end
« no previous file with comments | « ios/chrome/app/chrome_app_startup_parameters.mm ('k') | ios/chrome/app/main_application_delegate.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698