Commit 54f80f25 authored by Marc Treib's avatar Marc Treib Committed by Commit Bot

Dice: Fix empty vector access in profile_chooser_view.cc GetAccountsForProfile

This was a simple oversight, introduced in https://crrev.com/c/817198

Bug: 786369
Change-Id: Icb85d73c99f4352244215fd764dad984ff10a6b9
Reviewed-on: https://chromium-review.googlesource.com/873414
Commit-Queue: Bret Sepulveda <bsep@chromium.org>
Reviewed-by: default avatarBret Sepulveda <bsep@chromium.org>
Cr-Commit-Position: refs/heads/master@{#530318}
parent 70210a4a
...@@ -212,7 +212,7 @@ std::vector<AccountInfo> GetAccountsForProfile(Profile* profile) { ...@@ -212,7 +212,7 @@ std::vector<AccountInfo> GetAccountsForProfile(Profile* profile) {
for (const std::string& account_id : account_ids) { for (const std::string& account_id : account_ids) {
AccountInfo account_info = AccountInfo account_info =
account_tracker_service->GetAccountInfo(account_id); account_tracker_service->GetAccountInfo(account_id);
if (account_id == cookie_accounts[0].id) if (account_id == gaia_default_account_id)
accounts.insert(accounts.begin(), account_info); accounts.insert(accounts.begin(), account_info);
else else
accounts.push_back(account_info); accounts.push_back(account_info);
......
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