Commit e2ed8aaf authored by msramek's avatar msramek Committed by Commit bot

Add a flag for the password manager force-saving experiment.

There is no functionality behind this flag yet.

I kept the name "force-saving", since this name of the feature is quite established now, although I wonder whether saying "manually save" wouldn't be more understandable in the description.

BUG=484891

Review URL: https://codereview.chromium.org/1140043003

Cr-Commit-Position: refs/heads/master@{#330438}
parent 8258073a
...@@ -6373,6 +6373,12 @@ Keep your key file in a safe place. You will need it to create new versions of y ...@@ -6373,6 +6373,12 @@ Keep your key file in a safe place. You will need it to create new versions of y
<message name="IDS_FLAGS_PASSWORD_MANAGER_REAUTHENTICATION_DESCRIPTION" desc="Description of the flag for the password manager reauthentication option."> <message name="IDS_FLAGS_PASSWORD_MANAGER_REAUTHENTICATION_DESCRIPTION" desc="Description of the flag for the password manager reauthentication option.">
Disable prompting the user for their OS password before revealing passwords on the passwords page. Disable prompting the user for their OS password before revealing passwords on the passwords page.
</message> </message>
<message name="IDS_FLAGS_ENABLE_PASSWORD_FORCE_SAVING_NAME" desc="Name of the flag for the password manager's force-saving option.">
Enable force-saving of passwords
</message>
<message name="IDS_FLAGS_ENABLE_PASSWORD_FORCE_SAVING_DESCRIPTION" desc="Description of the flag for the password manager's force-saving option.">
Allow the user to manually enforce password saving instead of relying on password manager's heuristics.
</message>
<message name="IDS_FLAGS_PASSWORD_MANAGER_LINK_NAME" desc="Name of the flag to enable showing a link to account central on password settings page"> <message name="IDS_FLAGS_PASSWORD_MANAGER_LINK_NAME" desc="Name of the flag to enable showing a link to account central on password settings page">
Enable remote password management link Enable remote password management link
</message> </message>
...@@ -1152,6 +1152,14 @@ const Experiment kExperiments[] = { ...@@ -1152,6 +1152,14 @@ const Experiment kExperiments[] = {
kOsMac | kOsWin, kOsMac | kOsWin,
SINGLE_VALUE_TYPE(switches::kDisablePasswordManagerReauthentication) SINGLE_VALUE_TYPE(switches::kDisablePasswordManagerReauthentication)
}, },
{
"enable-password-force-saving",
IDS_FLAGS_ENABLE_PASSWORD_FORCE_SAVING_NAME,
IDS_FLAGS_ENABLE_PASSWORD_FORCE_SAVING_DESCRIPTION,
kOsAll,
SINGLE_VALUE_TYPE(
password_manager::switches::kEnablePasswordForceSaving)
},
{ {
"enable-password-link", "enable-password-link",
IDS_FLAGS_PASSWORD_MANAGER_LINK_NAME, IDS_FLAGS_PASSWORD_MANAGER_LINK_NAME,
......
...@@ -24,4 +24,9 @@ bool ManageAccountLinkExperimentEnabled() { ...@@ -24,4 +24,9 @@ bool ManageAccountLinkExperimentEnabled() {
return group_name == "Enabled"; return group_name == "Enabled";
} }
bool ForceSavingExperimentEnabled() {
return base::CommandLine::ForCurrentProcess()->HasSwitch(
password_manager::switches::kEnablePasswordForceSaving);
}
} // namespace password_manager } // namespace password_manager
...@@ -11,6 +11,9 @@ namespace password_manager { ...@@ -11,6 +11,9 @@ namespace password_manager {
// settings. // settings.
bool ManageAccountLinkExperimentEnabled(); bool ManageAccountLinkExperimentEnabled();
// True iff the force-saving of passwords is enabled.
bool ForceSavingExperimentEnabled();
} // namespace password_manager } // namespace password_manager
#endif // COMPONENTS_PASSWORD_MANAGER_CORE_COMMON_EXPERIMENTS_H_ #endif // COMPONENTS_PASSWORD_MANAGER_CORE_COMMON_EXPERIMENTS_H_
...@@ -58,6 +58,10 @@ const char kEnableManagerForSyncSignin[] = "enable-manager-for-sync-signin"; ...@@ -58,6 +58,10 @@ const char kEnableManagerForSyncSignin[] = "enable-manager-for-sync-signin";
// central. // central.
const char kEnablePasswordLink[] = "enable-password-link"; const char kEnablePasswordLink[] = "enable-password-link";
// Enable a context menu item in the password field that allows the user
// to manually enforce saving of their password.
const char kEnablePasswordForceSaving[] = "enable-password-force-saving";
} // namespace switches } // namespace switches
} // namespace password_manager } // namespace password_manager
...@@ -24,6 +24,7 @@ extern const char kEnableAutomaticPasswordSaving[]; ...@@ -24,6 +24,7 @@ extern const char kEnableAutomaticPasswordSaving[];
extern const char kEnableDropSyncCredential[]; extern const char kEnableDropSyncCredential[];
extern const char kEnableManagerForSyncSignin[]; extern const char kEnableManagerForSyncSignin[];
extern const char kEnablePasswordLink[]; extern const char kEnablePasswordLink[];
extern const char kEnablePasswordForceSaving[];
} // namespace switches } // namespace switches
......
...@@ -56750,6 +56750,7 @@ To add a new entry, add it with any value and run test to compute valid value. ...@@ -56750,6 +56750,7 @@ To add a new entry, add it with any value and run test to compute valid value.
<int value="-1102212525" label="enable-tcp-fastopen"/> <int value="-1102212525" label="enable-tcp-fastopen"/>
<int value="-1078093206" label="ash-debug-shortcuts"/> <int value="-1078093206" label="ash-debug-shortcuts"/>
<int value="-1077752943" label="enable-password-generation"/> <int value="-1077752943" label="enable-password-generation"/>
<int value="-1062119671" label="enable-password-force-saving"/>
<int value="-1056310158" label="disable-memory-pressure-chromeos"/> <int value="-1056310158" label="disable-memory-pressure-chromeos"/>
<int value="-1052782474" label="enable-cloud-devices"/> <int value="-1052782474" label="enable-cloud-devices"/>
<int value="-1052415111" label="malware-interstitial-v2"/> <int value="-1052415111" label="malware-interstitial-v2"/>
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