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

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

Issue 573663002: Credential Manager: Wire up the client. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Null check. Created 6 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
« no previous file with comments | « Source/modules/credentialmanager/LocalCredential.h ('k') | Source/platform/exported/WebCredential.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/credentialmanager/LocalCredential.cpp
diff --git a/Source/modules/credentialmanager/LocalCredential.cpp b/Source/modules/credentialmanager/LocalCredential.cpp
index 7b61e4b98a09a07475a3eb54afdca18be6176857..d69d1f5a20dcbaa8bd37926716da9183adbe00e3 100644
--- a/Source/modules/credentialmanager/LocalCredential.cpp
+++ b/Source/modules/credentialmanager/LocalCredential.cpp
@@ -7,9 +7,16 @@
#include "bindings/core/v8/ExceptionState.h"
#include "platform/credentialmanager/PlatformLocalCredential.h"
+#include "public/platform/WebCredential.h"
+#include "public/platform/WebLocalCredential.h"
namespace blink {
+LocalCredential* LocalCredential::create(WebLocalCredential* webLocalCredential)
+{
+ return new LocalCredential(webLocalCredential);
+}
+
LocalCredential* LocalCredential::create(const String& id, const String& name, const String& avatar, const String& password, ExceptionState& exceptionState)
{
KURL avatarURL = parseStringAsURL(avatar, exceptionState);
@@ -18,6 +25,11 @@ LocalCredential* LocalCredential::create(const String& id, const String& name, c
return new LocalCredential(id, name, avatarURL, password);
}
+LocalCredential::LocalCredential(WebLocalCredential* webLocalCredential)
+ : Credential(webLocalCredential->platformCredential())
+{
+}
+
LocalCredential::LocalCredential(const String& id, const String& name, const KURL& avatar, const String& password)
: Credential(PlatformLocalCredential::create(id, name, avatar, password))
{
« no previous file with comments | « Source/modules/credentialmanager/LocalCredential.h ('k') | Source/platform/exported/WebCredential.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698