summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/Source
diff options
context:
space:
mode:
authormkwst@chromium.org <mkwst@chromium.org>2014-10-17 15:39:59 +0000
committermkwst@chromium.org <mkwst@chromium.org>2014-10-17 15:39:59 +0000
commit2935fb4d4b426f1cf582a3640c9118743263486b (patch)
tree91909fd9963d94a090fb2f789bc4eec0d44f4e5e /third_party/WebKit/Source
parent740306626c714d8f162e15a4d4800e699cba854e (diff)
downloadchromium_src-2935fb4d4b426f1cf582a3640c9118743263486b.zip
chromium_src-2935fb4d4b426f1cf582a3640c9118743263486b.tar.gz
chromium_src-2935fb4d4b426f1cf582a3640c9118743263486b.tar.bz2
Credential Manager: JavaScript arguments make more sense in a different order.
Updated spec, IDL files, and all the *Credential variants. BUG=400674 Review URL: https://codereview.chromium.org/661973002 git-svn-id: svn://svn.chromium.org/blink/trunk@183896 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Diffstat (limited to 'third_party/WebKit/Source')
-rw-r--r--third_party/WebKit/Source/modules/credentialmanager/FederatedCredential.cpp8
-rw-r--r--third_party/WebKit/Source/modules/credentialmanager/FederatedCredential.h14
-rw-r--r--third_party/WebKit/Source/modules/credentialmanager/FederatedCredential.idl2
-rw-r--r--third_party/WebKit/Source/modules/credentialmanager/LocalCredential.cpp8
-rw-r--r--third_party/WebKit/Source/modules/credentialmanager/LocalCredential.h14
-rw-r--r--third_party/WebKit/Source/modules/credentialmanager/LocalCredential.idl2
-rw-r--r--third_party/WebKit/Source/platform/credentialmanager/PlatformFederatedCredential.cpp6
-rw-r--r--third_party/WebKit/Source/platform/credentialmanager/PlatformFederatedCredential.h4
-rw-r--r--third_party/WebKit/Source/platform/credentialmanager/PlatformLocalCredential.cpp6
-rw-r--r--third_party/WebKit/Source/platform/credentialmanager/PlatformLocalCredential.h4
-rw-r--r--third_party/WebKit/Source/platform/exported/WebFederatedCredential.cpp7
-rw-r--r--third_party/WebKit/Source/platform/exported/WebLocalCredential.cpp7
12 files changed, 56 insertions, 26 deletions
diff --git a/third_party/WebKit/Source/modules/credentialmanager/FederatedCredential.cpp b/third_party/WebKit/Source/modules/credentialmanager/FederatedCredential.cpp
index e22aeab9..f245680 100644
--- a/third_party/WebKit/Source/modules/credentialmanager/FederatedCredential.cpp
+++ b/third_party/WebKit/Source/modules/credentialmanager/FederatedCredential.cpp
@@ -16,13 +16,13 @@ FederatedCredential* FederatedCredential::create(WebFederatedCredential* webFede
return new FederatedCredential(webFederatedCredential);
}
-FederatedCredential* FederatedCredential::create(const String& id, const String& name, const String& avatar, const String& federation, ExceptionState& exceptionState)
+FederatedCredential* FederatedCredential::create(const String& id, const String& federation, const String& name, const String& avatar, ExceptionState& exceptionState)
{
KURL avatarURL = parseStringAsURL(avatar, exceptionState);
KURL federationURL = parseStringAsURL(federation, exceptionState);
if (exceptionState.hadException())
return nullptr;
- return new FederatedCredential(id, name, avatarURL, federationURL);
+ return new FederatedCredential(id, federationURL, name, avatarURL);
}
FederatedCredential::FederatedCredential(WebFederatedCredential* webFederatedCredential)
@@ -30,8 +30,8 @@ FederatedCredential::FederatedCredential(WebFederatedCredential* webFederatedCre
{
}
-FederatedCredential::FederatedCredential(const String& id, const String& name, const KURL& avatar, const KURL& federation)
- : Credential(PlatformFederatedCredential::create(id, name, avatar, federation))
+FederatedCredential::FederatedCredential(const String& id, const KURL& federation, const String& name, const KURL& avatar)
+ : Credential(PlatformFederatedCredential::create(id, federation, name, avatar))
{
}
diff --git a/third_party/WebKit/Source/modules/credentialmanager/FederatedCredential.h b/third_party/WebKit/Source/modules/credentialmanager/FederatedCredential.h
index a86941c..2161ed4 100644
--- a/third_party/WebKit/Source/modules/credentialmanager/FederatedCredential.h
+++ b/third_party/WebKit/Source/modules/credentialmanager/FederatedCredential.h
@@ -18,15 +18,25 @@ class WebFederatedCredential;
class FederatedCredential final : public Credential {
DEFINE_WRAPPERTYPEINFO();
public:
+ static FederatedCredential* create(const String& id, const String& federation, ExceptionState& exceptionState)
+ {
+ return create(id, federation, String(), String(), exceptionState);
+ }
+
+ static FederatedCredential* create(const String& id, const String& federation, const String& name, ExceptionState& exceptionState)
+ {
+ return create(id, federation, name, String(), exceptionState);
+ }
+
+ static FederatedCredential* create(const String& id, const String& federation, const String& name, const String& avatar, ExceptionState&);
static FederatedCredential* create(WebFederatedCredential*);
- static FederatedCredential* create(const String& id, const String& name, const String& avatar, const String& federation, ExceptionState&);
// FederatedCredential.idl
const KURL& federation() const;
private:
FederatedCredential(WebFederatedCredential*);
- FederatedCredential(const String& id, const String& name, const KURL& avatar, const KURL& federation);
+ FederatedCredential(const String& id, const KURL& federation, const String& name, const KURL& avatar);
};
} // namespace blink
diff --git a/third_party/WebKit/Source/modules/credentialmanager/FederatedCredential.idl b/third_party/WebKit/Source/modules/credentialmanager/FederatedCredential.idl
index b596da2..c22d250 100644
--- a/third_party/WebKit/Source/modules/credentialmanager/FederatedCredential.idl
+++ b/third_party/WebKit/Source/modules/credentialmanager/FederatedCredential.idl
@@ -5,7 +5,7 @@
[
RuntimeEnabled=CredentialManager,
RaisesException=Constructor,
- Constructor(DOMString id, DOMString name, DOMString avatarURL, DOMString federation)
+ Constructor(DOMString id, DOMString federation, optional DOMString name, optional DOMString avatarURL)
] interface FederatedCredential : Credential {
readonly attribute DOMString federation;
};
diff --git a/third_party/WebKit/Source/modules/credentialmanager/LocalCredential.cpp b/third_party/WebKit/Source/modules/credentialmanager/LocalCredential.cpp
index d69d1f5..3dc28eb 100644
--- a/third_party/WebKit/Source/modules/credentialmanager/LocalCredential.cpp
+++ b/third_party/WebKit/Source/modules/credentialmanager/LocalCredential.cpp
@@ -17,12 +17,12 @@ 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)
+LocalCredential* LocalCredential::create(const String& id, const String& password, const String& name, const String& avatar, ExceptionState& exceptionState)
{
KURL avatarURL = parseStringAsURL(avatar, exceptionState);
if (exceptionState.hadException())
return nullptr;
- return new LocalCredential(id, name, avatarURL, password);
+ return new LocalCredential(id, password, name, avatarURL);
}
LocalCredential::LocalCredential(WebLocalCredential* webLocalCredential)
@@ -30,8 +30,8 @@ LocalCredential::LocalCredential(WebLocalCredential* webLocalCredential)
{
}
-LocalCredential::LocalCredential(const String& id, const String& name, const KURL& avatar, const String& password)
- : Credential(PlatformLocalCredential::create(id, name, avatar, password))
+LocalCredential::LocalCredential(const String& id, const String& password, const String& name, const KURL& avatar)
+ : Credential(PlatformLocalCredential::create(id, password, name, avatar))
{
}
diff --git a/third_party/WebKit/Source/modules/credentialmanager/LocalCredential.h b/third_party/WebKit/Source/modules/credentialmanager/LocalCredential.h
index fab3ca2..9fa7f4f 100644
--- a/third_party/WebKit/Source/modules/credentialmanager/LocalCredential.h
+++ b/third_party/WebKit/Source/modules/credentialmanager/LocalCredential.h
@@ -18,15 +18,25 @@ class WebLocalCredential;
class LocalCredential final : public Credential {
DEFINE_WRAPPERTYPEINFO();
public:
+ static LocalCredential* create(const String& id, const String& password, ExceptionState& exceptionState)
+ {
+ return create(id, password, emptyString(), emptyString(), exceptionState);
+ }
+
+ static LocalCredential* create(const String& id, const String& password, const String& name, ExceptionState& exceptionState)
+ {
+ return create(id, password, name, emptyString(), exceptionState);
+ }
+
+ static LocalCredential* create(const String& id, const String& password, const String& name, const String& avatar, ExceptionState&);
static LocalCredential* create(WebLocalCredential*);
- static LocalCredential* create(const String& id, const String& name, const String& avatar, const String& password, ExceptionState&);
// LocalCredential.idl
const String& password() const;
private:
LocalCredential(WebLocalCredential*);
- LocalCredential(const String& id, const String& name, const KURL& avatar, const String& password);
+ LocalCredential(const String& id, const String& password, const String& name, const KURL& avatar);
};
} // namespace blink
diff --git a/third_party/WebKit/Source/modules/credentialmanager/LocalCredential.idl b/third_party/WebKit/Source/modules/credentialmanager/LocalCredential.idl
index 62c4aa6c..bbcdcf3 100644
--- a/third_party/WebKit/Source/modules/credentialmanager/LocalCredential.idl
+++ b/third_party/WebKit/Source/modules/credentialmanager/LocalCredential.idl
@@ -5,7 +5,7 @@
[
RuntimeEnabled=CredentialManager,
RaisesException=Constructor,
- Constructor(DOMString id, DOMString name, DOMString avatarURL, DOMString password)
+ Constructor(DOMString id, DOMString password, optional DOMString name, optional DOMString avatarURL)
] interface LocalCredential : Credential {
readonly attribute DOMString password;
};
diff --git a/third_party/WebKit/Source/platform/credentialmanager/PlatformFederatedCredential.cpp b/third_party/WebKit/Source/platform/credentialmanager/PlatformFederatedCredential.cpp
index 4d96b92..c606cfe 100644
--- a/third_party/WebKit/Source/platform/credentialmanager/PlatformFederatedCredential.cpp
+++ b/third_party/WebKit/Source/platform/credentialmanager/PlatformFederatedCredential.cpp
@@ -7,12 +7,12 @@
namespace blink {
-PlatformFederatedCredential* PlatformFederatedCredential::create(const String& id, const String& name, const KURL& avatarURL, const KURL& federation)
+PlatformFederatedCredential* PlatformFederatedCredential::create(const String& id, const KURL& federation, const String& name, const KURL& avatarURL)
{
- return new PlatformFederatedCredential(id, name, avatarURL, federation);
+ return new PlatformFederatedCredential(id, federation, name, avatarURL);
}
-PlatformFederatedCredential::PlatformFederatedCredential(const String& id, const String& name, const KURL& avatarURL, const KURL& federation)
+PlatformFederatedCredential::PlatformFederatedCredential(const String& id, const KURL& federation, const String& name, const KURL& avatarURL)
: PlatformCredential(id, name, avatarURL)
, m_federation(federation)
{
diff --git a/third_party/WebKit/Source/platform/credentialmanager/PlatformFederatedCredential.h b/third_party/WebKit/Source/platform/credentialmanager/PlatformFederatedCredential.h
index d8bb641..389cad53 100644
--- a/third_party/WebKit/Source/platform/credentialmanager/PlatformFederatedCredential.h
+++ b/third_party/WebKit/Source/platform/credentialmanager/PlatformFederatedCredential.h
@@ -14,7 +14,7 @@ namespace blink {
class PLATFORM_EXPORT PlatformFederatedCredential final : public PlatformCredential {
WTF_MAKE_NONCOPYABLE(PlatformFederatedCredential);
public:
- static PlatformFederatedCredential* create(const String& id, const String& name, const KURL& avatarURL, const KURL& federation);
+ static PlatformFederatedCredential* create(const String& id, const KURL& federation, const String& name, const KURL& avatarURL);
virtual ~PlatformFederatedCredential();
const KURL& federation() const { return m_federation; }
@@ -22,7 +22,7 @@ public:
virtual bool isFederated() override { return true; }
private:
- PlatformFederatedCredential(const String& id, const String& name, const KURL& avatarURL, const KURL& federation);
+ PlatformFederatedCredential(const String& id, const KURL& federation, const String& name, const KURL& avatarURL);
KURL m_federation;
};
diff --git a/third_party/WebKit/Source/platform/credentialmanager/PlatformLocalCredential.cpp b/third_party/WebKit/Source/platform/credentialmanager/PlatformLocalCredential.cpp
index 90a93ae..207b57e 100644
--- a/third_party/WebKit/Source/platform/credentialmanager/PlatformLocalCredential.cpp
+++ b/third_party/WebKit/Source/platform/credentialmanager/PlatformLocalCredential.cpp
@@ -7,12 +7,12 @@
namespace blink {
-PlatformLocalCredential* PlatformLocalCredential::create(const String& id, const String& name, const KURL& avatarURL, const String& password)
+PlatformLocalCredential* PlatformLocalCredential::create(const String& id, const String& password, const String& name, const KURL& avatarURL)
{
- return new PlatformLocalCredential(id, name, avatarURL, password);
+ return new PlatformLocalCredential(id, password, name, avatarURL);
}
-PlatformLocalCredential::PlatformLocalCredential(const String& id, const String& name, const KURL& avatarURL, const String& password)
+PlatformLocalCredential::PlatformLocalCredential(const String& id, const String& password, const String& name, const KURL& avatarURL)
: PlatformCredential(id, name, avatarURL)
, m_password(password)
{
diff --git a/third_party/WebKit/Source/platform/credentialmanager/PlatformLocalCredential.h b/third_party/WebKit/Source/platform/credentialmanager/PlatformLocalCredential.h
index ce6d236..e9af058 100644
--- a/third_party/WebKit/Source/platform/credentialmanager/PlatformLocalCredential.h
+++ b/third_party/WebKit/Source/platform/credentialmanager/PlatformLocalCredential.h
@@ -14,7 +14,7 @@ namespace blink {
class PLATFORM_EXPORT PlatformLocalCredential final : public PlatformCredential {
WTF_MAKE_NONCOPYABLE(PlatformLocalCredential);
public:
- static PlatformLocalCredential* create(const String& id, const String& name, const KURL& avatarURL, const String& password);
+ static PlatformLocalCredential* create(const String& id, const String& password, const String& name, const KURL& avatarURL);
virtual ~PlatformLocalCredential();
const String& password() const { return m_password; }
@@ -22,7 +22,7 @@ public:
virtual bool isLocal() override { return true; }
private:
- PlatformLocalCredential(const String& id, const String& name, const KURL& avatarURL, const String& password);
+ PlatformLocalCredential(const String& id, const String& password, const String& name, const KURL& avatarURL);
String m_password;
};
diff --git a/third_party/WebKit/Source/platform/exported/WebFederatedCredential.cpp b/third_party/WebKit/Source/platform/exported/WebFederatedCredential.cpp
index 496bc53..64bb21d 100644
--- a/third_party/WebKit/Source/platform/exported/WebFederatedCredential.cpp
+++ b/third_party/WebKit/Source/platform/exported/WebFederatedCredential.cpp
@@ -8,9 +8,14 @@
#include "platform/credentialmanager/PlatformFederatedCredential.h"
namespace blink {
+WebFederatedCredential::WebFederatedCredential(const WebString& id, const WebURL& federation, const WebString& name, const WebURL& avatarURL)
+ : WebCredential(PlatformFederatedCredential::create(id, federation, name, avatarURL))
+{
+}
+// FIXME: Throw this away once it's unused on the Chromium side.
WebFederatedCredential::WebFederatedCredential(const WebString& id, const WebString& name, const WebURL& avatarURL, const WebURL& federation)
- : WebCredential(PlatformFederatedCredential::create(id, name, avatarURL, federation))
+ : WebCredential(PlatformFederatedCredential::create(id, federation, name, avatarURL))
{
}
diff --git a/third_party/WebKit/Source/platform/exported/WebLocalCredential.cpp b/third_party/WebKit/Source/platform/exported/WebLocalCredential.cpp
index 84c282e..c05638e 100644
--- a/third_party/WebKit/Source/platform/exported/WebLocalCredential.cpp
+++ b/third_party/WebKit/Source/platform/exported/WebLocalCredential.cpp
@@ -8,9 +8,14 @@
#include "platform/credentialmanager/PlatformLocalCredential.h"
namespace blink {
+WebLocalCredential::WebLocalCredential(const WebString& id, const WebString& password, const WebString& name, const WebURL& avatarURL)
+ : WebCredential(PlatformLocalCredential::create(id, password, name, avatarURL))
+{
+}
+// FIXME: Throw this away once it's unused on the Chromium side.
WebLocalCredential::WebLocalCredential(const WebString& id, const WebString& name, const WebURL& avatarURL, const WebString& password)
- : WebCredential(PlatformLocalCredential::create(id, name, avatarURL, password))
+ : WebCredential(PlatformLocalCredential::create(id, password, name, avatarURL))
{
}