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

Side by Side Diff: Source/modules/credentialmanager/LocalCredential.cpp

Issue 645023005: Credential Manager: Add a 'formData' property to LocalCredential. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git/+/reordering-arguments
Patch Set: Created 6 years, 2 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
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 "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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698