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

Unified Diff: ios/web/web_state/js/credential_util.mm

Issue 1723583004: CREDENTIAL: Convert federations from URLs to origins throughout. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: iOS2 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/web/web_state/js/credential_util.mm
diff --git a/ios/web/web_state/js/credential_util.mm b/ios/web/web_state/js/credential_util.mm
index 9017e42a1e65853d78aa21e31c7df24b1d9dfeca..6e4eb7b7c52cab41f53149f0506edc0fdab72b70 100644
--- a/ios/web/web_state/js/credential_util.mm
+++ b/ios/web/web_state/js/credential_util.mm
@@ -10,6 +10,7 @@
#include "base/values.h"
#include "ios/web/public/web_state/credential.h"
#include "url/gurl.h"
+#include "url/origin.h"
namespace {
@@ -74,7 +75,7 @@ bool DictionaryValueToCredential(const base::DictionaryValue& value,
credential->name = name;
credential->avatar_url = avatar_url;
credential->password = password;
- credential->federation_url = federation_url;
+ credential->federation_origin = url::Origin(federation_url);
return true;
}
@@ -93,7 +94,7 @@ void CredentialToDictionaryValue(const Credential& credential,
break;
case CredentialType::CREDENTIAL_TYPE_FEDERATED:
value->SetString("type", kFederatedCredentialType);
- value->SetString("federation", credential.federation_url.spec());
+ value->SetString("federation", credential.federation_origin.Serialize());
break;
default:
NOTREACHED();

Powered by Google App Engine
This is Rietveld 408576698