Index: components/password_manager/content/common/credential_manager_types.h |
diff --git a/components/password_manager/content/common/credential_manager_types.h b/components/password_manager/content/common/credential_manager_types.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..37462d1da3b682e10a045bd85c4ce1b0b250267d |
--- /dev/null |
+++ b/components/password_manager/content/common/credential_manager_types.h |
@@ -0,0 +1,47 @@ |
+// Copyright 2014 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef COMPONENTS_PASSWORD_MANAGER_CONTENT_COMMON_CREDENTIAL_MANAGER_TYPES_H_ |
+#define COMPONENTS_PASSWORD_MANAGER_CONTENT_COMMON_CREDENTIAL_MANAGER_TYPES_H_ |
+ |
+#include <string> |
+ |
+#include "base/basictypes.h" |
+#include "base/compiler_specific.h" |
+#include "base/strings/string16.h" |
+#include "url/gurl.h" |
+ |
+namespace password_manager { |
+ |
+enum CredentialType { |
+ CREDENTIAL_MANAGER_CREDENTIAL_TYPE_UNKNOWN = 0, |
+ CREDENTIAL_MANAGER_CREDENTIAL_TYPE_LOCAL, |
+ CREDENTIAL_MANAGER_CREDENTIAL_TYPE_FEDERATED, |
+ CREDENTIAL_MANAGER_CREDENTIAL_TYPE_LAST = |
Ilya Sherman
2014/08/19 23:55:51
nit: I'd omit the "CREDENTIAL_MANAGER_" prefix for
Mike West
2014/08/20 13:17:19
Done.
|
+ CREDENTIAL_MANAGER_CREDENTIAL_TYPE_FEDERATED |
+}; |
+ |
+struct CredentialInfo { |
+ CredentialInfo(); |
+ CredentialInfo(const base::string16& id, |
+ const base::string16& name, |
+ const GURL& avatarURL); |
+ ~CredentialInfo(); |
+ |
+ CredentialType type; |
+ |
+ base::string16 id; |
+ base::string16 name; |
+ GURL avatarURL; |
Ilya Sherman
2014/08/19 23:55:51
nit: "avatar_url" (hacker_case). Ditto above and
Ilya Sherman
2014/08/19 23:55:51
Please document all of the member fields.
Mike West
2014/08/20 13:17:18
Done.
|
+ |
+ // For LocalCredential objects: |
+ base::string16 password; |
+ |
+ // For FederatedCredential objects: |
+ GURL federation; |
Ilya Sherman
2014/08/19 23:55:51
Optional nit: This is a rare case where a union ty
Ilya Sherman
2014/08/19 23:55:51
Please expand the documentation for these two fiel
vabr (Chromium)
2014/08/20 10:57:48
I don't think a union might involve types other th
Mike West
2014/08/20 13:17:19
Done.
Mike West
2014/08/20 13:17:19
Let's see what LocalCredential and FederatedCreden
|
+}; |
+ |
+} // namespace password_manager |
+ |
+#endif // COMPONENTS_PASSWORD_MANAGER_CONTENT_COMMON_CREDENTIAL_MANAGER_TYPES_H_ |