Chromium Code Reviews| 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..3a45a25ee2856b3683e052df34f1c5a6236ba66e 100644 |
| --- a/ios/chrome/app/safe_mode/safe_mode_coordinator.mm |
| +++ b/ios/chrome/app/safe_mode/safe_mode_coordinator.mm |
| @@ -4,19 +4,22 @@ |
| #import "ios/chrome/app/safe_mode/safe_mode_coordinator.h" |
|
stkhapugin
2017/05/30 13:36:37
In this header, update:
@property(nonatomic, null
rohitrao (ping after 24h)
2017/05/30 15:05:07
Should the migration tools be updating header file
lindsayw
2017/06/01 15:35:44
Done.
|
| -#include "base/mac/scoped_nsobject.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. |
|
lindsayw
2017/05/19 12:03:07
stk@ Please let me know how you would like these c
stkhapugin
2017/05/30 13:36:37
I'm okay with keeping them as is.
rohitrao (ping after 24h)
2017/05/30 15:05:07
I would just get rid of the comments on lines 19 a
lindsayw
2017/06/01 15:35:44
Done.
|
| - base::WeakNSObject<UIWindow> _window; |
| + __weak UIWindow* _window; |
| // Weak pointer backing property of the same name. |
| - base::WeakNSProtocol<id<SafeModeCoordinatorDelegate>> _delegate; |
| + __weak id<SafeModeCoordinatorDelegate> _delegate; |
|
stkhapugin
2017/05/30 13:36:37
Remove this ivar and put:
@implementation SafeMod
lindsayw
2017/06/01 15:35:44
Done.
|
| } |
| @end |
| @@ -30,7 +33,7 @@ const int kStartupCrashLoopThreshold = 2; |
| } |
| - (void)setDelegate:(id<SafeModeCoordinatorDelegate>)delegate { |
| - _delegate.reset(delegate); |
| + _delegate = delegate; |
|
stkhapugin
2017/05/30 13:36:37
Remove this setter.
lindsayw
2017/06/01 15:35:44
Done.
|
| } |
| #pragma mark - Public class methods |
| @@ -54,8 +57,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 |