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

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

Issue 1880393002: CREDENTIAL: Implement 'SiteBoundCredential'. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Ugh. Created 4 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/FederatedCredentialData.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"
(...skipping 18 matching lines...) Expand all
29 } 29 }
30 30
31 KURL iconURL = parseStringAsURL(data.iconURL(), exceptionState); 31 KURL iconURL = parseStringAsURL(data.iconURL(), exceptionState);
32 KURL providerURL = parseStringAsURL(data.provider(), exceptionState); 32 KURL providerURL = parseStringAsURL(data.provider(), exceptionState);
33 if (exceptionState.hadException()) 33 if (exceptionState.hadException())
34 return nullptr; 34 return nullptr;
35 return new FederatedCredential(data.id(), providerURL, data.name(), iconURL) ; 35 return new FederatedCredential(data.id(), providerURL, data.name(), iconURL) ;
36 } 36 }
37 37
38 FederatedCredential::FederatedCredential(WebFederatedCredential* webFederatedCre dential) 38 FederatedCredential::FederatedCredential(WebFederatedCredential* webFederatedCre dential)
39 : Credential(webFederatedCredential->getPlatformCredential()) 39 : SiteBoundCredential(webFederatedCredential->getPlatformCredential())
40 { 40 {
41 } 41 }
42 42
43 FederatedCredential::FederatedCredential(const String& id, const KURL& provider, const String& name, const KURL& icon) 43 FederatedCredential::FederatedCredential(const String& id, const KURL& provider, const String& name, const KURL& icon)
44 : Credential(PlatformFederatedCredential::create(id, SecurityOrigin::create( provider), name, icon)) 44 : SiteBoundCredential(PlatformFederatedCredential::create(id, SecurityOrigin ::create(provider), name, icon))
45 { 45 {
46 } 46 }
47 47
48 const String FederatedCredential::provider() const 48 const String FederatedCredential::provider() const
49 { 49 {
50 return static_cast<PlatformFederatedCredential*>(m_platformCredential.get()) ->provider()->toString(); 50 return static_cast<PlatformFederatedCredential*>(m_platformCredential.get()) ->provider()->toString();
51 } 51 }
52 52
53 } // namespace blink 53 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698