| Index: Source/platform/exported/WebCredential.cpp
|
| diff --git a/Source/platform/exported/WebCredential.cpp b/Source/platform/exported/WebCredential.cpp
|
| index 7f01394a32b0675c463d6ac81869a7ed35bb50f5..e08d1aecd373d83b18421799fa47f32ae19f0ec7 100644
|
| --- a/Source/platform/exported/WebCredential.cpp
|
| +++ b/Source/platform/exported/WebCredential.cpp
|
| @@ -6,14 +6,37 @@
|
| #include "public/platform/WebCredential.h"
|
|
|
| #include "platform/credentialmanager/PlatformCredential.h"
|
| +#include "public/platform/WebFederatedCredential.h"
|
| +#include "public/platform/WebLocalCredential.h"
|
|
|
| namespace blink {
|
|
|
| +WebCredential WebCredential::create(PlatformCredential* credential)
|
| +{
|
| + if (credential->isLocal()) {
|
| + WebLocalCredential local(credential);
|
| + return local;
|
| + }
|
| +
|
| + if (credential->isFederated()) {
|
| + WebFederatedCredential federated(credential);
|
| + return federated;
|
| + }
|
| +
|
| + ASSERT_NOT_REACHED();
|
| + return WebCredential(credential);
|
| +}
|
| +
|
| WebCredential::WebCredential(const WebString& id, const WebString& name, const WebURL& avatarURL)
|
| : m_platformCredential(PlatformCredential::create(id, name, avatarURL))
|
| {
|
| }
|
|
|
| +WebCredential::WebCredential(const WebCredential& other)
|
| +{
|
| + assign(other);
|
| +}
|
| +
|
| void WebCredential::assign(const WebCredential& other)
|
| {
|
| m_platformCredential = other.m_platformCredential;
|
| @@ -50,4 +73,14 @@ WebURL WebCredential::avatarURL() const
|
| return m_platformCredential->avatarURL();
|
| }
|
|
|
| +bool WebCredential::isLocalCredential() const
|
| +{
|
| + return m_platformCredential->isLocal();
|
| +}
|
| +
|
| +bool WebCredential::isFederatedCredential() const
|
| +{
|
| + return m_platformCredential->isFederated();
|
| +}
|
| +
|
| } // namespace blink
|
|
|