Chromium Code Reviews| 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 "modules/credentialmanager/LocalCredential.h" | 6 #include "modules/credentialmanager/LocalCredential.h" |
| 7 | 7 |
| 8 #include "bindings/core/v8/ExceptionState.h" | 8 #include "bindings/core/v8/ExceptionState.h" |
| 9 #include "platform/credentialmanager/PlatformLocalCredential.h" | 9 #include "platform/credentialmanager/PlatformLocalCredential.h" |
| 10 #include "public/platform/WebCredential.h" | 10 #include "public/platform/WebCredential.h" |
| (...skipping 14 matching lines...) Expand all Loading... | |
| 25 return new LocalCredential(id, password, name, avatarURL); | 25 return new LocalCredential(id, password, name, avatarURL); |
| 26 } | 26 } |
| 27 | 27 |
| 28 LocalCredential::LocalCredential(WebLocalCredential* webLocalCredential) | 28 LocalCredential::LocalCredential(WebLocalCredential* webLocalCredential) |
| 29 : Credential(webLocalCredential->platformCredential()) | 29 : Credential(webLocalCredential->platformCredential()) |
| 30 { | 30 { |
| 31 } | 31 } |
| 32 | 32 |
| 33 LocalCredential::LocalCredential(const String& id, const String& password, const String& name, const KURL& avatar) | 33 LocalCredential::LocalCredential(const String& id, const String& password, const String& name, const KURL& avatar) |
| 34 : Credential(PlatformLocalCredential::create(id, password, name, avatar)) | 34 : Credential(PlatformLocalCredential::create(id, password, name, avatar)) |
| 35 , m_formData(DOMFormData::create()) | |
| 35 { | 36 { |
| 37 m_formData->append("username", id); | |
| 38 m_formData->append("password", password); | |
| 36 } | 39 } |
| 37 | 40 |
| 38 const String& LocalCredential::password() const | 41 const String& LocalCredential::password() const |
| 39 { | 42 { |
| 40 return static_cast<PlatformLocalCredential*>(m_platformCredential.get())->pa ssword(); | 43 return static_cast<PlatformLocalCredential*>(m_platformCredential.get())->pa ssword(); |
| 41 } | 44 } |
| 42 | 45 |
| 46 void LocalCredential::trace(Visitor* visitor) | |
| 47 { | |
| 48 Credential::trace(visitor); | |
|
haraken
2014/10/20 08:16:03
We normally make this a tail call.
Mike West
2014/10/20 09:47:38
Done.
| |
| 49 visitor->trace(m_formData); | |
| 50 } | |
| 51 | |
| 43 } // namespace blink | 52 } // namespace blink |
| OLD | NEW |