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

Side by Side Diff: Source/modules/credentialmanager/CredentialsContainer.cpp

Issue 464783003: Credential manager: Convert strings to URLs early. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Feedback. Created 6 years, 4 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "config.h" 5 #include "config.h"
6 #include "modules/credentialmanager/CredentialsContainer.h" 6 #include "modules/credentialmanager/CredentialsContainer.h"
7 7
8 #include "bindings/core/v8/Dictionary.h" 8 #include "bindings/core/v8/Dictionary.h"
9 #include "bindings/core/v8/ScriptPromise.h" 9 #include "bindings/core/v8/ScriptPromise.h"
10 #include "bindings/core/v8/ScriptPromiseResolver.h" 10 #include "bindings/core/v8/ScriptPromiseResolver.h"
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 }; 55 };
56 56
57 class RequestCallbacks : public WebCredentialManager::RequestCallbacks { 57 class RequestCallbacks : public WebCredentialManager::RequestCallbacks {
58 WTF_MAKE_NONCOPYABLE(RequestCallbacks); 58 WTF_MAKE_NONCOPYABLE(RequestCallbacks);
59 public: 59 public:
60 explicit RequestCallbacks(PassRefPtr<ScriptPromiseResolver> resolver) : m_re solver(resolver) { } 60 explicit RequestCallbacks(PassRefPtr<ScriptPromiseResolver> resolver) : m_re solver(resolver) { }
61 virtual ~RequestCallbacks() { } 61 virtual ~RequestCallbacks() { }
62 62
63 virtual void onSuccess(WebCredential* credential) OVERRIDE 63 virtual void onSuccess(WebCredential* credential) OVERRIDE
64 { 64 {
65 // FIXME: Split this into Local/Federated types.
65 m_resolver->resolve(Credential::create(credential->id(), credential->nam e(), credential->avatarURL())); 66 m_resolver->resolve(Credential::create(credential->id(), credential->nam e(), credential->avatarURL()));
66 } 67 }
67 68
68 virtual void onError(WebCredentialManagerError* reason) OVERRIDE 69 virtual void onError(WebCredentialManagerError* reason) OVERRIDE
69 { 70 {
70 rejectDueToCredentialManagerError(m_resolver, reason); 71 rejectDueToCredentialManagerError(m_resolver, reason);
71 } 72 }
72 73
73 private: 74 private:
74 const RefPtr<ScriptPromiseResolver> m_resolver; 75 const RefPtr<ScriptPromiseResolver> m_resolver;
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 { 123 {
123 return stubImplementation(scriptState); 124 return stubImplementation(scriptState);
124 } 125 }
125 126
126 ScriptPromise CredentialsContainer::notifySignedOut(ScriptState* scriptState) 127 ScriptPromise CredentialsContainer::notifySignedOut(ScriptState* scriptState)
127 { 128 {
128 return stubImplementation(scriptState); 129 return stubImplementation(scriptState);
129 } 130 }
130 131
131 } // namespace blink 132 } // namespace blink
OLDNEW
« no previous file with comments | « Source/modules/credentialmanager/Credential.cpp ('k') | Source/modules/credentialmanager/FederatedCredential.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698