| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 IOS_WEB_PUBLIC_WEB_STATE_CREDENTIAL_H_ | 5 #ifndef IOS_WEB_PUBLIC_WEB_STATE_CREDENTIAL_H_ |
| 6 #define IOS_WEB_PUBLIC_WEB_STATE_CREDENTIAL_H_ | 6 #define IOS_WEB_PUBLIC_WEB_STATE_CREDENTIAL_H_ |
| 7 | 7 |
| 8 #include "base/strings/string16.h" | 8 #include "base/strings/string16.h" |
| 9 #include "url/gurl.h" | 9 #include "url/gurl.h" |
| 10 | 10 |
| 11 namespace web { | 11 namespace web { |
| 12 | 12 |
| 13 // Indicates the specific type of a Credential object. | 13 // Indicates the specific type of a Credential object. |
| 14 enum CredentialType { | 14 enum CredentialType { |
| 15 CREDENTIAL_TYPE_EMPTY = 0, | 15 CREDENTIAL_TYPE_EMPTY = 0, |
| 16 CREDENTIAL_TYPE_LOCAL, | 16 CREDENTIAL_TYPE_PASSWORD, |
| 17 CREDENTIAL_TYPE_FEDERATED, | 17 CREDENTIAL_TYPE_FEDERATED, |
| 18 CREDENTIAL_TYPE_LAST = CREDENTIAL_TYPE_FEDERATED | 18 CREDENTIAL_TYPE_LAST = CREDENTIAL_TYPE_FEDERATED |
| 19 }; | 19 }; |
| 20 | 20 |
| 21 // Represents an instance of the JavaScript Credential type. | 21 // Represents an instance of the JavaScript Credential type. |
| 22 struct Credential { | 22 struct Credential { |
| 23 Credential(); | 23 Credential(); |
| 24 ~Credential(); | 24 ~Credential(); |
| 25 | 25 |
| 26 // The specific type of this credential. | 26 // The specific type of this credential. |
| (...skipping 15 matching lines...) Expand all Loading... |
| 42 GURL federation_url; | 42 GURL federation_url; |
| 43 }; | 43 }; |
| 44 | 44 |
| 45 // Determines whether two credentials are equal. | 45 // Determines whether two credentials are equal. |
| 46 bool CredentialsEqual(const web::Credential& credential1, | 46 bool CredentialsEqual(const web::Credential& credential1, |
| 47 const web::Credential& credential2); | 47 const web::Credential& credential2); |
| 48 | 48 |
| 49 } // namespace web | 49 } // namespace web |
| 50 | 50 |
| 51 #endif // IOS_WEB_PUBLIC_WEB_STATE_CREDENTIAL_H_ | 51 #endif // IOS_WEB_PUBLIC_WEB_STATE_CREDENTIAL_H_ |
| OLD | NEW |