| OLD | NEW |
| 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 |
| 27 void WebCredential::reset() | 33 void WebCredential::reset() |
| 28 { | 34 { |
| 29 m_platformCredential.reset(); | 35 m_platformCredential.reset(); |
| 30 } | 36 } |
| 31 | 37 |
| 32 WebString WebCredential::id() const | 38 WebString WebCredential::id() const |
| 33 { | 39 { |
| 34 return m_platformCredential->id(); | 40 return m_platformCredential->id(); |
| 35 } | 41 } |
| 36 | 42 |
| 37 WebString WebCredential::name() const | 43 WebString WebCredential::name() const |
| 38 { | 44 { |
| 39 return m_platformCredential->name(); | 45 return m_platformCredential->name(); |
| 40 } | 46 } |
| 41 | 47 |
| 42 WebURL WebCredential::avatarURL() const | 48 WebURL WebCredential::avatarURL() const |
| 43 { | 49 { |
| 44 return m_platformCredential->avatarURL(); | 50 return m_platformCredential->avatarURL(); |
| 45 } | 51 } |
| 46 | 52 |
| 47 } // namespace blink | 53 } // namespace blink |
| OLD | NEW |