Commit 37318bb2 authored by sczs's avatar sczs Committed by Commit Bot

[ios] Checks Class type for presented Settings VC.

Since some VC's presented by SettingsNavigationController might not be
a SettingsRootTableViewController (e.g. GFBFeedbackViewController) this
CL sets currentPresentedSettingsViewController to nil if this case is true.

Bug: 980037
Change-Id: I5771c27c66820769756ba64b05354b13592e43b0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1807024
Commit-Queue: Sergio Collazos <sczs@chromium.org>
Reviewed-by: default avatarKurt Horimoto <kkhorimoto@chromium.org>
Cr-Commit-Position: refs/heads/master@{#696900}
parent 016ad08a
...@@ -47,7 +47,9 @@ NSString* const kSettingsDoneButtonId = @"kSettingsDoneButtonId"; ...@@ -47,7 +47,9 @@ NSString* const kSettingsDoneButtonId = @"kSettingsDoneButtonId";
@property(nonatomic, strong) @property(nonatomic, strong)
GoogleServicesSettingsCoordinator* googleServicesSettingsCoordinator; GoogleServicesSettingsCoordinator* googleServicesSettingsCoordinator;
// Current ViewController being presented by this Navigation Controller. // Current SettingsViewController being presented by this Navigation Controller.
// If nil it means the Navigation Controller is not presenting anything, or the
// VC being presented is not a SettingsRootTableViewController.
@property(nonatomic, weak) @property(nonatomic, weak)
SettingsRootTableViewController* currentPresentedSettingsViewController; SettingsRootTableViewController* currentPresentedSettingsViewController;
...@@ -404,8 +406,7 @@ initWithRootViewController:(UIViewController*)rootViewController ...@@ -404,8 +406,7 @@ initWithRootViewController:(UIViewController*)rootViewController
willShowViewController:(UIViewController*)viewController willShowViewController:(UIViewController*)viewController
animated:(BOOL)animated { animated:(BOOL)animated {
self.currentPresentedSettingsViewController = self.currentPresentedSettingsViewController =
base::mac::ObjCCastStrict<SettingsRootTableViewController>( base::mac::ObjCCast<SettingsRootTableViewController>(viewController);
viewController);
} }
#pragma mark - UIResponder #pragma mark - UIResponder
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment