Commit cdc3dc29 authored by Tom Anderson's avatar Tom Anderson Committed by Commit Bot

Set initial active browser for X11 avatar menu

This fixes the initial state of the menu, where previously there would be no
check mark next to the active profile and the edit and create profile entries
would be disabled.

R=thestig

Change-Id: I1aebbac6fac657fbcb50324068ac58d5c38dd74d
Bug: 1015759
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1869990
Commit-Queue: Thomas Anderson <thomasanderson@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: default avatarLei Zhang <thestig@chromium.org>
Auto-Submit: Thomas Anderson <thomasanderson@chromium.org>
Cr-Commit-Position: refs/heads/master@{#707617}
parent 0a31ccd3
...@@ -269,7 +269,8 @@ void GlobalMenuBarX11::Initialize(DbusMenu::InitializedCallback callback) { ...@@ -269,7 +269,8 @@ void GlobalMenuBarX11::Initialize(DbusMenu::InitializedCallback callback) {
ProfileManager* profile_manager = g_browser_process->profile_manager(); ProfileManager* profile_manager = g_browser_process->profile_manager();
DCHECK(profile_manager); DCHECK(profile_manager);
avatar_menu_ = std::make_unique<AvatarMenu>( avatar_menu_ = std::make_unique<AvatarMenu>(
&profile_manager->GetProfileAttributesStorage(), this, nullptr); &profile_manager->GetProfileAttributesStorage(), this,
BrowserList::GetInstance()->GetLastActive());
avatar_menu_->RebuildMenu(); avatar_menu_->RebuildMenu();
BrowserList::AddObserver(this); BrowserList::AddObserver(this);
......
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