|
|
Chromium Code Reviews|
Created:
3 years, 6 months ago by Alexei Svitkine (slow) Modified:
3 years, 5 months ago CC:
chromium-reviews, tfarina, rkaplow Target Ref:
refs/heads/master Project:
chromium Visibility:
Public. |
DescriptionFix duplicate logging of ActiveBrowserChanged action on views.
This was caused by redundant calls to BrowserList::SetLastActive,
one from BrowserFrame and another from BrowserView:
views::DesktopNativeWidgetAura::HandleActivationChanged()
BrowserFrame::OnNativeWidgetActivationChanged()
BrowserList::SetLastActive()
and:
views::DesktopNativeWidgetAura::HandleActivationChanged()
BrowserFrame::OnNativeWidgetActivationChanged()
views::Widget::OnNativeWidgetActivationChanged()
BrowserView::OnWidgetActivationChanged()
BrowserList::SetLastActive()
The change removes the call from BrowserFrame since it seems
redundant with the one in BrowserView which observes its widget
(via GetWidget()->AddObserver(this) call in InitViews()), so it
will always get the OnWidgetActivationChanged() notifications -
and it needs them for other things already.
Also fixes ChromeVisibilityObserverBrowserTest on Windows which was
fragile to the ordering of active/inactive events (and just happened to
work due to the duplicate events). That test was also made unnecessarily
complex by https://codereview.chromium.org/2591783002 so this change
reverts most of that CL and simplifies things via RunLoop::RunUntilIdle().
BUG=689553
TEST=Open two windows and then load chrome://user-actions. Switch
windows and observe only a single instance of ActiveBrowserChanged
logged per window switch.
Review-Url: https://codereview.chromium.org/2939943004
Cr-Commit-Position: refs/heads/master@{#483695}
Committed: https://chromium.googlesource.com/chromium/src/+/ba8e10dc8119f1bd7d2f365b2b3078f68aeb16cf
Patch Set 1 #Patch Set 2 : Fix ChromeVisibilityObserverBrowserTest on windows. #
Messages
Total messages: 26 (19 generated)
The CQ bit was checked by asvitkine@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
asvitkine@chromium.org changed reviewers: + pkasting@chromium.org
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: win_chromium_rel_ng on master.tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_...)
Actually, please hold off on this review. Looks like there's a problem with ChromeVisibilityObserverBrowserTest.VisibilityTest on Windows. Will investigate.
Description was changed from ========== Fix duplicate logging of ActiveBrowserChanged action on views. This was caused by redundant calls to BrowserList::SetLastActive, one from BrowserFrame and another from BrowserView: views::DesktopNativeWidgetAura::HandleActivationChanged() BrowserFrame::OnNativeWidgetActivationChanged() BrowserList::SetLastActive() and: views::DesktopNativeWidgetAura::HandleActivationChanged() BrowserFrame::OnNativeWidgetActivationChanged() views::Widget::OnNativeWidgetActivationChanged() BrowserView::OnWidgetActivationChanged() BrowserList::SetLastActive() The change removes the call from BrowserFrame since it seems redundant with the one in BrowserView which observes its widget (via GetWidget()->AddObserver(this) call in InitViews()), so it will always get the OnWidgetActivationChanged() notifications - and it needs them for other things already. BUG=689553 TEST=Open two windows and then load chrome://user-actions. Switch windows and observe only a single instance of ActiveBrowserChanged logged per window switch. ========== to ========== Fix duplicate logging of ActiveBrowserChanged action on views. This was caused by redundant calls to BrowserList::SetLastActive, one from BrowserFrame and another from BrowserView: views::DesktopNativeWidgetAura::HandleActivationChanged() BrowserFrame::OnNativeWidgetActivationChanged() BrowserList::SetLastActive() and: views::DesktopNativeWidgetAura::HandleActivationChanged() BrowserFrame::OnNativeWidgetActivationChanged() views::Widget::OnNativeWidgetActivationChanged() BrowserView::OnWidgetActivationChanged() BrowserList::SetLastActive() The change removes the call from BrowserFrame since it seems redundant with the one in BrowserView which observes its widget (via GetWidget()->AddObserver(this) call in InitViews()), so it will always get the OnWidgetActivationChanged() notifications - and it needs them for other things already. BUG=689553 TEST=Open two windows and then load chrome://user-actions. Switch windows and observe only a single instance of ActiveBrowserChanged logged per window switch. ==========
asvitkine@chromium.org changed reviewers: - pkasting@chromium.org
The CQ bit was checked by asvitkine@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Description was changed from ========== Fix duplicate logging of ActiveBrowserChanged action on views. This was caused by redundant calls to BrowserList::SetLastActive, one from BrowserFrame and another from BrowserView: views::DesktopNativeWidgetAura::HandleActivationChanged() BrowserFrame::OnNativeWidgetActivationChanged() BrowserList::SetLastActive() and: views::DesktopNativeWidgetAura::HandleActivationChanged() BrowserFrame::OnNativeWidgetActivationChanged() views::Widget::OnNativeWidgetActivationChanged() BrowserView::OnWidgetActivationChanged() BrowserList::SetLastActive() The change removes the call from BrowserFrame since it seems redundant with the one in BrowserView which observes its widget (via GetWidget()->AddObserver(this) call in InitViews()), so it will always get the OnWidgetActivationChanged() notifications - and it needs them for other things already. BUG=689553 TEST=Open two windows and then load chrome://user-actions. Switch windows and observe only a single instance of ActiveBrowserChanged logged per window switch. ========== to ========== Fix duplicate logging of ActiveBrowserChanged action on views. This was caused by redundant calls to BrowserList::SetLastActive, one from BrowserFrame and another from BrowserView: views::DesktopNativeWidgetAura::HandleActivationChanged() BrowserFrame::OnNativeWidgetActivationChanged() BrowserList::SetLastActive() and: views::DesktopNativeWidgetAura::HandleActivationChanged() BrowserFrame::OnNativeWidgetActivationChanged() views::Widget::OnNativeWidgetActivationChanged() BrowserView::OnWidgetActivationChanged() BrowserList::SetLastActive() The change removes the call from BrowserFrame since it seems redundant with the one in BrowserView which observes its widget (via GetWidget()->AddObserver(this) call in InitViews()), so it will always get the OnWidgetActivationChanged() notifications - and it needs them for other things already. Also fixes ChromeVisibilityObserverBrowserTest on Windows which was fragile to the ordering of active/inactive events. It was also made unnecessarily complex by https://codereview.chromium.org/2591783002 so this change actually reverts most of that CL by using the simpler RunLoop::RunUntilIdle(). BUG=689553 TEST=Open two windows and then load chrome://user-actions. Switch windows and observe only a single instance of ActiveBrowserChanged logged per window switch. ==========
Patchset #2 (id:20001) has been deleted
Description was changed from ========== Fix duplicate logging of ActiveBrowserChanged action on views. This was caused by redundant calls to BrowserList::SetLastActive, one from BrowserFrame and another from BrowserView: views::DesktopNativeWidgetAura::HandleActivationChanged() BrowserFrame::OnNativeWidgetActivationChanged() BrowserList::SetLastActive() and: views::DesktopNativeWidgetAura::HandleActivationChanged() BrowserFrame::OnNativeWidgetActivationChanged() views::Widget::OnNativeWidgetActivationChanged() BrowserView::OnWidgetActivationChanged() BrowserList::SetLastActive() The change removes the call from BrowserFrame since it seems redundant with the one in BrowserView which observes its widget (via GetWidget()->AddObserver(this) call in InitViews()), so it will always get the OnWidgetActivationChanged() notifications - and it needs them for other things already. Also fixes ChromeVisibilityObserverBrowserTest on Windows which was fragile to the ordering of active/inactive events. It was also made unnecessarily complex by https://codereview.chromium.org/2591783002 so this change actually reverts most of that CL by using the simpler RunLoop::RunUntilIdle(). BUG=689553 TEST=Open two windows and then load chrome://user-actions. Switch windows and observe only a single instance of ActiveBrowserChanged logged per window switch. ========== to ========== Fix duplicate logging of ActiveBrowserChanged action on views. This was caused by redundant calls to BrowserList::SetLastActive, one from BrowserFrame and another from BrowserView: views::DesktopNativeWidgetAura::HandleActivationChanged() BrowserFrame::OnNativeWidgetActivationChanged() BrowserList::SetLastActive() and: views::DesktopNativeWidgetAura::HandleActivationChanged() BrowserFrame::OnNativeWidgetActivationChanged() views::Widget::OnNativeWidgetActivationChanged() BrowserView::OnWidgetActivationChanged() BrowserList::SetLastActive() The change removes the call from BrowserFrame since it seems redundant with the one in BrowserView which observes its widget (via GetWidget()->AddObserver(this) call in InitViews()), so it will always get the OnWidgetActivationChanged() notifications - and it needs them for other things already. Also fixes ChromeVisibilityObserverBrowserTest on Windows which was fragile to the ordering of active/inactive events (and just happened to work due to the duplicate events). That test was also made unnecessarily complex by https://codereview.chromium.org/2591783002 so this change reverts most of that CL and simplifies things via RunLoop::RunUntilIdle(). BUG=689553 TEST=Open two windows and then load chrome://user-actions. Switch windows and observe only a single instance of ActiveBrowserChanged logged per window switch. ==========
Description was changed from ========== Fix duplicate logging of ActiveBrowserChanged action on views. This was caused by redundant calls to BrowserList::SetLastActive, one from BrowserFrame and another from BrowserView: views::DesktopNativeWidgetAura::HandleActivationChanged() BrowserFrame::OnNativeWidgetActivationChanged() BrowserList::SetLastActive() and: views::DesktopNativeWidgetAura::HandleActivationChanged() BrowserFrame::OnNativeWidgetActivationChanged() views::Widget::OnNativeWidgetActivationChanged() BrowserView::OnWidgetActivationChanged() BrowserList::SetLastActive() The change removes the call from BrowserFrame since it seems redundant with the one in BrowserView which observes its widget (via GetWidget()->AddObserver(this) call in InitViews()), so it will always get the OnWidgetActivationChanged() notifications - and it needs them for other things already. Also fixes ChromeVisibilityObserverBrowserTest on Windows which was fragile to the ordering of active/inactive events (and just happened to work due to the duplicate events). That test was also made unnecessarily complex by https://codereview.chromium.org/2591783002 so this change reverts most of that CL and simplifies things via RunLoop::RunUntilIdle(). BUG=689553 TEST=Open two windows and then load chrome://user-actions. Switch windows and observe only a single instance of ActiveBrowserChanged logged per window switch. ========== to ========== Fix duplicate logging of ActiveBrowserChanged action on views. This was caused by redundant calls to BrowserList::SetLastActive, one from BrowserFrame and another from BrowserView: views::DesktopNativeWidgetAura::HandleActivationChanged() BrowserFrame::OnNativeWidgetActivationChanged() BrowserList::SetLastActive() and: views::DesktopNativeWidgetAura::HandleActivationChanged() BrowserFrame::OnNativeWidgetActivationChanged() views::Widget::OnNativeWidgetActivationChanged() BrowserView::OnWidgetActivationChanged() BrowserList::SetLastActive() The change removes the call from BrowserFrame since it seems redundant with the one in BrowserView which observes its widget (via GetWidget()->AddObserver(this) call in InitViews()), so it will always get the OnWidgetActivationChanged() notifications - and it needs them for other things already. Also fixes ChromeVisibilityObserverBrowserTest on Windows which was fragile to the ordering of active/inactive events (and just happened to work due to the duplicate events). That test was also made unnecessarily complex by https://codereview.chromium.org/2591783002 so this change reverts most of that CL and simplifies things via RunLoop::RunUntilIdle(). BUG=689553 TEST=Open two windows and then load chrome://user-actions. Switch windows and observe only a single instance of ActiveBrowserChanged logged per window switch. ==========
asvitkine@chromium.org changed reviewers: + pkasting@chromium.org, rkaplow@chromium.org
Okay, this is ready for review again! pkasting: please review chrome/browser/ui rkaplow: please review chrome/browser/metrics
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
LGTM
lgtm
The CQ bit was checked by asvitkine@chromium.org
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
CQ is committing da patch.
Bot data: {"patchset_id": 40001, "attempt_start_ts": 1498832144209250,
"parent_rev": "c65e5b86d2530a035bf17612b2e12109c942d878", "commit_rev":
"ba8e10dc8119f1bd7d2f365b2b3078f68aeb16cf"}
Message was sent while issue was closed.
Description was changed from ========== Fix duplicate logging of ActiveBrowserChanged action on views. This was caused by redundant calls to BrowserList::SetLastActive, one from BrowserFrame and another from BrowserView: views::DesktopNativeWidgetAura::HandleActivationChanged() BrowserFrame::OnNativeWidgetActivationChanged() BrowserList::SetLastActive() and: views::DesktopNativeWidgetAura::HandleActivationChanged() BrowserFrame::OnNativeWidgetActivationChanged() views::Widget::OnNativeWidgetActivationChanged() BrowserView::OnWidgetActivationChanged() BrowserList::SetLastActive() The change removes the call from BrowserFrame since it seems redundant with the one in BrowserView which observes its widget (via GetWidget()->AddObserver(this) call in InitViews()), so it will always get the OnWidgetActivationChanged() notifications - and it needs them for other things already. Also fixes ChromeVisibilityObserverBrowserTest on Windows which was fragile to the ordering of active/inactive events (and just happened to work due to the duplicate events). That test was also made unnecessarily complex by https://codereview.chromium.org/2591783002 so this change reverts most of that CL and simplifies things via RunLoop::RunUntilIdle(). BUG=689553 TEST=Open two windows and then load chrome://user-actions. Switch windows and observe only a single instance of ActiveBrowserChanged logged per window switch. ========== to ========== Fix duplicate logging of ActiveBrowserChanged action on views. This was caused by redundant calls to BrowserList::SetLastActive, one from BrowserFrame and another from BrowserView: views::DesktopNativeWidgetAura::HandleActivationChanged() BrowserFrame::OnNativeWidgetActivationChanged() BrowserList::SetLastActive() and: views::DesktopNativeWidgetAura::HandleActivationChanged() BrowserFrame::OnNativeWidgetActivationChanged() views::Widget::OnNativeWidgetActivationChanged() BrowserView::OnWidgetActivationChanged() BrowserList::SetLastActive() The change removes the call from BrowserFrame since it seems redundant with the one in BrowserView which observes its widget (via GetWidget()->AddObserver(this) call in InitViews()), so it will always get the OnWidgetActivationChanged() notifications - and it needs them for other things already. Also fixes ChromeVisibilityObserverBrowserTest on Windows which was fragile to the ordering of active/inactive events (and just happened to work due to the duplicate events). That test was also made unnecessarily complex by https://codereview.chromium.org/2591783002 so this change reverts most of that CL and simplifies things via RunLoop::RunUntilIdle(). BUG=689553 TEST=Open two windows and then load chrome://user-actions. Switch windows and observe only a single instance of ActiveBrowserChanged logged per window switch. Review-Url: https://codereview.chromium.org/2939943004 Cr-Commit-Position: refs/heads/master@{#483695} Committed: https://chromium.googlesource.com/chromium/src/+/ba8e10dc8119f1bd7d2f365b2b30... ==========
Message was sent while issue was closed.
Committed patchset #2 (id:40001) as https://chromium.googlesource.com/chromium/src/+/ba8e10dc8119f1bd7d2f365b2b30... |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
