| Index: chrome/browser/media/tab_desktop_media_list.cc
|
| diff --git a/chrome/browser/media/tab_desktop_media_list.cc b/chrome/browser/media/tab_desktop_media_list.cc
|
| index 76a1bb839512bbec99851123f95a128613097068..911171613ec57a6da263c5a51295ebe22f83ee8e 100644
|
| --- a/chrome/browser/media/tab_desktop_media_list.cc
|
| +++ b/chrome/browser/media/tab_desktop_media_list.cc
|
| @@ -73,6 +73,11 @@ void TabDesktopMediaList::Refresh() {
|
| DCHECK_CURRENTLY_ON(BrowserThread::UI);
|
|
|
| Profile* profile = ProfileManager::GetLastUsedProfileAllowedByPolicy();
|
| + if (!profile) {
|
| + ScheduleNextRefresh();
|
| + return;
|
| + }
|
| +
|
| std::vector<Browser*> browsers;
|
| for (auto* browser : *BrowserList::GetInstance()) {
|
| if (browser->profile()->GetOriginalProfile() ==
|
| @@ -130,9 +135,9 @@ void TabDesktopMediaList::Refresh() {
|
| favicon_hashes_ = new_favicon_hashes;
|
|
|
| // Sort tab sources by time. Most recent one first. Then update sources list.
|
| - for (auto it = tab_map.rbegin(); it != tab_map.rend(); ++it) {
|
| + for (auto it = tab_map.rbegin(); it != tab_map.rend(); ++it)
|
| sources.push_back(it->second);
|
| - }
|
| +
|
| UpdateSourcesList(sources);
|
|
|
| for (const auto& it : favicon_pairs) {
|
|
|