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

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

Issue 640263002: Credential Manager: Pass the correct credential type to the embedder. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Feedback. Created 6 years, 2 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
« no previous file with comments | « no previous file | Source/platform/credentialmanager/PlatformCredential.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 return promise; 127 return promise;
128 } 128 }
129 129
130 ScriptPromise CredentialsContainer::notifySignedIn(ScriptState* scriptState, Cre dential* credential) 130 ScriptPromise CredentialsContainer::notifySignedIn(ScriptState* scriptState, Cre dential* credential)
131 { 131 {
132 RefPtr<ScriptPromiseResolver> resolver = ScriptPromiseResolver::create(scrip tState); 132 RefPtr<ScriptPromiseResolver> resolver = ScriptPromiseResolver::create(scrip tState);
133 ScriptPromise promise = resolver->promise(); 133 ScriptPromise promise = resolver->promise();
134 if (!checkBoilerplate(resolver)) 134 if (!checkBoilerplate(resolver))
135 return promise; 135 return promise;
136 136
137 CredentialManagerClient::from(scriptState->executionContext())->dispatchSign edIn(WebCredential(credential->platformCredential()), new NotificationCallbacks( resolver)); 137 CredentialManagerClient::from(scriptState->executionContext())->dispatchSign edIn(WebCredential::create(credential->platformCredential()), new NotificationCa llbacks(resolver));
138 return promise; 138 return promise;
139 } 139 }
140 140
141 ScriptPromise CredentialsContainer::notifyFailedSignIn(ScriptState* scriptState, Credential* credential) 141 ScriptPromise CredentialsContainer::notifyFailedSignIn(ScriptState* scriptState, Credential* credential)
142 { 142 {
143 RefPtr<ScriptPromiseResolver> resolver = ScriptPromiseResolver::create(scrip tState); 143 RefPtr<ScriptPromiseResolver> resolver = ScriptPromiseResolver::create(scrip tState);
144 ScriptPromise promise = resolver->promise(); 144 ScriptPromise promise = resolver->promise();
145 if (!checkBoilerplate(resolver)) 145 if (!checkBoilerplate(resolver))
146 return promise; 146 return promise;
147 147
148 CredentialManagerClient::from(scriptState->executionContext())->dispatchFail edSignIn(WebCredential(credential->platformCredential()), new NotificationCallba cks(resolver)); 148 CredentialManagerClient::from(scriptState->executionContext())->dispatchFail edSignIn(WebCredential::create(credential->platformCredential()), new Notificati onCallbacks(resolver));
149 return promise; 149 return promise;
150 } 150 }
151 151
152 ScriptPromise CredentialsContainer::notifySignedOut(ScriptState* scriptState) 152 ScriptPromise CredentialsContainer::notifySignedOut(ScriptState* scriptState)
153 { 153 {
154 RefPtr<ScriptPromiseResolver> resolver = ScriptPromiseResolver::create(scrip tState); 154 RefPtr<ScriptPromiseResolver> resolver = ScriptPromiseResolver::create(scrip tState);
155 ScriptPromise promise = resolver->promise(); 155 ScriptPromise promise = resolver->promise();
156 if (!checkBoilerplate(resolver)) 156 if (!checkBoilerplate(resolver))
157 return promise; 157 return promise;
158 158
159 CredentialManagerClient::from(scriptState->executionContext())->dispatchSign edOut(new NotificationCallbacks(resolver)); 159 CredentialManagerClient::from(scriptState->executionContext())->dispatchSign edOut(new NotificationCallbacks(resolver));
160 return promise; 160 return promise;
161 } 161 }
162 162
163 } // namespace blink 163 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | Source/platform/credentialmanager/PlatformCredential.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698