New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 754754 link

Starred by 3 users

Issue metadata

Status: Fixed
Owner:
Not on Chrome anymore
Closed: Nov 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 1
Type: Feature

Blocking:
issue 624061



Sign in to add a comment

Show infobar to notify the user of blocked redirections

Project Member Reported by dgn@chromium.org, Aug 11 2017

Issue description

See issue 624061 for context and design doc.

Mocks attached.

UI Review deck: https://docs.google.com/presentation/d/1QOY-bQ8HG7rrhCHF3UE_5iqzlcx-x3t3pjFQH22kNuY/

Repro steps:
1. Make sure the "Framebusting requires same-origin or a user gesture" feature in enabled via chrome:flags, relaunch Chrome if necessary
2. Go to https://ndossougbete.github.io/web-sandbox/interventions/3p-redirect/

TODO:
- [x] Add repro steps to trigger the notification.
- [x] Update icon with the ones provided at  https://drive.google.com/corp/drive/folders/0B63LqjsMmAX_TGdvYXYyeGU4ekU
- [x] Format and elide URL to fit on a single line
- [x] Only show the latest redirection: close current infobar then show the new one with the new blocked redirection.
 
media-20171018.png
200 KB View Download
media-201710182.png
147 KB View Download

Comment 1 by dgn@chromium.org, Aug 15 2017

Implementation preview: 
compact.Nexus_5.portrait.png
48.8 KB View Download
expanded.Nexus_5.portrait.png
109 KB View Download

Comment 2 by dgn@chromium.org, Aug 22 2017

Description: Show this description
Project Member

Comment 3 by bugdroid1@chromium.org, Sep 9 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/bcab247aed2e45b17b00dcbe8cab6133b97f1d0e

commit bcab247aed2e45b17b00dcbe8cab6133b97f1d0e
Author: Nicolas Dossou-gbete <dgn@chromium.org>
Date: Sat Sep 09 12:28:40 2017

📱 Notify of blocked framebusts by showing an infobar

FramebustBlockInfoBarDelegate handles strings and behaviour
for the message shown by Chrome when a third party redirection is
blocked. The infobar is currently only implemented for Android, but
the delegate can be reused for other platforms when the UI there
is implemented.

Bug:  754754 
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_site_isolation
Change-Id: Idf9ccac5b853f2184a79e037f264a88608ba62b5
Reviewed-on: https://chromium-review.googlesource.com/612345
Commit-Queue: Nicolas Dossou-Gbété <dgn@chromium.org>
Reviewed-by: Matthew Jones <mdjones@chromium.org>
Reviewed-by: Peter Kasting <pkasting@chromium.org>
Reviewed-by: Bernhard Bauer <bauerb@chromium.org>
Reviewed-by: Jochen Eisinger <jochen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#500795}
[add] https://crrev.com/bcab247aed2e45b17b00dcbe8cab6133b97f1d0e/chrome/android/java/src/org/chromium/chrome/browser/infobar/FramebustBlockInfoBar.java
[modify] https://crrev.com/bcab247aed2e45b17b00dcbe8cab6133b97f1d0e/chrome/android/java/src/org/chromium/chrome/browser/infobar/InfoBarContainer.java
[add] https://crrev.com/bcab247aed2e45b17b00dcbe8cab6133b97f1d0e/chrome/android/java/src/org/chromium/chrome/browser/interventions/FramebustBlockMessageDelegate.java
[add] https://crrev.com/bcab247aed2e45b17b00dcbe8cab6133b97f1d0e/chrome/android/java/src/org/chromium/chrome/browser/interventions/FramebustBlockMessageDelegateBridge.java
[modify] https://crrev.com/bcab247aed2e45b17b00dcbe8cab6133b97f1d0e/chrome/android/java_sources.gni
[add] https://crrev.com/bcab247aed2e45b17b00dcbe8cab6133b97f1d0e/chrome/android/javatests/src/org/chromium/chrome/browser/infobar/InfoBarAppearanceTest.java
[modify] https://crrev.com/bcab247aed2e45b17b00dcbe8cab6133b97f1d0e/chrome/app/chromium_strings.grd
[modify] https://crrev.com/bcab247aed2e45b17b00dcbe8cab6133b97f1d0e/chrome/app/google_chrome_strings.grd
[modify] https://crrev.com/bcab247aed2e45b17b00dcbe8cab6133b97f1d0e/chrome/browser/BUILD.gn
[modify] https://crrev.com/bcab247aed2e45b17b00dcbe8cab6133b97f1d0e/chrome/browser/android/resource_id.h
[modify] https://crrev.com/bcab247aed2e45b17b00dcbe8cab6133b97f1d0e/chrome/browser/android/tab_web_contents_delegate_android.cc
[modify] https://crrev.com/bcab247aed2e45b17b00dcbe8cab6133b97f1d0e/chrome/browser/android/tab_web_contents_delegate_android.h
[modify] https://crrev.com/bcab247aed2e45b17b00dcbe8cab6133b97f1d0e/chrome/browser/ui/BUILD.gn
[add] https://crrev.com/bcab247aed2e45b17b00dcbe8cab6133b97f1d0e/chrome/browser/ui/android/infobars/framebust_block_infobar.cc
[add] https://crrev.com/bcab247aed2e45b17b00dcbe8cab6133b97f1d0e/chrome/browser/ui/android/infobars/framebust_block_infobar.h
[add] https://crrev.com/bcab247aed2e45b17b00dcbe8cab6133b97f1d0e/chrome/browser/ui/android/interventions/framebust_block_message_delegate_bridge.cc
[add] https://crrev.com/bcab247aed2e45b17b00dcbe8cab6133b97f1d0e/chrome/browser/ui/android/interventions/framebust_block_message_delegate_bridge.h
[add] https://crrev.com/bcab247aed2e45b17b00dcbe8cab6133b97f1d0e/chrome/browser/ui/interventions/framebust_block_message_delegate.cc
[add] https://crrev.com/bcab247aed2e45b17b00dcbe8cab6133b97f1d0e/chrome/browser/ui/interventions/framebust_block_message_delegate.h
[modify] https://crrev.com/bcab247aed2e45b17b00dcbe8cab6133b97f1d0e/components/infobars/core/infobar_delegate.h
[modify] https://crrev.com/bcab247aed2e45b17b00dcbe8cab6133b97f1d0e/components/web_contents_delegate_android/web_contents_delegate_android.cc
[modify] https://crrev.com/bcab247aed2e45b17b00dcbe8cab6133b97f1d0e/components/web_contents_delegate_android/web_contents_delegate_android.h
[modify] https://crrev.com/bcab247aed2e45b17b00dcbe8cab6133b97f1d0e/content/browser/frame_host/render_frame_host_delegate.h
[modify] https://crrev.com/bcab247aed2e45b17b00dcbe8cab6133b97f1d0e/content/browser/frame_host/render_frame_host_impl.cc
[modify] https://crrev.com/bcab247aed2e45b17b00dcbe8cab6133b97f1d0e/content/browser/web_contents/web_contents_impl.cc
[modify] https://crrev.com/bcab247aed2e45b17b00dcbe8cab6133b97f1d0e/content/browser/web_contents/web_contents_impl.h
[modify] https://crrev.com/bcab247aed2e45b17b00dcbe8cab6133b97f1d0e/content/public/browser/web_contents_delegate.h
[modify] https://crrev.com/bcab247aed2e45b17b00dcbe8cab6133b97f1d0e/tools/metrics/histograms/enums.xml

Comment 4 by dgn@chromium.org, Sep 29 2017

Description: Show this description

Comment 5 by dgn@chromium.org, Oct 18 2017

Description: Show this description

Comment 6 by dgn@chromium.org, Oct 20 2017

Cc: ojan@chromium.org
@ojan: Regarding point 4: "Only show the latest redirection: close current infobar then show the new one with the new blocked redirection."

This is not very straightforward to do now, as mutating infobars is not supported by the current system. I could change that, but the way infobars work currently is closely tied to the deprecated desktop infobars and we plan to completely separate the Android ones from it soon. So I would prefer to not have to do work that we already plan to throw away.

The current behaviour is that we show an infobar for each redirection, the new ones stacking behind the currently shown infobar. They can be visible once the foreground one is closed. Considering how often this would happen I think the current state is acceptable until we have a decent path to implement the required behaviour. WDYT?
Project Member

Comment 7 by bugdroid1@chromium.org, Oct 20 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/896666a783ee268eed4d438ecbba6a62701f3a69

commit 896666a783ee268eed4d438ecbba6a62701f3a69
Author: Nicolas Dossou-gbete <dgn@chromium.org>
Date: Fri Oct 20 09:49:53 2017

[Interventions] Update icons for Redirect Intervention infobar

Bug:  754754 
Change-Id: Id0aae68cd74e8b01cba6f721f5c0c17d5abb0ca8
Reviewed-on: https://chromium-review.googlesource.com/725384
Commit-Queue: Nicolas Dossou-Gbété <dgn@chromium.org>
Reviewed-by: Bernhard Bauer <bauerb@chromium.org>
Reviewed-by: Trent Apted <tapted@chromium.org>
Cr-Commit-Position: refs/heads/master@{#510392}
[add] https://crrev.com/896666a783ee268eed4d438ecbba6a62701f3a69/chrome/android/java/res/drawable-hdpi/infobar_redirect_blocked.png
[add] https://crrev.com/896666a783ee268eed4d438ecbba6a62701f3a69/chrome/android/java/res/drawable-mdpi/infobar_redirect_blocked.png
[add] https://crrev.com/896666a783ee268eed4d438ecbba6a62701f3a69/chrome/android/java/res/drawable-xhdpi/infobar_redirect_blocked.png
[add] https://crrev.com/896666a783ee268eed4d438ecbba6a62701f3a69/chrome/android/java/res/drawable-xxhdpi/infobar_redirect_blocked.png
[add] https://crrev.com/896666a783ee268eed4d438ecbba6a62701f3a69/chrome/android/java/res/drawable-xxxhdpi/infobar_redirect_blocked.png
[modify] https://crrev.com/896666a783ee268eed4d438ecbba6a62701f3a69/chrome/browser/android/resource_id.h
[modify] https://crrev.com/896666a783ee268eed4d438ecbba6a62701f3a69/chrome/browser/ui/interventions/framebust_block_message_delegate.cc

Comment 8 by dgn@chromium.org, Oct 20 2017

Description: Show this description

Comment 10 by dgn@chromium.org, Oct 27 2017

Description: Show this description
Re comment 6, this would effectively have the behavior of only showing the latest one, up until the user dismisses it. Is that accurate? That seems fine to me.
Cc: -lemurb@google.com rsch...@chromium.org

Comment 13 by dgn@chromium.org, Oct 28 2017

No, the first one, until the user dismisses it. I think that's okay because the first one is the one that would have been actually applied anyway.

Comment 14 by dgn@chromium.org, Oct 31 2017

Description: Show this description

Comment 15 by ojan@chromium.org, Nov 4 2017

I feel like either showing the whole stack or showing the latest is fine. I think showing the first one is likely to be confusing because it's the one closest to the last action that they did that is most likely to be what they are aiming for.

But...honestly, it's so rare for there to be more than one that I think we are probably fine doing whatever as long as we UMA how often we would need to show more than 1 so we can verify that it's as rare as we think it should be.
Project Member

Comment 16 by bugdroid1@chromium.org, Nov 15 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/eeaaa91e079a5a3995528fb8bda696b05caec56c

commit eeaaa91e079a5a3995528fb8bda696b05caec56c
Author: Nicolas Dossou-gbete <dgn@chromium.org>
Date: Wed Nov 15 20:41:57 2017

👮 Hide existing Framebust block infobars when showing a new one

We only want to show one infobar about blocking a redirection,
so we close the existing one (if any) to show the new one.

As part of this change, InfobarManager::AddInfoBar can now take a flag
specifying whether the new infobar should be deleted or replace an
existing one when a matching infobar is already present.

Preview: https://photos.app.goo.gl/6Yodydy2JgdKbT4I3
Bug:  754754 
Change-Id: I9b1f5637248669705c4e936cdc1ea8c73f6fb08c
Reviewed-on: https://chromium-review.googlesource.com/760738
Commit-Queue: Nicolas Dossou-Gbété <dgn@chromium.org>
Reviewed-by: Evan Stade <estade@chromium.org>
Reviewed-by: Matthew Jones <mdjones@chromium.org>
Cr-Commit-Position: refs/heads/master@{#516812}
[modify] https://crrev.com/eeaaa91e079a5a3995528fb8bda696b05caec56c/chrome/browser/ui/android/infobars/framebust_block_infobar.cc
[modify] https://crrev.com/eeaaa91e079a5a3995528fb8bda696b05caec56c/components/infobars/core/infobar_manager.cc
[modify] https://crrev.com/eeaaa91e079a5a3995528fb8bda696b05caec56c/components/infobars/core/infobar_manager.h

Comment 17 by dgn@chromium.org, Nov 15 2017

Description: Show this description

Comment 18 by dgn@chromium.org, Nov 15 2017

Status: Fixed (was: Started)
re #c15: Actually been able to implement the infobar replacement concisely, so I didn't do the UMA to evaluate whether it's worth doing. Hope that's fine.
No more work planned for the Android UI for new, closing this bug.

Comment 19 by ojan@chromium.org, Nov 15 2017

lgtm

Sign in to add a comment