Commit 3446796a authored by Javier Ernesto Flores Robles's avatar Javier Ernesto Flores Robles Committed by Commit Bot

[iOS][MF] Hides 'show all' chip

Only add "show all" when Manual Fallback is disabled.

Bug: 878388
Cq-Include-Trybots: luci.chromium.try:ios-simulator-cronet;luci.chromium.try:ios-simulator-full-configs
Change-Id: I82a7a9818965716e19c57b78e13f196f52b34088
Reviewed-on: https://chromium-review.googlesource.com/1235673Reviewed-by: default avatarVasilii Sukhanov <vasilii@chromium.org>
Commit-Queue: Javier Ernesto Flores Robles <javierrobles@chromium.org>
Cr-Commit-Position: refs/heads/master@{#593197}
parent d0e0bace
...@@ -21,6 +21,7 @@ ...@@ -21,6 +21,7 @@
#include "base/time/time.h" #include "base/time/time.h"
#include "base/timer/timer.h" #include "base/timer/timer.h"
#include "base/values.h" #include "base/values.h"
#include "components/autofill/core/common/autofill_features.h"
#include "components/autofill/core/common/form_data.h" #include "components/autofill/core/common/form_data.h"
#include "components/autofill/core/common/password_form.h" #include "components/autofill/core/common/password_form.h"
#include "components/autofill/core/common/password_form_fill_data.h" #include "components/autofill/core/common/password_form_fill_data.h"
...@@ -182,14 +183,19 @@ NSArray* BuildSuggestions(const AccountSelectFillData& fillData, ...@@ -182,14 +183,19 @@ NSArray* BuildSuggestions(const AccountSelectFillData& fillData,
} }
} }
// Add "Show all". // Once Manual Fallback is enabled the access to settings will exist as an
NSString* showAll = l10n_util::GetNSString(IDS_IOS_SHOW_ALL_PASSWORDS); // option in the new passwords UI.
[suggestions addObject:[FormSuggestion suggestionWithValue:showAll if (!autofill::features::IsPasswordManualFallbackEnabled()) {
displayDescription:nil // Add "Show all".
icon:nil NSString* showAll = l10n_util::GetNSString(IDS_IOS_SHOW_ALL_PASSWORDS);
identifier:1]]; [suggestions addObject:[FormSuggestion suggestionWithValue:showAll
LogSuggestionShown(suggestion_type); displayDescription:nil
icon:nil
identifier:1]];
}
if (suggestions.count) {
LogSuggestionShown(suggestion_type);
}
return [suggestions copy]; return [suggestions copy];
} }
......
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