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

Side by Side Diff: third_party/WebKit/Source/platform/credentialmanager/PlatformPasswordCredential.h

Issue 2852423002: Expose passwords to JavaScript in Credential Manager API (Closed)
Patch Set: More Interface Listings Created 3 years, 7 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 #ifndef PlatformPasswordCredential_h 5 #ifndef PlatformPasswordCredential_h
6 #define PlatformPasswordCredential_h 6 #define PlatformPasswordCredential_h
7 7
8 #include "platform/credentialmanager/PlatformCredential.h" 8 #include "platform/credentialmanager/PlatformCredential.h"
9 #include "platform/heap/Handle.h" 9 #include "platform/heap/Handle.h"
10 #include "platform/wtf/text/WTFString.h" 10 #include "platform/wtf/text/WTFString.h"
11 11
12 namespace blink { 12 namespace blink {
13 13
14 class PLATFORM_EXPORT PlatformPasswordCredential final 14 class PLATFORM_EXPORT PlatformPasswordCredential final
15 : public PlatformCredential { 15 : public PlatformCredential {
16 WTF_MAKE_NONCOPYABLE(PlatformPasswordCredential); 16 WTF_MAKE_NONCOPYABLE(PlatformPasswordCredential);
17 17
18 public: 18 public:
19 static PlatformPasswordCredential* Create(const String& id, 19 static PlatformPasswordCredential* Create(const String& id,
20 const String& password, 20 const String& password,
21 const String& name, 21 const String& name,
22 const KURL& icon_url); 22 const KURL& icon_url);
23 ~PlatformPasswordCredential() override; 23 ~PlatformPasswordCredential() override;
24 24
25 const String& Password() const { return password_; } 25 const String& Password() const { return password_; }
26 void SetPassword(const String& password) { password_ = password; }
26 27
27 bool IsPassword() override { return true; } 28 bool IsPassword() override { return true; }
28 29
29 private: 30 private:
30 PlatformPasswordCredential(const String& id, 31 PlatformPasswordCredential(const String& id,
31 const String& password, 32 const String& password,
32 const String& name, 33 const String& name,
33 const KURL& icon_url); 34 const KURL& icon_url);
34 35
35 String password_; 36 String password_;
36 }; 37 };
37 38
38 } // namespace blink 39 } // namespace blink
39 40
40 #endif // PlatformPasswordCredential_h 41 #endif // PlatformPasswordCredential_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698