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[] = { ...@@ -3374,12 +3374,6 @@ const FeatureEntry kFeatureEntries[] = {
FEATURE_VALUE_TYPE(chrome::android::kPwaPersistentNotification)}, FEATURE_VALUE_TYPE(chrome::android::kPwaPersistentNotification)},
#endif // OS_ANDROID #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) #if !defined(OS_ANDROID)
{"voice-search-on-local-ntp", flag_descriptions::kVoiceSearchOnLocalNtpName, {"voice-search-on-local-ntp", flag_descriptions::kVoiceSearchOnLocalNtpName,
flag_descriptions::kVoiceSearchOnLocalNtpDescription, kOsDesktop, flag_descriptions::kVoiceSearchOnLocalNtpDescription, kOsDesktop,
......
...@@ -542,13 +542,6 @@ const char kEnableMacMaterialDesignDownloadShelfName[] = ...@@ -542,13 +542,6 @@ const char kEnableMacMaterialDesignDownloadShelfName[] =
const char kEnableMacMaterialDesignDownloadShelfDescription[] = const char kEnableMacMaterialDesignDownloadShelfDescription[] =
"If enabled, the download shelf uses Material Design."; "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 kEnablePolicyToolName[] = "Enable policy management page";
const char kEnablePolicyToolDescription[] = const char kEnablePolicyToolDescription[] =
"If enabled, the chrome://policy-tool URL loads a page for managing " "If enabled, the chrome://policy-tool URL loads a page for managing "
......
...@@ -359,9 +359,6 @@ extern const char kEnableLazyFrameLoadingDescription[]; ...@@ -359,9 +359,6 @@ extern const char kEnableLazyFrameLoadingDescription[];
extern const char kEnableMacMaterialDesignDownloadShelfName[]; extern const char kEnableMacMaterialDesignDownloadShelfName[];
extern const char kEnableMacMaterialDesignDownloadShelfDescription[]; extern const char kEnableMacMaterialDesignDownloadShelfDescription[];
extern const char kEnableManualFallbacksFillingName[];
extern const char kEnableManualFallbacksFillingDescription[];
extern const char kEnableMaterialDesignBookmarksName[]; extern const char kEnableMaterialDesignBookmarksName[];
extern const char kEnableMaterialDesignBookmarksDescription[]; extern const char kEnableMaterialDesignBookmarksDescription[];
...@@ -647,9 +644,6 @@ extern const char kLoadMediaRouterComponentExtensionDescription[]; ...@@ -647,9 +644,6 @@ extern const char kLoadMediaRouterComponentExtensionDescription[];
extern const char kMacViewsAutofillPopupName[]; extern const char kMacViewsAutofillPopupName[];
extern const char kMacViewsAutofillPopupDescription[]; extern const char kMacViewsAutofillPopupDescription[];
extern const char kManualPasswordGenerationName[];
extern const char kManualPasswordGenerationDescription[];
extern const char kMarkHttpAsName[]; extern const char kMarkHttpAsName[];
extern const char kMarkHttpAsDescription[]; extern const char kMarkHttpAsDescription[];
extern const char kMarkHttpAsDangerous[]; extern const char kMarkHttpAsDangerous[];
......
...@@ -490,7 +490,8 @@ void AutofillPopupViewNativeViews::CreateChildViews() { ...@@ -490,7 +490,8 @@ void AutofillPopupViewNativeViews::CreateChildViews() {
item_id == autofill::PopupItemId::POPUP_ITEM_ID_AUTOFILL_OPTIONS || 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_SCAN_CREDIT_CARD ||
item_id == 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 // 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 // increment |line_number|, or else it will be skipped when adding footer
// rows below. // rows below.
......
...@@ -153,10 +153,6 @@ ...@@ -153,10 +153,6 @@
Scan new card Scan new card
</message> </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"> <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"> <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 Show all saved passwords
......
...@@ -141,20 +141,6 @@ bool ShouldShowManualFallbackForPreLollipop(syncer::SyncService* sync_service) { ...@@ -141,20 +141,6 @@ bool ShouldShowManualFallbackForPreLollipop(syncer::SyncService* sync_service) {
#endif #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 } // namespace
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
...@@ -241,24 +227,17 @@ void PasswordAutofillManager::OnShowPasswordSuggestions( ...@@ -241,24 +227,17 @@ void PasswordAutofillManager::OnShowPasswordSuggestions(
return; return;
} }
if (options & autofill::IS_PASSWORD_FIELD) { GURL origin = fill_data_it->second.origin;
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;
if (ShouldShowManualFallbackForPreLollipop( if (ShouldShowManualFallbackForPreLollipop(
autofill_client_->GetSyncService())) { autofill_client_->GetSyncService())) {
if (base::FeatureList::IsEnabled( if (password_client_ &&
password_manager::features::kManualFallbacksFilling) &&
(options & autofill::IS_PASSWORD_FIELD) && password_client_ &&
password_client_->IsFillingFallbackEnabledForCurrentPage()) { password_client_->IsFillingFallbackEnabledForCurrentPage()) {
AddSimpleSuggestionWithSeparatorOnTop( autofill::Suggestion suggestion(
IDS_AUTOFILL_SHOW_ALL_SAVED_FALLBACK, l10n_util::GetStringUTF8(IDS_PASSWORD_MANAGER_MANAGE_PASSWORDS),
autofill::POPUP_ITEM_ID_ALL_SAVED_PASSWORDS_ENTRY, &suggestions); std::string(), std::string(),
autofill::POPUP_ITEM_ID_ALL_SAVED_PASSWORDS_ENTRY);
suggestions.push_back(suggestion);
show_all_saved_passwords_shown_context_ = show_all_saved_passwords_shown_context_ =
metrics_util::SHOW_ALL_SAVED_PASSWORDS_CONTEXT_PASSWORD; metrics_util::SHOW_ALL_SAVED_PASSWORDS_CONTEXT_PASSWORD;
......
...@@ -23,11 +23,6 @@ const base::Feature kAutofillHome = {"AutofillHome", ...@@ -23,11 +23,6 @@ const base::Feature kAutofillHome = {"AutofillHome",
const base::Feature kHtmlBasedUsernameDetector = { const base::Feature kHtmlBasedUsernameDetector = {
"HtmlBaseUsernameDetector", base::FEATURE_ENABLED_BY_DEFAULT}; "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 // Enable a standalone popup UI, which will allow the user to view all saved
// passwords. // passwords.
const base::Feature kManualFallbacksFillingStandalone = { const base::Feature kManualFallbacksFillingStandalone = {
...@@ -38,10 +33,6 @@ const base::Feature kManualFallbacksFillingStandalone = { ...@@ -38,10 +33,6 @@ const base::Feature kManualFallbacksFillingStandalone = {
const base::Feature kPasswordForceSaving = { const base::Feature kPasswordForceSaving = {
"PasswordForceSaving", base::FEATURE_DISABLED_BY_DEFAULT}; "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. // Controls the ability to generate passwords that fit sites' requirements.
const base::Feature kPasswordGenerationRequirements = { const base::Feature kPasswordGenerationRequirements = {
"PasswordGenerationRequirements", base::FEATURE_ENABLED_BY_DEFAULT}; "PasswordGenerationRequirements", base::FEATURE_ENABLED_BY_DEFAULT};
......
...@@ -20,9 +20,7 @@ namespace features { ...@@ -20,9 +20,7 @@ namespace features {
extern const base::Feature kAffiliationBasedMatching; extern const base::Feature kAffiliationBasedMatching;
extern const base::Feature kAutofillHome; extern const base::Feature kAutofillHome;
extern const base::Feature kHtmlBasedUsernameDetector; extern const base::Feature kHtmlBasedUsernameDetector;
extern const base::Feature kManualFallbacksFilling;
extern const base::Feature kManualFallbacksFillingStandalone; extern const base::Feature kManualFallbacksFillingStandalone;
extern const base::Feature kManualPasswordGeneration;
extern const base::Feature kPasswordGenerationRequirements; extern const base::Feature kPasswordGenerationRequirements;
extern const base::Feature kPasswordGenerationRequirementsDomainOverrides; extern const base::Feature kPasswordGenerationRequirementsDomainOverrides;
extern const base::Feature kPasswordForceSaving; 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