Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(125)

Issue 1266003004: Do not expire permission bubbles for in-page navigations. (Closed)

Created:
5 years, 4 months ago by Avi (use Gerrit)
Modified:
5 years, 4 months ago
CC:
mlamouri (slow - plz ping), chromium-reviews, markusheintz_, raymes+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Do not expire permission bubbles for in-page navigations. When the IN_PAGE classification was removed in r337562, such navigations were folded into EXISTING_PAGE. The PermissionBubbleManager was checking for EXISTING_PAGE with the understanding that it did not include in-page navigations; restore that understanding. BUG=516309 TEST=as in bug Committed: https://crrev.com/4e2c120b7ff86303421ef94a36d0f8de4bc558ea Cr-Commit-Position: refs/heads/master@{#341554}

Patch Set 1 #

Total comments: 5
Unified diffs Side-by-side diffs Delta from patch set Stats (+2 lines, -1 line) Patch
M chrome/browser/ui/website_settings/permission_bubble_manager.cc View 1 chunk +2 lines, -1 line 5 comments Download

Messages

Total messages: 17 (4 generated)
Avi (use Gerrit)
Adrienne, something for you. BTW, I searched the code, and PermissionBubbleManager is the only code ...
5 years, 4 months ago (2015-08-03 16:52:14 UTC) #2
felt
+hector and mounir as an FYI since you were both touching this code Thanks Avi, ...
5 years, 4 months ago (2015-08-03 17:15:28 UTC) #3
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1266003004/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1266003004/1
5 years, 4 months ago (2015-08-03 17:35:46 UTC) #5
commit-bot: I haz the power
Committed patchset #1 (id:1)
5 years, 4 months ago (2015-08-03 18:13:18 UTC) #6
commit-bot: I haz the power
Patchset 1 (id:??) landed as https://crrev.com/4e2c120b7ff86303421ef94a36d0f8de4bc558ea Cr-Commit-Position: refs/heads/master@{#341554}
5 years, 4 months ago (2015-08-03 18:14:55 UTC) #7
mlamouri (slow - plz ping)
https://codereview.chromium.org/1266003004/diff/1/chrome/browser/ui/website_settings/permission_bubble_manager.cc File chrome/browser/ui/website_settings/permission_bubble_manager.cc (right): https://codereview.chromium.org/1266003004/diff/1/chrome/browser/ui/website_settings/permission_bubble_manager.cc#newcode277 chrome/browser/ui/website_settings/permission_bubble_manager.cc:277: !details.is_in_page)) { Why not use ::DidNavigateAnyFrame() to merge this ...
5 years, 4 months ago (2015-08-04 11:56:38 UTC) #9
Avi (use Gerrit)
https://codereview.chromium.org/1266003004/diff/1/chrome/browser/ui/website_settings/permission_bubble_manager.cc File chrome/browser/ui/website_settings/permission_bubble_manager.cc (right): https://codereview.chromium.org/1266003004/diff/1/chrome/browser/ui/website_settings/permission_bubble_manager.cc#newcode277 chrome/browser/ui/website_settings/permission_bubble_manager.cc:277: !details.is_in_page)) { On 2015/08/04 11:56:38, Mounir Lamouri wrote: > ...
5 years, 4 months ago (2015-08-04 14:28:16 UTC) #10
hcarmona
https://codereview.chromium.org/1266003004/diff/1/chrome/browser/ui/website_settings/permission_bubble_manager.cc File chrome/browser/ui/website_settings/permission_bubble_manager.cc (right): https://codereview.chromium.org/1266003004/diff/1/chrome/browser/ui/website_settings/permission_bubble_manager.cc#newcode277 chrome/browser/ui/website_settings/permission_bubble_manager.cc:277: !details.is_in_page)) { It looks like using GetAsReferrer to compare ...
5 years, 4 months ago (2015-08-04 23:10:44 UTC) #12
Avi (use Gerrit)
https://codereview.chromium.org/1266003004/diff/1/chrome/browser/ui/website_settings/permission_bubble_manager.cc File chrome/browser/ui/website_settings/permission_bubble_manager.cc (right): https://codereview.chromium.org/1266003004/diff/1/chrome/browser/ui/website_settings/permission_bubble_manager.cc#newcode277 chrome/browser/ui/website_settings/permission_bubble_manager.cc:277: !details.is_in_page)) { On 2015/08/04 23:10:44, Hector Carmona wrote: > ...
5 years, 4 months ago (2015-08-05 15:11:48 UTC) #13
hcarmona
https://codereview.chromium.org/1266003004/diff/1/chrome/browser/ui/website_settings/permission_bubble_manager.cc File chrome/browser/ui/website_settings/permission_bubble_manager.cc (right): https://codereview.chromium.org/1266003004/diff/1/chrome/browser/ui/website_settings/permission_bubble_manager.cc#newcode277 chrome/browser/ui/website_settings/permission_bubble_manager.cc:277: !details.is_in_page)) { On 2015/08/05 15:11:48, Avi wrote: > On ...
5 years, 4 months ago (2015-08-05 18:51:04 UTC) #14
Avi (use Gerrit)
On 2015/08/05 18:51:04, Hector Carmona wrote: > https://codereview.chromium.org/1266003004/diff/1/chrome/browser/ui/website_settings/permission_bubble_manager.cc > File chrome/browser/ui/website_settings/permission_bubble_manager.cc (right): > > https://codereview.chromium.org/1266003004/diff/1/chrome/browser/ui/website_settings/permission_bubble_manager.cc#newcode277 ...
5 years, 4 months ago (2015-08-05 19:07:12 UTC) #15
Avi (use Gerrit)
On 2015/08/05 19:07:12, Avi wrote: > On 2015/08/05 18:51:04, Hector Carmona wrote: > > > ...
5 years, 4 months ago (2015-08-05 19:31:16 UTC) #16
hcarmona
5 years, 4 months ago (2015-08-05 21:00:47 UTC) #17
Message was sent while issue was closed.
On 2015/08/05 19:31:16, Avi wrote:
> On 2015/08/05 19:07:12, Avi wrote:
> > On 2015/08/05 18:51:04, Hector Carmona wrote:
> > >
> >
>
https://codereview.chromium.org/1266003004/diff/1/chrome/browser/ui/website_s...
> > > File chrome/browser/ui/website_settings/permission_bubble_manager.cc
> (right):
> > > 
> > >
> >
>
https://codereview.chromium.org/1266003004/diff/1/chrome/browser/ui/website_s...
> > > chrome/browser/ui/website_settings/permission_bubble_manager.cc:277:
> > > !details.is_in_page)) {
> > > On 2015/08/05 15:11:48, Avi wrote:
> > > > On 2015/08/04 23:10:44, Hector Carmona wrote:
> > > > > It looks like using GetAsReferrer to compare the request and previous
> > > > > URLs is trying to achieve the same as details.is_in_page.
> > > > > 
> > > > > I think it might be best to change this if condition to:
> > > > > 
> > > > > if (!details.is_in_page ||
> > > > >     details.type == content::NAVIGATION_TYPE_SAME_PAGE ||
> > > > >     details.type == content::NAVIGATION_TYPE_EXISTING_PAGE)
> > > > > 
> > > > > Because we want to clear permissions if we navigate to a different
URL,
> > > > > explicitly navigate to the same page, or refresh the page.
> > > > 
> > > > But that's different behavior. The bug calls out going back over an
> in-page
> > > > navigation which is EXISTING_PAGE + is_in_page.
> > > > 
> > > > If you want to argue that the current behavior is incorrect, that's fine
> > with
> > > > me; I'm no expert. Go make a CL to do it. But my change _restored_ the
> > > behavior
> > > > that this had before my change.
> > > 
> > > Interesting. I didn't know there were cases where the permission bubbles
> > > should survive back/forward navigation, but it does makes sense.
> > > 
> > > I can make a change to get to the correct behavior, but I want to
> > > clarify what that is exactly. Are there other cases I'm not aware of?
> > > go/when-to-dismiss-permissions
> > 
> > I don't know. I'm not a permissions person, I'm a navigation person who
broke
> > this little bit of code.
> 
> BTW, I'm interested in exploring a rewrite of this part of the code with you,
as
> I'm investigating the possibility of removing NavigationType.

That sounds good. We're in the process of refactoring bubbles, so
updating this code would be great if we can remove some of the
complexity.

Powered by Google App Engine
This is Rietveld 408576698