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 #ifndef WebCredential_h | 5 #ifndef WebCredential_h |
| 6 #define WebCredential_h | 6 #define WebCredential_h |
| 7 | 7 |
| 8 #include "public/platform/WebCommon.h" | 8 #include "public/platform/WebCommon.h" |
| 9 #include "public/platform/WebPrivatePtr.h" | 9 #include "public/platform/WebPrivatePtr.h" |
| 10 #include "public/platform/WebString.h" | 10 #include "public/platform/WebString.h" |
| 11 #include "public/platform/WebURL.h" | 11 #include "public/platform/WebURL.h" |
| 12 | 12 |
| 13 namespace blink { | 13 namespace blink { |
| 14 | 14 |
| 15 class PlatformCredential; | 15 class PlatformCredential; |
| 16 | 16 |
| 17 class WebCredential { | 17 class WebCredential { |
| 18 public: | 18 public: |
| 19 BLINK_PLATFORM_EXPORT WebCredential(const WebString& id, const WebString& na me, const WebURL& avatarURL); | 19 BLINK_PLATFORM_EXPORT WebCredential(const WebString& id, const WebString& na me, const WebURL& iconURL); |
| 20 BLINK_PLATFORM_EXPORT WebCredential(const WebCredential&); | 20 BLINK_PLATFORM_EXPORT WebCredential(const WebCredential&); |
| 21 virtual ~WebCredential() { reset(); } | 21 virtual ~WebCredential() { reset(); } |
| 22 | 22 |
| 23 BLINK_PLATFORM_EXPORT void assign(const WebCredential&); | 23 BLINK_PLATFORM_EXPORT void assign(const WebCredential&); |
| 24 BLINK_PLATFORM_EXPORT void reset(); | 24 BLINK_PLATFORM_EXPORT void reset(); |
| 25 | 25 |
| 26 BLINK_PLATFORM_EXPORT WebString id() const; | 26 BLINK_PLATFORM_EXPORT WebString id() const; |
| 27 BLINK_PLATFORM_EXPORT WebString name() const; | 27 BLINK_PLATFORM_EXPORT WebString name() const; |
| 28 BLINK_PLATFORM_EXPORT WebURL avatarURL() const; | 28 BLINK_PLATFORM_EXPORT WebURL iconURL() const; |
| 29 BLINK_PLATFORM_EXPORT WebString type() const; | 29 BLINK_PLATFORM_EXPORT WebString type() const; |
| 30 | 30 |
| 31 BLINK_PLATFORM_EXPORT bool isPasswordCredential() const; | 31 BLINK_PLATFORM_EXPORT bool isPasswordCredential() const; |
| 32 BLINK_PLATFORM_EXPORT bool isFederatedCredential() const; | 32 BLINK_PLATFORM_EXPORT bool isFederatedCredential() const; |
| 33 | 33 |
| 34 // TODO(mkwst): Drop this once Chromium is updated. https://crbug.com/494880 | 34 // TODO(mkwst, msramek): Drop this once Chromium is updated. https://crbug.c om/494880 |
|
Mike West
2015/06/25 14:48:42
I think you can just leave this with my name in it
msramek
2015/06/26 09:45:04
Well, let me just remove it in the third correspon
| |
| 35 BLINK_PLATFORM_EXPORT bool isLocalCredential() const { return isPasswordCred ential(); } | 35 BLINK_PLATFORM_EXPORT bool isLocalCredential() const { return isPasswordCred ential(); } |
| 36 BLINK_PLATFORM_EXPORT WebURL avatarURL() const { return iconURL(); } | |
| 36 | 37 |
| 37 #if INSIDE_BLINK | 38 #if INSIDE_BLINK |
| 38 BLINK_PLATFORM_EXPORT static WebCredential create(PlatformCredential*); | 39 BLINK_PLATFORM_EXPORT static WebCredential create(PlatformCredential*); |
| 39 BLINK_PLATFORM_EXPORT WebCredential& operator=(PlatformCredential*); | 40 BLINK_PLATFORM_EXPORT WebCredential& operator=(PlatformCredential*); |
| 40 BLINK_PLATFORM_EXPORT PlatformCredential* platformCredential() const { retur n m_platformCredential.get(); } | 41 BLINK_PLATFORM_EXPORT PlatformCredential* platformCredential() const { retur n m_platformCredential.get(); } |
| 41 #endif | 42 #endif |
| 42 | 43 |
| 43 protected: | 44 protected: |
| 44 #if INSIDE_BLINK | 45 #if INSIDE_BLINK |
| 45 BLINK_PLATFORM_EXPORT WebCredential(PlatformCredential*); | 46 BLINK_PLATFORM_EXPORT WebCredential(PlatformCredential*); |
| 46 #endif | 47 #endif |
| 47 | 48 |
| 48 WebPrivatePtr<PlatformCredential> m_platformCredential; | 49 WebPrivatePtr<PlatformCredential> m_platformCredential; |
| 49 }; | 50 }; |
| 50 | 51 |
| 51 } // namespace blink | 52 } // namespace blink |
| 52 | 53 |
| 53 #endif // WebCredential_h | 54 #endif // WebCredential_h |
| OLD | NEW |