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

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

Issue 573663002: Credential Manager: Wire up the client. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Oops. 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 "public/platform/WebCredential.h" 6 #include "public/platform/WebCredential.h"
7 7
8 #include "platform/credentialmanager/PlatformCredential.h" 8 #include "platform/credentialmanager/PlatformCredential.h"
9 9
10 namespace blink { 10 namespace blink {
11 11
12 WebCredential::WebCredential(const WebString& id, const WebString& name, const W ebURL& avatarURL) 12 WebCredential::WebCredential(const WebString& id, const WebString& name, const W ebURL& avatarURL)
13 : m_platformCredential(PlatformCredential::create(id, name, avatarURL)) 13 : m_platformCredential(PlatformCredential::create(id, name, avatarURL))
14 { 14 {
15 } 15 }
16 16
17 void WebCredential::assign(const WebCredential& other) 17 void WebCredential::assign(const WebCredential& other)
18 { 18 {
19 m_platformCredential = other.m_platformCredential; 19 m_platformCredential = other.m_platformCredential;
20 } 20 }
21 21
22 WebCredential::WebCredential(PlatformCredential* credential) 22 WebCredential::WebCredential(PlatformCredential* credential)
23 : m_platformCredential(credential) 23 : m_platformCredential(credential)
24 { 24 {
25 } 25 }
26 26
27 WebCredential& WebCredential::operator=(PlatformCredential* credential)
28 {
29 m_platformCredential = credential;
30 return *this;
31 }
32
33 WebCredential::operator PlatformCredential*() const
34 {
35 return m_platformCredential.get();
36 }
37
27 void WebCredential::reset() 38 void WebCredential::reset()
28 { 39 {
29 m_platformCredential.reset(); 40 m_platformCredential.reset();
30 } 41 }
31 42
32 WebString WebCredential::id() const 43 WebString WebCredential::id() const
33 { 44 {
34 return m_platformCredential->id(); 45 return m_platformCredential->id();
35 } 46 }
36 47
37 WebString WebCredential::name() const 48 WebString WebCredential::name() const
38 { 49 {
39 return m_platformCredential->name(); 50 return m_platformCredential->name();
40 } 51 }
41 52
42 WebURL WebCredential::avatarURL() const 53 WebURL WebCredential::avatarURL() const
43 { 54 {
44 return m_platformCredential->avatarURL(); 55 return m_platformCredential->avatarURL();
45 } 56 }
46 57
47 } // namespace blink 58 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698