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

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

Issue 1723583004: CREDENTIAL: Convert federations from URLs to origins throughout. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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/credential_manager.mm
diff --git a/ios/chrome/browser/passwords/credential_manager.mm b/ios/chrome/browser/passwords/credential_manager.mm
index 9549c7ef8897c53765c77fc326f409578a6accec..a2fde6dc9802fab9f61f5327b088fa6076798bf6 100644
--- a/ios/chrome/browser/passwords/credential_manager.mm
+++ b/ios/chrome/browser/passwords/credential_manager.mm
@@ -20,6 +20,7 @@
#include "ios/web/public/web_state/credential.h"
#include "ios/web/public/web_state/url_verification_constants.h"
#include "ios/web/public/web_state/web_state.h"
+#include "url/origin.h"
namespace {
@@ -42,7 +43,7 @@ web::Credential WebCredentialFromCredentialInfo(
credential.name = credential_info.name;
credential.avatar_url = credential_info.icon;
credential.password = credential_info.password;
- credential.federation_url = credential_info.federation;
+ credential.federation_origin = credential_info.federation;
return credential;
}
@@ -68,7 +69,7 @@ password_manager::CredentialInfo CredentialInfoFromWebCredential(
credential_info.name = credential.name;
credential_info.icon = credential.avatar_url;
credential_info.password = credential.password;
- credential_info.federation = credential.federation_url;
+ credential_info.federation = credential.federation_origin;
return credential_info;
}
@@ -154,13 +155,13 @@ void CredentialManager::CredentialsRequested(
// Bundle up the arguments and forward them to the PasswordStore, which will
// asynchronously return the resulting Credential by invoking
// |SendCredential|.
- std::vector<GURL> federation_urls;
+ std::vector<url::Origin> federation_origins;
for (const auto& federation : federations)
- federation_urls.push_back(GURL(federation));
+ federation_origins.push_back(url::Origin(GURL(federation)));
std::vector<std::string> realms;
pending_request_.reset(
new password_manager::CredentialManagerPendingRequestTask(
- this, request_id, zero_click_only, page_url, true, federation_urls,
+ this, request_id, zero_click_only, page_url, true, federation_origins,
realms));
store->GetAutofillableLogins(pending_request_.get());
}

Powered by Google App Engine
This is Rietveld 408576698