Commit bc3edf20 authored by David Roger's avatar David Roger Committed by Commit Bot

[signin] Fix compile flag around GetDisplayEmail implementation

The guard was present in the .h, but not in the .cc. This CL adds the
misssing guard in the .cc.

Change-Id: I8716cbad52dd2f578cf730b41118ebbb554fc480
Reviewed-on: https://chromium-review.googlesource.com/1100470Reviewed-by: default avatarThomas Tangl <tangltom@chromium.org>
Commit-Queue: David Roger <droger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#567209}
parent 0424cfa8
......@@ -99,18 +99,6 @@ void ShowSigninErrorLearnMorePage(Profile* profile) {
Navigate(&params);
}
std::string GetDisplayEmail(Profile* profile, const std::string& account_id) {
AccountTrackerService* account_tracker =
AccountTrackerServiceFactory::GetForProfile(profile);
std::string email = account_tracker->GetAccountInfo(account_id).email;
if (email.empty()) {
DCHECK_EQ(AccountTrackerService::MIGRATION_NOT_STARTED,
account_tracker->GetMigrationState());
return account_id;
}
return email;
}
void EnableSyncFromPromo(Browser* browser,
const AccountInfo& account,
signin_metrics::AccessPoint access_point,
......@@ -206,6 +194,19 @@ void EnableSyncFromPromo(
} // namespace internal
#if BUILDFLAG(ENABLE_DICE_SUPPORT)
std::string GetDisplayEmail(Profile* profile, const std::string& account_id) {
AccountTrackerService* account_tracker =
AccountTrackerServiceFactory::GetForProfile(profile);
std::string email = account_tracker->GetAccountInfo(account_id).email;
if (email.empty()) {
DCHECK_EQ(AccountTrackerService::MIGRATION_NOT_STARTED,
account_tracker->GetMigrationState());
return account_id;
}
return email;
}
// TODO(tangltom): Add a unit test for this function.
std::vector<AccountInfo> GetAccountsForDicePromos(Profile* profile) {
// Fetch account ids for accounts that have a token.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment