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

Side by Side Diff: third_party/WebKit/Source/platform/exported/WebCredential.cpp

Issue 1973943002: Fix style in Credential Manager code (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
« no previous file with comments | « third_party/WebKit/Source/modules/credentialmanager/CredentialsContainer.cpp ('k') | no next file » | 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 "public/platform/WebCredential.h" 5 #include "public/platform/WebCredential.h"
6 6
7 #include "platform/credentialmanager/PlatformCredential.h" 7 #include "platform/credentialmanager/PlatformCredential.h"
8 #include "public/platform/WebFederatedCredential.h" 8 #include "public/platform/WebFederatedCredential.h"
9 #include "public/platform/WebPasswordCredential.h" 9 #include "public/platform/WebPasswordCredential.h"
10 #include "wtf/PtrUtil.h" 10 #include "wtf/PtrUtil.h"
11 11
12 namespace blink { 12 namespace blink {
13 13
14 std::unique_ptr<WebCredential> WebCredential::create(PlatformCredential* credent ial) 14 std::unique_ptr<WebCredential> WebCredential::create(PlatformCredential* credent ial)
15 { 15 {
16 if (credential->isPassword()) { 16 if (credential->isPassword()) {
17 return WTF::wrapUnique(new WebPasswordCredential(credential)); 17 return wrapUnique(new WebPasswordCredential(credential));
18 } 18 }
19 19
20 if (credential->isFederated()) { 20 if (credential->isFederated()) {
21 return WTF::wrapUnique(new WebFederatedCredential(credential)); 21 return wrapUnique(new WebFederatedCredential(credential));
22 } 22 }
23 23
24 ASSERT_NOT_REACHED(); 24 ASSERT_NOT_REACHED();
25 return nullptr; 25 return nullptr;
26 } 26 }
27 27
28 WebCredential::WebCredential(const WebString& id, const WebString& name, const W ebURL& iconURL) 28 WebCredential::WebCredential(const WebString& id, const WebString& name, const W ebURL& iconURL)
29 : m_platformCredential(PlatformCredential::create(id, name, iconURL)) 29 : m_platformCredential(PlatformCredential::create(id, name, iconURL))
30 { 30 {
31 } 31 }
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 { 80 {
81 return m_platformCredential->isPassword(); 81 return m_platformCredential->isPassword();
82 } 82 }
83 83
84 bool WebCredential::isFederatedCredential() const 84 bool WebCredential::isFederatedCredential() const
85 { 85 {
86 return m_platformCredential->isFederated(); 86 return m_platformCredential->isFederated();
87 } 87 }
88 88
89 } // namespace blink 89 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/modules/credentialmanager/CredentialsContainer.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698