| 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 "modules/credentialmanager/PasswordCredential.h" | 5 #include "modules/credentialmanager/PasswordCredential.h" |
| 6 | 6 |
| 7 #include "bindings/core/v8/Dictionary.h" | 7 #include "bindings/core/v8/Dictionary.h" |
| 8 #include "bindings/core/v8/ExceptionState.h" | 8 #include "bindings/core/v8/ExceptionState.h" |
| 9 #include "core/dom/ExecutionContext.h" | 9 #include "core/dom/ExecutionContext.h" |
| 10 #include "core/dom/URLSearchParams.h" | 10 #include "core/dom/URLSearchParams.h" |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 } | 35 } |
| 36 | 36 |
| 37 KURL iconURL = parseStringAsURL(data.iconURL(), exceptionState); | 37 KURL iconURL = parseStringAsURL(data.iconURL(), exceptionState); |
| 38 if (exceptionState.hadException()) | 38 if (exceptionState.hadException()) |
| 39 return nullptr; | 39 return nullptr; |
| 40 | 40 |
| 41 return new PasswordCredential(data.id(), data.password(), data.name(), iconU
RL); | 41 return new PasswordCredential(data.id(), data.password(), data.name(), iconU
RL); |
| 42 } | 42 } |
| 43 | 43 |
| 44 PasswordCredential::PasswordCredential(WebPasswordCredential* webPasswordCredent
ial) | 44 PasswordCredential::PasswordCredential(WebPasswordCredential* webPasswordCredent
ial) |
| 45 : Credential(webPasswordCredential->platformCredential()) | 45 : Credential(webPasswordCredential->getPlatformCredential()) |
| 46 , m_idName("username") | 46 , m_idName("username") |
| 47 , m_passwordName("password") | 47 , m_passwordName("password") |
| 48 { | 48 { |
| 49 } | 49 } |
| 50 | 50 |
| 51 PasswordCredential::PasswordCredential(const String& id, const String& password,
const String& name, const KURL& icon) | 51 PasswordCredential::PasswordCredential(const String& id, const String& password,
const String& name, const KURL& icon) |
| 52 : Credential(PlatformPasswordCredential::create(id, password, name, icon)) | 52 : Credential(PlatformPasswordCredential::create(id, password, name, icon)) |
| 53 , m_idName("username") | 53 , m_idName("username") |
| 54 , m_passwordName("password") | 54 , m_passwordName("password") |
| 55 { | 55 { |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 return static_cast<PlatformPasswordCredential*>(m_platformCredential.get())-
>password(); | 102 return static_cast<PlatformPasswordCredential*>(m_platformCredential.get())-
>password(); |
| 103 } | 103 } |
| 104 | 104 |
| 105 DEFINE_TRACE(PasswordCredential) | 105 DEFINE_TRACE(PasswordCredential) |
| 106 { | 106 { |
| 107 Credential::trace(visitor); | 107 Credential::trace(visitor); |
| 108 visitor->trace(m_additionalData); | 108 visitor->trace(m_additionalData); |
| 109 } | 109 } |
| 110 | 110 |
| 111 } // namespace blink | 111 } // namespace blink |
| OLD | NEW |