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

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

Issue 2517993004: Refactor CredentialManagerImpl::Get. It should use PasswordStore::GetLogins(). (Closed)
Patch Set: use set Created 4 years, 1 month 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/credential_manager.mm
diff --git a/ios/chrome/browser/passwords/credential_manager.mm b/ios/chrome/browser/passwords/credential_manager.mm
index 74cbc681f9cebe3dc2c034a64a78c4c4cfda688e..942a550e6e68cedd347e3731870ee3ae2b51a603 100644
--- a/ios/chrome/browser/passwords/credential_manager.mm
+++ b/ios/chrome/browser/passwords/credential_manager.mm
@@ -156,13 +156,14 @@ void CredentialManager::CredentialsRequested(
std::vector<GURL> federation_urls;
for (const auto& federation : federations)
federation_urls.push_back(GURL(federation));
- std::vector<std::string> realms;
pending_request_.reset(
new password_manager::CredentialManagerPendingRequestTask(
this, base::Bind(&CredentialManager::SendCredentialByID,
base::Unretained(this), request_id),
- zero_click_only, page_url, true, federation_urls, realms));
- store->GetAutofillableLogins(pending_request_.get());
+ zero_click_only, true, federation_urls));
+ password_manager::PasswordStore::FormDigest form = {
+ autofill::PasswordForm::SCHEME_HTML, page_url.spec(), page_url};
+ store->GetLogins(form, pending_request_.get());
}
void CredentialManager::SignedIn(int request_id,
@@ -304,15 +305,6 @@ password_manager::PasswordManagerClient* CredentialManager::client() const {
return client_;
}
-password_manager::PasswordStore::FormDigest
-CredentialManager::GetSynthesizedFormForOrigin() const {
- password_manager::PasswordStore::FormDigest form = {
- autofill::PasswordForm::SCHEME_HTML, std::string(),
- web_state()->GetLastCommittedURL().GetOrigin()};
- form.signon_realm = form.origin.spec();
- return form;
-}
-
void CredentialManager::OnProvisionalSaveComplete() {
// Invoked after a credential sent up by the page was stored in a FormManager
// by |SignedIn|, this function asks the user if the password should be stored
« no previous file with comments | « ios/chrome/browser/passwords/credential_manager.h ('k') | ios/chrome/browser/passwords/credential_manager_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698