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

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

Issue 540283003: bindings: Retires ScriptWrappable::init, etc. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Addressed a review comment. Created 6 years, 3 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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 }; 76 };
77 77
78 78
79 CredentialsContainer* CredentialsContainer::create() 79 CredentialsContainer* CredentialsContainer::create()
80 { 80 {
81 return new CredentialsContainer(); 81 return new CredentialsContainer();
82 } 82 }
83 83
84 CredentialsContainer::CredentialsContainer() 84 CredentialsContainer::CredentialsContainer()
85 { 85 {
86 ScriptWrappable::init(this);
87 } 86 }
88 87
89 static bool canAccessCredentialManagerAPI(ScriptState* scriptState, PassRefPtr<S criptPromiseResolver> resolver) 88 static bool canAccessCredentialManagerAPI(ScriptState* scriptState, PassRefPtr<S criptPromiseResolver> resolver)
90 { 89 {
91 SecurityOrigin* securityOrigin = scriptState->executionContext()->securityOr igin(); 90 SecurityOrigin* securityOrigin = scriptState->executionContext()->securityOr igin();
92 String errorMessage; 91 String errorMessage;
93 if (!securityOrigin->canAccessFeatureRequiringSecureOrigin(errorMessage)) { 92 if (!securityOrigin->canAccessFeatureRequiringSecureOrigin(errorMessage)) {
94 resolver->reject(DOMException::create(SecurityError, errorMessage)); 93 resolver->reject(DOMException::create(SecurityError, errorMessage));
95 return false; 94 return false;
96 } 95 }
(...skipping 26 matching lines...) Expand all
123 { 122 {
124 return stubImplementation(scriptState); 123 return stubImplementation(scriptState);
125 } 124 }
126 125
127 ScriptPromise CredentialsContainer::notifySignedOut(ScriptState* scriptState) 126 ScriptPromise CredentialsContainer::notifySignedOut(ScriptState* scriptState)
128 { 127 {
129 return stubImplementation(scriptState); 128 return stubImplementation(scriptState);
130 } 129 }
131 130
132 } // namespace blink 131 } // namespace blink
OLDNEW
« no previous file with comments | « Source/modules/credentialmanager/Credential.cpp ('k') | Source/modules/credentialmanager/FederatedCredential.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698