Commit c145105d authored by Ioana Pandele's avatar Ioana Pandele Committed by Commit Bot

Don't update export button if export flag is disabled

This CL fixes a bug that causes a crash when the export feature is disabled.

Bug: 789122, 814574
Cq-Include-Trybots: master.tryserver.chromium.mac:ios-simulator-cronet;master.tryserver.chromium.mac:ios-simulator-full-configs
Change-Id: I19bca436ff86cb93b7b2fea786e8e4dfcb9dd4b9
Reviewed-on: https://chromium-review.googlesource.com/941123Reviewed-by: default avatarSylvain Defresne <sdefresne@chromium.org>
Commit-Queue: Ioana Pandele <ioanap@chromium.org>
Cr-Commit-Position: refs/heads/master@{#539848}
parent 197f46e5
......@@ -632,15 +632,21 @@ void SavePasswordsConsumer::OnGetPasswordStoreResults(
[super collectionViewWillBeginEditing:collectionView];
[self setSavePasswordsSwitchItemEnabled:NO];
[self setExportPasswordsButtonEnabled:NO];
if (base::FeatureList::IsEnabled(
password_manager::features::kPasswordExport)) {
[self setExportPasswordsButtonEnabled:NO];
}
}
- (void)collectionViewWillEndEditing:(UICollectionView*)collectionView {
[super collectionViewWillEndEditing:collectionView];
[self setSavePasswordsSwitchItemEnabled:YES];
if (exportReady_) {
[self setExportPasswordsButtonEnabled:YES];
if (base::FeatureList::IsEnabled(
password_manager::features::kPasswordExport)) {
if (exportReady_) {
[self setExportPasswordsButtonEnabled:YES];
}
}
}
......
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