| Index: ios/chrome/browser/passwords/ios_chrome_password_manager_client.mm
|
| diff --git a/ios/chrome/browser/passwords/ios_chrome_password_manager_client.mm b/ios/chrome/browser/passwords/ios_chrome_password_manager_client.mm
|
| index f24d098b23fa96cebb9cc813118274b4803b46b4..03913d8270c0ef7595029a1a83e4324d98e8cc5f 100644
|
| --- a/ios/chrome/browser/passwords/ios_chrome_password_manager_client.mm
|
| +++ b/ios/chrome/browser/passwords/ios_chrome_password_manager_client.mm
|
| @@ -15,6 +15,7 @@
|
| #include "components/password_manager/core/common/password_manager_pref_names.h"
|
| #include "components/signin/core/browser/signin_manager_base.h"
|
| #include "ios/chrome/browser/browser_state/chrome_browser_state.h"
|
| +#include "ios/chrome/browser/experimental_flags.h"
|
| #include "ios/chrome/browser/passwords/ios_chrome_password_store_factory.h"
|
| #include "ios/chrome/browser/signin/signin_manager_factory.h"
|
| #include "ios/chrome/browser/sync/ios_chrome_profile_sync_service_factory.h"
|
| @@ -74,7 +75,13 @@ bool IOSChromePasswordManagerClient::PromptUserToSaveOrUpdatePassword(
|
| bool update_password) {
|
| if (form_to_save->IsBlacklisted())
|
| return false;
|
| - [delegate_ showSavePasswordInfoBar:std::move(form_to_save)];
|
| +
|
| + if (update_password && IsUpdatePasswordUIEnabled()) {
|
| + [delegate_ showUpdatePasswordInfoBar:std::move(form_to_save)];
|
| + } else {
|
| + [delegate_ showSavePasswordInfoBar:std::move(form_to_save)];
|
| + }
|
| +
|
| return true;
|
| }
|
|
|
| @@ -120,6 +127,10 @@ bool IOSChromePasswordManagerClient::IsSavingAndFillingEnabledForCurrentPage()
|
| IsFillingEnabledForCurrentPage();
|
| }
|
|
|
| +bool IOSChromePasswordManagerClient::IsUpdatePasswordUIEnabled() const {
|
| + return experimental_flags::IsUpdatePasswordUIEnabled();
|
| +}
|
| +
|
| const GURL& IOSChromePasswordManagerClient::GetLastCommittedEntryURL() const {
|
| return delegate_.lastCommittedURL;
|
| }
|
|
|