Index: components/signin/core/account_id/account_id.h |
diff --git a/components/signin/core/account_id/account_id.h b/components/signin/core/account_id/account_id.h |
index 81082b5fe0445252c4c272afde8c676e33e7b5dd..a263178d13d7a2bc41914679d9183c09bb96adce 100644 |
--- a/components/signin/core/account_id/account_id.h |
+++ b/components/signin/core/account_id/account_id.h |
@@ -7,7 +7,9 @@ |
#include <stddef.h> |
+#include <ostream> |
#include <string> |
+ |
#include "base/containers/hash_tables.h" |
enum class AccountType { UNKNOWN, GOOGLE, ACTIVE_DIRECTORY }; |
@@ -97,6 +99,8 @@ class AccountId { |
AccountId* out_account_id); |
private: |
+ friend std::ostream& operator<<(std::ostream&, const AccountId&); |
+ |
AccountId(const std::string& id, |
const std::string& user_email, |
const AccountType& account_type); |
@@ -106,6 +110,9 @@ class AccountId { |
AccountType account_type_ = AccountType::UNKNOWN; |
}; |
+// Overload << operator to allow logging of AccountIds. |
+std::ostream& operator<<(std::ostream& stream, const AccountId& account_id); |
+ |
// Returns a reference to a singleton. |
const AccountId& EmptyAccountId(); |