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

Unified Diff: ios/chrome/browser/ui/settings/settings_navigation_controller.mm

Issue 2804853002: Cancels payment request when Settings is tapped, and opens the Autofill settings page. (Closed)
Patch Set: Remove more strongSelf checks. 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/settings/settings_navigation_controller.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/chrome/browser/ui/settings/settings_navigation_controller.mm
diff --git a/ios/chrome/browser/ui/settings/settings_navigation_controller.mm b/ios/chrome/browser/ui/settings/settings_navigation_controller.mm
index 035118eae4e36ea24f3b26d5bfbb960d399a6520..9f7b5db3e61bb1f8d78401b73f278358bada50b5 100644
--- a/ios/chrome/browser/ui/settings/settings_navigation_controller.mm
+++ b/ios/chrome/browser/ui/settings/settings_navigation_controller.mm
@@ -21,6 +21,7 @@
#import "ios/chrome/browser/ui/material_components/app_bar_presenting.h"
#import "ios/chrome/browser/ui/material_components/utils.h"
#import "ios/chrome/browser/ui/settings/accounts_collection_view_controller.h"
+#import "ios/chrome/browser/ui/settings/autofill_collection_view_controller.h"
#import "ios/chrome/browser/ui/settings/clear_browsing_data_collection_view_controller.h"
#import "ios/chrome/browser/ui/settings/contextual_search_collection_view_controller.h"
#import "ios/chrome/browser/ui/settings/import_data_collection_view_controller.h"
@@ -282,6 +283,25 @@ newImportDataController:(ios::ChromeBrowserState*)browserState
return nc;
}
++ (SettingsNavigationController*)
+newAutofillController:(ios::ChromeBrowserState*)browserState
+ delegate:(id<SettingsNavigationControllerDelegate>)delegate {
+ base::scoped_nsobject<UIViewController> controller(
+ [[AutofillCollectionViewController alloc]
+ initWithBrowserState:browserState]);
+
+ SettingsNavigationController* nc = [[SettingsNavigationController alloc]
+ initWithRootViewController:controller
+ browserState:browserState
+ delegate:delegate];
+ [controller navigationItem].rightBarButtonItem = [nc doneButton];
+
+ // Make sure the close button is always present, as the Autofill screen
+ // isn't just shown from Settings.
+ [controller navigationItem].leftBarButtonItem = [nc closeButton];
+ return nc;
+}
+
#pragma mark - Lifecycle
- (instancetype)
« no previous file with comments | « ios/chrome/browser/ui/settings/settings_navigation_controller.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698