summaryrefslogtreecommitdiff
path: root/chromium/components/signin/core/browser/account_info.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/components/signin/core/browser/account_info.cc')
-rw-r--r--chromium/components/signin/core/browser/account_info.cc18
1 files changed, 8 insertions, 10 deletions
diff --git a/chromium/components/signin/core/browser/account_info.cc b/chromium/components/signin/core/browser/account_info.cc
index 326350ba4c7..0527cdc0f46 100644
--- a/chromium/components/signin/core/browser/account_info.cc
+++ b/chromium/components/signin/core/browser/account_info.cc
@@ -21,16 +21,7 @@ bool UpdateField(bool* field, bool new_value) {
}
}
-AccountInfo::AccountInfo()
- : account_id(),
- gaia(),
- email(),
- full_name(),
- given_name(),
- hosted_domain(),
- locale(),
- picture_url(),
- is_child_account(false) {}
+AccountInfo::AccountInfo() : is_child_account(false) {}
AccountInfo::AccountInfo(const AccountInfo& other) = default;
AccountInfo::~AccountInfo() {}
@@ -63,3 +54,10 @@ bool AccountInfo::UpdateWith(const AccountInfo& other) {
return modified;
}
+
+AccountId AccountInfo::GetAccountId() const {
+ if (IsEmpty())
+ return EmptyAccountId();
+ DCHECK(!email.empty() && !gaia.empty());
+ return AccountId::FromUserEmailGaiaId(email, gaia);
+} \ No newline at end of file