| Index: ios/chrome/app/safe_mode/safe_mode_coordinator.mm
|
| diff --git a/ios/chrome/app/safe_mode/safe_mode_coordinator.mm b/ios/chrome/app/safe_mode/safe_mode_coordinator.mm
|
| index a91978506315961044ee12447ef3e2dcae1980bc..c5f8b867be5cf1b7e8e7adeac5147391e8ae144f 100644
|
| --- a/ios/chrome/app/safe_mode/safe_mode_coordinator.mm
|
| +++ b/ios/chrome/app/safe_mode/safe_mode_coordinator.mm
|
| @@ -4,34 +4,26 @@
|
|
|
| #import "ios/chrome/app/safe_mode/safe_mode_coordinator.h"
|
|
|
| -#include "base/mac/scoped_nsobject.h"
|
| +#import "base/logging.h"
|
| #import "ios/chrome/app/safe_mode/safe_mode_view_controller.h"
|
| #include "ios/chrome/browser/crash_loop_detection_util.h"
|
|
|
| +#if !defined(__has_feature) || !__has_feature(objc_arc)
|
| +#error "This file requires ARC support."
|
| +#endif
|
| +
|
| namespace {
|
| const int kStartupCrashLoopThreshold = 2;
|
| }
|
|
|
| -@interface SafeModeCoordinator ()<SafeModeViewControllerDelegate> {
|
| - // Weak pointer to window passed on init.
|
| - base::WeakNSObject<UIWindow> _window;
|
| - // Weak pointer backing property of the same name.
|
| - base::WeakNSProtocol<id<SafeModeCoordinatorDelegate>> _delegate;
|
| -}
|
| -
|
| +@interface SafeModeCoordinator ()<SafeModeViewControllerDelegate>
|
| @end
|
|
|
| -@implementation SafeModeCoordinator
|
| -
|
| -#pragma mark - property implementation.
|
| -
|
| -- (id<SafeModeCoordinatorDelegate>)delegate {
|
| - return _delegate;
|
| +@implementation SafeModeCoordinator {
|
| + __weak UIWindow* _window;
|
| }
|
|
|
| -- (void)setDelegate:(id<SafeModeCoordinatorDelegate>)delegate {
|
| - _delegate.reset(delegate);
|
| -}
|
| +@synthesize delegate = _delegate;
|
|
|
| #pragma mark - Public class methods
|
|
|
| @@ -54,8 +46,8 @@ const int kStartupCrashLoopThreshold = 2;
|
| // General note: Safe mode should be safe; it should not depend on other
|
| // objects being created. Be extremely conservative when adding code to this
|
| // method.
|
| - base::scoped_nsobject<SafeModeViewController> viewController(
|
| - [[SafeModeViewController alloc] initWithDelegate:self]);
|
| + SafeModeViewController* viewController =
|
| + [[SafeModeViewController alloc] initWithDelegate:self];
|
| [self.window setRootViewController:viewController];
|
|
|
| // Reset the crash count; the user may change something based on the recovery
|
|
|