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

Unified Diff: Source/modules/credentialmanager/PasswordCredential.cpp

Issue 1314673007: CREDENTIAL: Update PasswordCredential's constructor. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase Created 5 years, 3 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: Source/modules/credentialmanager/PasswordCredential.cpp
diff --git a/Source/modules/credentialmanager/PasswordCredential.cpp b/Source/modules/credentialmanager/PasswordCredential.cpp
index 68bc40a079ca1bf4c45199434bd7955dcddf042a..3f7624a4b113b404815e366c882174a34c0a698a 100644
--- a/Source/modules/credentialmanager/PasswordCredential.cpp
+++ b/Source/modules/credentialmanager/PasswordCredential.cpp
@@ -10,6 +10,7 @@
#include "core/dom/ExecutionContext.h"
#include "core/html/DOMFormData.h"
#include "modules/credentialmanager/FormDataOptions.h"
+#include "modules/credentialmanager/PasswordCredentialData.h"
#include "platform/credentialmanager/PlatformPasswordCredential.h"
#include "platform/weborigin/SecurityOrigin.h"
#include "public/platform/WebCredential.h"
@@ -22,12 +23,12 @@ PasswordCredential* PasswordCredential::create(WebPasswordCredential* webPasswor
return new PasswordCredential(webPasswordCredential);
}
-PasswordCredential* PasswordCredential::create(const String& id, const String& password, const String& name, const String& icon, ExceptionState& exceptionState)
+PasswordCredential* PasswordCredential::create(const PasswordCredentialData& data, ExceptionState& exceptionState)
{
- KURL iconURL = parseStringAsURL(icon, exceptionState);
+ KURL iconURL = parseStringAsURL(data.iconURL(), exceptionState);
if (exceptionState.hadException())
return nullptr;
- return new PasswordCredential(id, password, name, iconURL);
+ return new PasswordCredential(data.id(), data.password(), data.name(), iconURL);
}
PasswordCredential::PasswordCredential(WebPasswordCredential* webPasswordCredential)
« no previous file with comments | « Source/modules/credentialmanager/PasswordCredential.h ('k') | Source/modules/credentialmanager/PasswordCredential.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698