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

Side by Side Diff: ios/chrome/app/main_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 unified diff | Download patch
« no previous file with comments | « no previous file | ios/chrome/browser/payments/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #import "ios/chrome/app/main_controller.h" 5 #import "ios/chrome/app/main_controller.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <string> 8 #include <string>
9 9
10 #import <CoreSpotlight/CoreSpotlight.h> 10 #import <CoreSpotlight/CoreSpotlight.h>
(...skipping 1503 matching lines...) Expand 10 before | Expand all | Expand 10 after
1514 break; 1514 break;
1515 case IDC_SHOW_CONTEXTUAL_SEARCH_SETTINGS: 1515 case IDC_SHOW_CONTEXTUAL_SEARCH_SETTINGS:
1516 [self showContextualSearchSettingsController]; 1516 [self showContextualSearchSettingsController];
1517 break; 1517 break;
1518 case IDC_CLOSE_MODALS: 1518 case IDC_CLOSE_MODALS:
1519 [self dismissModalDialogsWithCompletion:nil]; 1519 [self dismissModalDialogsWithCompletion:nil];
1520 break; 1520 break;
1521 case IDC_SHOW_ADD_ACCOUNT: 1521 case IDC_SHOW_ADD_ACCOUNT:
1522 [self showAddAccount]; 1522 [self showAddAccount];
1523 break; 1523 break;
1524 case IDC_SHOW_AUTOFILL_SETTINGS:
1525 [self showAutofillSettings];
1526 break;
1524 default: 1527 default:
1525 // Unknown commands get dropped with a warning. 1528 // Unknown commands get dropped with a warning.
1526 NOTREACHED() << "Unknown command id " << command; 1529 NOTREACHED() << "Unknown command id " << command;
1527 LOG(WARNING) << "Unknown command id " << command; 1530 LOG(WARNING) << "Unknown command id " << command;
1528 break; 1531 break;
1529 } 1532 }
1530 } 1533 }
1531 1534
1532 #pragma mark - chromeExecuteCommand helpers 1535 #pragma mark - chromeExecuteCommand helpers
1533 1536
(...skipping 472 matching lines...) Expand 10 before | Expand all | Expand 10 after
2006 return; 2009 return;
2007 _settingsNavigationController.reset([SettingsNavigationController 2010 _settingsNavigationController.reset([SettingsNavigationController
2008 newSavePasswordsController:_mainBrowserState 2011 newSavePasswordsController:_mainBrowserState
2009 delegate:self]); 2012 delegate:self]);
2010 [[self topPresentedViewController] 2013 [[self topPresentedViewController]
2011 presentViewController:_settingsNavigationController 2014 presentViewController:_settingsNavigationController
2012 animated:YES 2015 animated:YES
2013 completion:nil]; 2016 completion:nil];
2014 } 2017 }
2015 2018
2019 - (void)showAutofillSettings {
2020 if (_settingsNavigationController)
2021 return;
2022 _settingsNavigationController.reset([SettingsNavigationController
2023 newAutofillController:_mainBrowserState
2024 delegate:self]);
2025 [[self topPresentedViewController]
2026 presentViewController:_settingsNavigationController
2027 animated:YES
2028 completion:nil];
2029 }
2030
2016 - (void)showReportAnIssue { 2031 - (void)showReportAnIssue {
2017 if (_settingsNavigationController) 2032 if (_settingsNavigationController)
2018 return; 2033 return;
2019 _settingsNavigationController.reset([SettingsNavigationController 2034 _settingsNavigationController.reset([SettingsNavigationController
2020 newUserFeedbackController:_mainBrowserState 2035 newUserFeedbackController:_mainBrowserState
2021 delegate:self 2036 delegate:self
2022 feedbackDataSource:self]); 2037 feedbackDataSource:self]);
2023 [[self topPresentedViewController] 2038 [[self topPresentedViewController]
2024 presentViewController:_settingsNavigationController 2039 presentViewController:_settingsNavigationController
2025 animated:YES 2040 animated:YES
(...skipping 572 matching lines...) Expand 10 before | Expand all | Expand 10 after
2598 }; 2613 };
2599 2614
2600 callbackCounter->IncrementCount(); 2615 callbackCounter->IncrementCount();
2601 [self removeBrowsingDataFromBrowserState:_mainBrowserState 2616 [self removeBrowsingDataFromBrowserState:_mainBrowserState
2602 mask:removeAllMask 2617 mask:removeAllMask
2603 timePeriod:browsing_data::TimePeriod::ALL_TIME 2618 timePeriod:browsing_data::TimePeriod::ALL_TIME
2604 completionHandler:decrementCallbackCounterCount]; 2619 completionHandler:decrementCallbackCounterCount];
2605 } 2620 }
2606 2621
2607 @end 2622 @end
OLDNEW
« no previous file with comments | « no previous file | ios/chrome/browser/payments/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698