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

Issue 148153008: Protocol handler dialogs should only be enabled by browser or page actions [Not committed] (Closed)

Created:
6 years, 11 months ago by meacer
Modified:
6 years, 8 months ago
CC:
chromium-reviews, chromium-apps-reviews_chromium.org, extensions-reviews_chromium.org
Visibility:
Public.

Description

Protocol handler dialogs should only be enabled by browser or page actions and not by arbitrary extension functions. BUG=173557

Patch Set 1 #

Total comments: 2

Patch Set 2 : jyasskin comment #

Patch Set 3 : . #

Patch Set 4 : Rebase #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+9 lines, -4 lines) Patch
M chrome/browser/extensions/active_tab_permission_granter.cc View 1 2 3 2 chunks +6 lines, -0 lines 0 comments Download
M chrome/browser/extensions/api/messaging/message_service.cc View 1 2 3 2 chunks +3 lines, -0 lines 0 comments Download
M chrome/browser/extensions/extension_function_dispatcher.cc View 1 2 3 2 chunks +0 lines, -4 lines 1 comment Download

Messages

Total messages: 12 (0 generated)
meacer
Jeffrey, can you take a look? Not sure how many extensions rely on the fact ...
6 years, 11 months ago (2014-01-28 00:16:25 UTC) #1
Jeffrey Yasskin
We already have user gestures wired up in a bunch of places, so it's possible ...
6 years, 11 months ago (2014-01-28 00:54:18 UTC) #2
meacer
https://codereview.chromium.org/148153008/diff/1/chrome/browser/extensions/api/extension_action/extension_action_api.cc File chrome/browser/extensions/api/extension_action/extension_action_api.cc (right): https://codereview.chromium.org/148153008/diff/1/chrome/browser/extensions/api/extension_action/extension_action_api.cc#newcode360 chrome/browser/extensions/api/extension_action/extension_action_api.cc:360: ExternalProtocolHandler::PermitLaunchUrl(); On 2014/01/28 00:54:19, Jeffrey Yasskin wrote: > The ...
6 years, 10 months ago (2014-01-30 00:20:44 UTC) #3
Jeffrey Yasskin
On Wed, Jan 29, 2014 at 4:20 PM, <meacer@chromium.org> wrote: > > https://codereview.chromium.org/148153008/diff/1/chrome/browser/extensions/api/extension_action/extension_action_api.cc > File ...
6 years, 10 months ago (2014-01-30 02:40:23 UTC) #4
meacer
On 2014/01/30 02:40:23, Jeffrey Yasskin wrote: > On Wed, Jan 29, 2014 at 4:20 PM, ...
6 years, 10 months ago (2014-01-30 19:11:55 UTC) #5
Jeffrey Yasskin
This LGTM, but kalman has some concerns. In particular, he suspects that the PermitLaunchUrl() call ...
6 years, 10 months ago (2014-01-31 21:59:07 UTC) #6
not at google - send to devlin
Yeah this browser side state is suspicious, I don't know why external URL handling is ...
6 years, 10 months ago (2014-01-31 22:01:40 UTC) #7
meacer
On 2014/01/31 22:01:40, kalman wrote: > Yeah this browser side state is suspicious, I don't ...
6 years, 10 months ago (2014-01-31 22:31:06 UTC) #8
not at google - send to devlin
Yeah pretty much. Clicking on the browser action button does set the user action bit ...
6 years, 10 months ago (2014-01-31 22:35:39 UTC) #9
meacer
On 2014/01/31 22:35:39, kalman wrote: > Yeah pretty much. Clicking on the browser action button ...
6 years, 10 months ago (2014-02-01 00:30:28 UTC) #10
meacer
> I have another patch that gets rid of the state and checks the user ...
6 years, 10 months ago (2014-02-01 01:47:11 UTC) #11
not at google - send to devlin
6 years, 10 months ago (2014-02-01 02:02:54 UTC) #12
Passing the user gesture bit along with executeScript sounds reasonable. I don't
think it would be that hard really.

https://codereview.chromium.org/148153008/diff/60001/chrome/browser/extension...
File chrome/browser/extensions/extension_function_dispatcher.cc (left):

https://codereview.chromium.org/148153008/diff/60001/chrome/browser/extension...
chrome/browser/extensions/extension_function_dispatcher.cc:387:
ExternalProtocolHandler::PermitLaunchUrl();
I wonder whether a simpler fix to this would be to just guard this on
params.user_gesture, but I don't fully understand the interactions going on
here.

Powered by Google App Engine
This is Rietveld 408576698