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

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

Issue 2867643004: Remove {LocallyStored,SiteBound}CredentialData (Closed)
Patch Set: 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/FederatedCredential.h" 5 #include "modules/credentialmanager/FederatedCredential.h"
6 6
7 #include "bindings/core/v8/ExceptionState.h" 7 #include "bindings/core/v8/ExceptionState.h"
8 #include "modules/credentialmanager/FederatedCredentialData.h" 8 #include "modules/credentialmanager/FederatedCredentialInit.h"
9 #include "platform/credentialmanager/PlatformFederatedCredential.h" 9 #include "platform/credentialmanager/PlatformFederatedCredential.h"
10 #include "platform/weborigin/SecurityOrigin.h" 10 #include "platform/weborigin/SecurityOrigin.h"
11 #include "public/platform/WebFederatedCredential.h" 11 #include "public/platform/WebFederatedCredential.h"
12 12
13 namespace blink { 13 namespace blink {
14 14
15 FederatedCredential* FederatedCredential::Create( 15 FederatedCredential* FederatedCredential::Create(
16 WebFederatedCredential* web_federated_credential) { 16 WebFederatedCredential* web_federated_credential) {
17 return new FederatedCredential(web_federated_credential); 17 return new FederatedCredential(web_federated_credential);
18 } 18 }
19 19
20 FederatedCredential* FederatedCredential::Create( 20 FederatedCredential* FederatedCredential::Create(
21 const FederatedCredentialData& data, 21 const FederatedCredentialInit& data,
22 ExceptionState& exception_state) { 22 ExceptionState& exception_state) {
23 if (data.id().IsEmpty()) { 23 if (data.id().IsEmpty()) {
24 exception_state.ThrowTypeError("'id' must not be empty."); 24 exception_state.ThrowTypeError("'id' must not be empty.");
25 return nullptr; 25 return nullptr;
26 } 26 }
27 if (data.provider().IsEmpty()) { 27 if (data.provider().IsEmpty()) {
28 exception_state.ThrowTypeError("'provider' must not be empty."); 28 exception_state.ThrowTypeError("'provider' must not be empty.");
29 return nullptr; 29 return nullptr;
30 } 30 }
31 31
(...skipping 19 matching lines...) Expand all
51 name, 51 name,
52 icon)) {} 52 icon)) {}
53 53
54 const String FederatedCredential::provider() const { 54 const String FederatedCredential::provider() const {
55 return static_cast<PlatformFederatedCredential*>(platform_credential_.Get()) 55 return static_cast<PlatformFederatedCredential*>(platform_credential_.Get())
56 ->Provider() 56 ->Provider()
57 ->ToString(); 57 ->ToString();
58 } 58 }
59 59
60 } // namespace blink 60 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698