Chromium Code Reviews| Index: chrome/browser/password_manager/chrome_password_manager_client.cc |
| diff --git a/chrome/browser/password_manager/chrome_password_manager_client.cc b/chrome/browser/password_manager/chrome_password_manager_client.cc |
| index 02ea0fae013b909b3507b17a9bc2e8fd4877b433..d357d934e11ffdf1094e4a2b714843ba2bfd208f 100644 |
| --- a/chrome/browser/password_manager/chrome_password_manager_client.cc |
| +++ b/chrome/browser/password_manager/chrome_password_manager_client.cc |
| @@ -208,10 +208,20 @@ bool ChromePasswordManagerClient::IsPasswordManagementEnabledForCurrentPage() |
| bool ChromePasswordManagerClient::IsSavingAndFillingEnabledForCurrentPage() |
| const { |
| - // TODO(melandory): remove saving_and_filling_passwords_enabled_ check from |
| - // here once we decide to switch to new settings behavior for everyone. |
| - return *saving_and_filling_passwords_enabled_ && !IsOffTheRecord() && |
| - IsFillingEnabledForCurrentPage(); |
|
samuong
2017/03/03 00:03:05
I didn't want to add the HasSwitch check to this v
vabr (Chromium)
2017/03/04 20:00:20
Adding the test for kEnableAutomation as a separat
samuong
2017/03/06 18:32:01
Done.
|
| + if (base::CommandLine::ForCurrentProcess()->HasSwitch( |
| + switches::kEnableAutomation)) { |
| + // Disable the password saving UI for automated tests. It obscures the |
| + // page, and there is no API to access (or dismiss) UI bubbles/infobars. |
| + return false; |
| + } |
| + if (!*saving_and_filling_passwords_enabled_) { |
| + // TODO(melandory): remove saving_and_filling_passwords_enabled_ check from |
| + // here once we decide to switch to new settings behavior for everyone. |
| + return false; |
| + } |
| + if (IsOffTheRecord()) |
| + return false; |
| + return IsFillingEnabledForCurrentPage(); |
| } |
| bool ChromePasswordManagerClient::IsFillingEnabledForCurrentPage() const { |