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

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

Issue 2895243002: Rename requireUserMediation to preventSilentAccess in the CM API. (Closed)
Patch Set: rebase Created 3 years, 7 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
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 "modules/credentialmanager/CredentialsContainer.h" 5 #include "modules/credentialmanager/CredentialsContainer.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <utility> 8 #include <utility>
9 #include "bindings/core/v8/Dictionary.h" 9 #include "bindings/core/v8/Dictionary.h"
10 #include "bindings/core/v8/ExceptionState.h" 10 #include "bindings/core/v8/ExceptionState.h"
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after
267 options.password().getAsHTMLFormElement(), exception_state)); 267 options.password().getAsHTMLFormElement(), exception_state));
268 } 268 }
269 } else { 269 } else {
270 resolver->Resolve( 270 resolver->Resolve(
271 FederatedCredential::Create(options.federated(), exception_state)); 271 FederatedCredential::Create(options.federated(), exception_state));
272 } 272 }
273 273
274 return promise; 274 return promise;
275 } 275 }
276 276
277 ScriptPromise CredentialsContainer::requireUserMediation( 277 ScriptPromise CredentialsContainer::preventSilentAccess(
278 ScriptState* script_state) { 278 ScriptState* script_state) {
279 ScriptPromiseResolver* resolver = ScriptPromiseResolver::Create(script_state); 279 ScriptPromiseResolver* resolver = ScriptPromiseResolver::Create(script_state);
280 ScriptPromise promise = resolver->Promise(); 280 ScriptPromise promise = resolver->Promise();
281 if (!CheckBoilerplate(resolver)) 281 if (!CheckBoilerplate(resolver))
282 return promise; 282 return promise;
283 283
284 CredentialManagerClient::From(ExecutionContext::From(script_state)) 284 CredentialManagerClient::From(ExecutionContext::From(script_state))
285 ->DispatchRequireUserMediation(new NotificationCallbacks(resolver)); 285 ->DispatchPreventSilentAccess(new NotificationCallbacks(resolver));
286 return promise; 286 return promise;
287 } 287 }
288 288
289 ScriptPromise CredentialsContainer::requireUserMediation(
290 ScriptState* script_state) {
291 return preventSilentAccess(script_state);
292 }
293
289 } // namespace blink 294 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698