Commit 96b7e77a authored by Vasilii Sukhanov's avatar Vasilii Sukhanov Committed by Commit Bot

Add "Manage passwords" to the passwords drop-down.

- "Use password for:" title isn't used anymore in the password dropdown.
- The dropdown should have a footer "Manage passwords" leading to the settings.

Bug: 851021
Change-Id: I24696fffa7c2db7bc21c6b9ec7fcb3aa9c277429
Reviewed-on: https://chromium-review.googlesource.com/1125061
Commit-Queue: Vasilii Sukhanov <vasilii@chromium.org>
Reviewed-by: default avatarBret Sepulveda <bsep@chromium.org>
Reviewed-by: default avatarVaclav Brozek <vabr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#572533}
parent de8f7d88
......@@ -3374,12 +3374,6 @@ const FeatureEntry kFeatureEntries[] = {
FEATURE_VALUE_TYPE(chrome::android::kPwaPersistentNotification)},
#endif // OS_ANDROID
{"enable-manual-fallbacks-filling",
flag_descriptions::kEnableManualFallbacksFillingName,
flag_descriptions::kEnableManualFallbacksFillingDescription,
kOsDesktop | kOsAndroid,
FEATURE_VALUE_TYPE(password_manager::features::kManualFallbacksFilling)},
#if !defined(OS_ANDROID)
{"voice-search-on-local-ntp", flag_descriptions::kVoiceSearchOnLocalNtpName,
flag_descriptions::kVoiceSearchOnLocalNtpDescription, kOsDesktop,
......
......@@ -542,13 +542,6 @@ const char kEnableMacMaterialDesignDownloadShelfName[] =
const char kEnableMacMaterialDesignDownloadShelfDescription[] =
"If enabled, the download shelf uses Material Design.";
const char kEnableManualFallbacksFillingName[] =
"Manual fallbacks for password manager forms filling";
const char kEnableManualFallbacksFillingDescription[] =
"If enabled, then if user clicks on the password field on a form, popup "
"might contain generation fallbacks or 'Show all saved passwords' "
"fallback.";
const char kEnablePolicyToolName[] = "Enable policy management page";
const char kEnablePolicyToolDescription[] =
"If enabled, the chrome://policy-tool URL loads a page for managing "
......
......@@ -359,9 +359,6 @@ extern const char kEnableLazyFrameLoadingDescription[];
extern const char kEnableMacMaterialDesignDownloadShelfName[];
extern const char kEnableMacMaterialDesignDownloadShelfDescription[];
extern const char kEnableManualFallbacksFillingName[];
extern const char kEnableManualFallbacksFillingDescription[];
extern const char kEnableMaterialDesignBookmarksName[];
extern const char kEnableMaterialDesignBookmarksDescription[];
......@@ -647,9 +644,6 @@ extern const char kLoadMediaRouterComponentExtensionDescription[];
extern const char kMacViewsAutofillPopupName[];
extern const char kMacViewsAutofillPopupDescription[];
extern const char kManualPasswordGenerationName[];
extern const char kManualPasswordGenerationDescription[];
extern const char kMarkHttpAsName[];
extern const char kMarkHttpAsDescription[];
extern const char kMarkHttpAsDangerous[];
......
......@@ -490,7 +490,8 @@ void AutofillPopupViewNativeViews::CreateChildViews() {
item_id == autofill::PopupItemId::POPUP_ITEM_ID_AUTOFILL_OPTIONS ||
item_id == autofill::PopupItemId::POPUP_ITEM_ID_SCAN_CREDIT_CARD ||
item_id ==
autofill::PopupItemId::POPUP_ITEM_ID_CREDIT_CARD_SIGNIN_PROMO) {
autofill::PopupItemId::POPUP_ITEM_ID_CREDIT_CARD_SIGNIN_PROMO ||
item_id == POPUP_ITEM_ID_ALL_SAVED_PASSWORDS_ENTRY) {
// This is a footer, so this suggestion will be processed later. Don't
// increment |line_number|, or else it will be skipped when adding footer
// rows below.
......
......@@ -153,10 +153,6 @@
Scan new card
</message>
<message name="IDS_AUTOFILL_PASSWORD_FIELD_SUGGESTIONS_TITLE" desc="Text shown as the title of the suggestion drop down when a password field is clicked.">
Use password for:
</message>
<if expr="not use_titlecase">
<message name="IDS_AUTOFILL_SHOW_ALL_SAVED_FALLBACK" desc="The text shown as an option in the suggestion drop down when a password field is clicked">
Show all saved passwords
......
......@@ -141,20 +141,6 @@ bool ShouldShowManualFallbackForPreLollipop(syncer::SyncService* sync_service) {
#endif
}
void AddSimpleSuggestionWithSeparatorOnTop(
int value,
int frontend_id,
std::vector<autofill::Suggestion>* suggestions) {
#if !defined(OS_ANDROID)
suggestions->push_back(autofill::Suggestion());
suggestions->back().frontend_id = autofill::POPUP_ITEM_ID_SEPARATOR;
#endif
autofill::Suggestion suggestion(l10n_util::GetStringUTF8(value),
std::string(), std::string(), frontend_id);
suggestions->push_back(suggestion);
}
} // namespace
////////////////////////////////////////////////////////////////////////////////
......@@ -241,24 +227,17 @@ void PasswordAutofillManager::OnShowPasswordSuggestions(
return;
}
if (options & autofill::IS_PASSWORD_FIELD) {
autofill::Suggestion password_field_suggestions(l10n_util::GetStringUTF16(
IDS_AUTOFILL_PASSWORD_FIELD_SUGGESTIONS_TITLE));
password_field_suggestions.frontend_id = autofill::POPUP_ITEM_ID_TITLE;
suggestions.insert(suggestions.begin(), password_field_suggestions);
}
GURL origin = (fill_data_it->second).origin;
GURL origin = fill_data_it->second.origin;
if (ShouldShowManualFallbackForPreLollipop(
autofill_client_->GetSyncService())) {
if (base::FeatureList::IsEnabled(
password_manager::features::kManualFallbacksFilling) &&
(options & autofill::IS_PASSWORD_FIELD) && password_client_ &&
if (password_client_ &&
password_client_->IsFillingFallbackEnabledForCurrentPage()) {
AddSimpleSuggestionWithSeparatorOnTop(
IDS_AUTOFILL_SHOW_ALL_SAVED_FALLBACK,
autofill::POPUP_ITEM_ID_ALL_SAVED_PASSWORDS_ENTRY, &suggestions);
autofill::Suggestion suggestion(
l10n_util::GetStringUTF8(IDS_PASSWORD_MANAGER_MANAGE_PASSWORDS),
std::string(), std::string(),
autofill::POPUP_ITEM_ID_ALL_SAVED_PASSWORDS_ENTRY);
suggestions.push_back(suggestion);
show_all_saved_passwords_shown_context_ =
metrics_util::SHOW_ALL_SAVED_PASSWORDS_CONTEXT_PASSWORD;
......
......@@ -23,11 +23,6 @@ const base::Feature kAutofillHome = {"AutofillHome",
const base::Feature kHtmlBasedUsernameDetector = {
"HtmlBaseUsernameDetector", base::FEATURE_ENABLED_BY_DEFAULT};
// Enable additional elements in the form popup UI, which will allow the user to
// view all saved passwords.
const base::Feature kManualFallbacksFilling = {
"ManualFallbacksFilling", base::FEATURE_DISABLED_BY_DEFAULT};
// Enable a standalone popup UI, which will allow the user to view all saved
// passwords.
const base::Feature kManualFallbacksFillingStandalone = {
......@@ -38,10 +33,6 @@ const base::Feature kManualFallbacksFillingStandalone = {
const base::Feature kPasswordForceSaving = {
"PasswordForceSaving", base::FEATURE_DISABLED_BY_DEFAULT};
// Enable the user to trigger password generation manually.
const base::Feature kManualPasswordGeneration = {
"manual-password-generation", base::FEATURE_ENABLED_BY_DEFAULT};
// Controls the ability to generate passwords that fit sites' requirements.
const base::Feature kPasswordGenerationRequirements = {
"PasswordGenerationRequirements", base::FEATURE_ENABLED_BY_DEFAULT};
......
......@@ -20,9 +20,7 @@ namespace features {
extern const base::Feature kAffiliationBasedMatching;
extern const base::Feature kAutofillHome;
extern const base::Feature kHtmlBasedUsernameDetector;
extern const base::Feature kManualFallbacksFilling;
extern const base::Feature kManualFallbacksFillingStandalone;
extern const base::Feature kManualPasswordGeneration;
extern const base::Feature kPasswordGenerationRequirements;
extern const base::Feature kPasswordGenerationRequirementsDomainOverrides;
extern const base::Feature kPasswordForceSaving;
......
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