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

Unified Diff: components/signin/core/account_id/account_id.h

Issue 2510683002: Overload << operator to allow logging of AccountIds. (Closed)
Patch Set: Add type 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | components/signin/core/account_id/account_id.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
« no previous file with comments | « no previous file | components/signin/core/account_id/account_id.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698