Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(363)

Unified Diff: ios/chrome/browser/passwords/ios_chrome_password_manager_client.mm

Issue 2106353003: Enable Update Password UI on iOS behind a flag (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@update_controller
Patch Set: Override PasswordManagerClient::IsUpdatePasswordUIEnabled Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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;
}
« no previous file with comments | « ios/chrome/browser/passwords/ios_chrome_password_manager_client.h ('k') | ios/chrome/browser/passwords/password_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698