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 131783012: Fix the handling of user gestures for external protocol handler dialogs. (Closed)

Created:
6 years, 10 months ago by meacer
Modified:
6 years, 8 months ago
CC:
chromium-reviews, extensions-reviews_chromium.org, jam, joi+watch-content_chromium.org, darin-cc_chromium.org, chromium-apps-reviews_chromium.org, James Su
Visibility:
Public.

Description

Fix the handling of user gestures for external protocol handler dialogs. - Remove browser state from external protocol handler. - Use gesture with a timeout. BUG=173557 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=261014

Patch Set 1 #

Patch Set 2 : Now with fewer changed files. #

Patch Set 3 : Rebase #

Patch Set 4 : Format #

Patch Set 5 : Fix build #

Total comments: 2

Patch Set 6 : Add a scoped user gesture class #

Patch Set 7 : Fix build #

Total comments: 11

Patch Set 8 : kalman comments #

Patch Set 9 : kalman comment #

Total comments: 4

Patch Set 10 : joi and pkasting comments #

Total comments: 7

Patch Set 11 : mmenke comment #

Patch Set 12 : Remove ScopedUserGesture and pass along the user_gesture bit #

Total comments: 2

Patch Set 13 : whitespace #

Patch Set 14 : Fix android build #

Patch Set 15 : Remove unnecessary DCHECK #

Unified diffs Side-by-side diffs Delta from patch set Stats (+73 lines, -138 lines) Patch
M android_webview/browser/renderer_host/aw_resource_dispatcher_host_delegate.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +2 lines, -1 line 0 comments Download
M android_webview/browser/renderer_host/aw_resource_dispatcher_host_delegate.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +5 lines, -3 lines 0 comments Download
M chrome/browser/autocomplete/autocomplete_input.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +4 lines, -1 line 0 comments Download
M chrome/browser/extensions/active_tab_permission_granter.cc View 1 2 3 4 5 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/browser/extensions/chrome_extensions_browser_client.h View 1 2 3 4 5 1 chunk +0 lines, -1 line 0 comments Download
M chrome/browser/extensions/chrome_extensions_browser_client.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +0 lines, -4 lines 0 comments Download
M chrome/browser/external_protocol/external_protocol_handler.h View 1 2 3 4 5 6 7 8 9 10 11 12 3 chunks +8 lines, -20 lines 0 comments Download
M chrome/browser/external_protocol/external_protocol_handler.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 6 chunks +16 lines, -24 lines 0 comments Download
M chrome/browser/external_protocol/external_protocol_handler_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +3 lines, -7 lines 0 comments Download
D chrome/browser/external_protocol/external_protocol_observer.h View 1 chunk +0 lines, -29 lines 0 comments Download
D chrome/browser/external_protocol/external_protocol_observer.cc View 1 chunk +0 lines, -22 lines 0 comments Download
M chrome/browser/prerender/prerender_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.h View 1 2 3 4 5 6 7 8 9 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.cc View 1 2 3 4 5 6 7 8 9 10 11 4 chunks +10 lines, -4 lines 0 comments Download
M chrome/browser/ui/tab_helpers.cc View 1 2 3 4 5 6 7 8 9 10 2 chunks +0 lines, -2 lines 0 comments Download
M chrome/chrome_browser.gypi View 1 2 3 4 5 6 7 8 9 10 2 chunks +0 lines, -3 lines 0 comments Download
M content/browser/loader/resource_dispatcher_host_impl.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +9 lines, -2 lines 0 comments Download
M content/public/browser/resource_dispatcher_host_delegate.h View 1 2 3 4 5 6 7 8 9 1 chunk +4 lines, -1 line 0 comments Download
M content/public/browser/resource_dispatcher_host_delegate.cc View 1 2 3 4 5 6 7 8 9 1 chunk +5 lines, -3 lines 0 comments Download
M extensions/browser/extension_function_dispatcher.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +0 lines, -2 lines 0 comments Download
M extensions/browser/extensions_browser_client.h View 1 2 3 4 5 1 chunk +0 lines, -4 lines 0 comments Download
M extensions/browser/test_extensions_browser_client.h View 1 2 3 4 5 1 chunk +0 lines, -1 line 0 comments Download
M extensions/browser/test_extensions_browser_client.cc View 1 2 3 4 5 1 chunk +0 lines, -2 lines 0 comments Download

Messages

Total messages: 46 (0 generated)
meacer
This is the followup to https://codereview.chromium.org/148153008/ Could you please take a look? Thanks!
6 years, 10 months ago (2014-02-10 18:00:14 UTC) #1
meacer
Ping :-)
6 years, 10 months ago (2014-02-13 21:57:55 UTC) #2
not at google - send to devlin
https://codereview.chromium.org/131783012/diff/190001/chrome/browser/external_protocol/external_protocol_handler.h File chrome/browser/external_protocol/external_protocol_handler.h (right): https://codereview.chromium.org/131783012/diff/190001/chrome/browser/external_protocol/external_protocol_handler.h#newcode19 chrome/browser/external_protocol/external_protocol_handler.h:19: class ExternalProtocolHandler { Could you do the scoping as ...
6 years, 10 months ago (2014-02-13 22:17:54 UTC) #3
meacer
https://codereview.chromium.org/131783012/diff/190001/chrome/browser/external_protocol/external_protocol_handler.h File chrome/browser/external_protocol/external_protocol_handler.h (right): https://codereview.chromium.org/131783012/diff/190001/chrome/browser/external_protocol/external_protocol_handler.h#newcode19 chrome/browser/external_protocol/external_protocol_handler.h:19: class ExternalProtocolHandler { On 2014/02/13 22:17:54, kalman wrote: > ...
6 years, 10 months ago (2014-02-14 00:37:18 UTC) #4
not at google - send to devlin
On 2014/02/14 00:37:18, Mustafa Emre Acer wrote: > https://codereview.chromium.org/131783012/diff/190001/chrome/browser/external_protocol/external_protocol_handler.h > File chrome/browser/external_protocol/external_protocol_handler.h (right): > > ...
6 years, 10 months ago (2014-02-14 00:41:43 UTC) #5
meacer
On 2014/02/14 00:41:43, kalman wrote: > On 2014/02/14 00:37:18, Mustafa Emre Acer wrote: > > ...
6 years, 10 months ago (2014-02-14 01:14:24 UTC) #6
not at google - send to devlin
Hm yes it would be a combination I guess? A global variable* but one which ...
6 years, 10 months ago (2014-02-14 01:22:19 UTC) #7
meacer
On 2014/02/14 01:22:19, kalman wrote: > Hm yes it would be a combination I guess? ...
6 years, 8 months ago (2014-03-27 22:31:31 UTC) #8
not at google - send to devlin
lg with a suggestion and a couple of questions https://codereview.chromium.org/131783012/diff/370001/chrome/browser/autocomplete/autocomplete_input.cc File chrome/browser/autocomplete/autocomplete_input.cc (right): https://codereview.chromium.org/131783012/diff/370001/chrome/browser/autocomplete/autocomplete_input.cc#newcode201 chrome/browser/autocomplete/autocomplete_input.cc:201: ...
6 years, 8 months ago (2014-03-28 18:54:22 UTC) #9
meacer
https://codereview.chromium.org/131783012/diff/370001/chrome/browser/autocomplete/autocomplete_input.cc File chrome/browser/autocomplete/autocomplete_input.cc (right): https://codereview.chromium.org/131783012/diff/370001/chrome/browser/autocomplete/autocomplete_input.cc#newcode201 chrome/browser/autocomplete/autocomplete_input.cc:201: ExternalProtocolHandler::ScopedUserGesture user_gesture; On 2014/03/28 18:54:23, kalman wrote: > why ...
6 years, 8 months ago (2014-03-28 19:53:10 UTC) #10
not at google - send to devlin
lgtm https://codereview.chromium.org/131783012/diff/370001/chrome/browser/autocomplete/autocomplete_input.cc File chrome/browser/autocomplete/autocomplete_input.cc (right): https://codereview.chromium.org/131783012/diff/370001/chrome/browser/autocomplete/autocomplete_input.cc#newcode201 chrome/browser/autocomplete/autocomplete_input.cc:201: ExternalProtocolHandler::ScopedUserGesture user_gesture; On 2014/03/28 19:53:11, Mustafa Emre Acer ...
6 years, 8 months ago (2014-03-28 20:48:51 UTC) #11
meacer
Matt: can you please take a look at resource_dispatcher_host_impl.cc?
6 years, 8 months ago (2014-03-28 20:51:56 UTC) #12
meacer
+sky for chrome/browser/autocomplete/autocomplete_input.cc OWNERS +joi for content/public/browser/resource_dispatcher_host_delegate.* OWNERS https://codereview.chromium.org/131783012/diff/370001/chrome/browser/autocomplete/autocomplete_input.cc File chrome/browser/autocomplete/autocomplete_input.cc (right): https://codereview.chromium.org/131783012/diff/370001/chrome/browser/autocomplete/autocomplete_input.cc#newcode201 chrome/browser/autocomplete/autocomplete_input.cc:201: ExternalProtocolHandler::ScopedUserGesture ...
6 years, 8 months ago (2014-03-28 20:57:43 UTC) #13
Jói
https://codereview.chromium.org/131783012/diff/410001/content/public/browser/resource_dispatcher_host_delegate.h File content/public/browser/resource_dispatcher_host_delegate.h (right): https://codereview.chromium.org/131783012/diff/410001/content/public/browser/resource_dispatcher_host_delegate.h#newcode90 content/public/browser/resource_dispatcher_host_delegate.h:90: bool user_gesture); A boolean flag with this name does ...
6 years, 8 months ago (2014-03-28 22:19:40 UTC) #14
sky
sky->pkasting
6 years, 8 months ago (2014-03-28 22:52:56 UTC) #15
Peter Kasting
LGTM https://codereview.chromium.org/131783012/diff/410001/chrome/browser/autocomplete/autocomplete_input.cc File chrome/browser/autocomplete/autocomplete_input.cc (right): https://codereview.chromium.org/131783012/diff/410001/chrome/browser/autocomplete/autocomplete_input.cc#newcode202 chrome/browser/autocomplete/autocomplete_input.cc:202: // Fake one so that we don't always ...
6 years, 8 months ago (2014-03-28 22:56:37 UTC) #16
meacer
https://codereview.chromium.org/131783012/diff/410001/chrome/browser/autocomplete/autocomplete_input.cc File chrome/browser/autocomplete/autocomplete_input.cc (right): https://codereview.chromium.org/131783012/diff/410001/chrome/browser/autocomplete/autocomplete_input.cc#newcode202 chrome/browser/autocomplete/autocomplete_input.cc:202: // Fake one so that we don't always get ...
6 years, 8 months ago (2014-03-28 23:13:56 UTC) #17
Jói
//content/public LGTM.
6 years, 8 months ago (2014-03-29 11:21:00 UTC) #18
mmenke
https://codereview.chromium.org/131783012/diff/430001/chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.cc File chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.cc (right): https://codereview.chromium.org/131783012/diff/430001/chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.cc#newcode221 chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.cc:221: scoped_gesture.reset(new ExternalProtocolHandler::ScopedUserGesture); Can't this just be put this logic ...
6 years, 8 months ago (2014-03-31 14:38:42 UTC) #19
meacer
https://codereview.chromium.org/131783012/diff/430001/chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.cc File chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.cc (right): https://codereview.chromium.org/131783012/diff/430001/chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.cc#newcode221 chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.cc:221: scoped_gesture.reset(new ExternalProtocolHandler::ScopedUserGesture); On 2014/03/31 14:38:42, mmenke wrote: > Can't ...
6 years, 8 months ago (2014-03-31 18:32:29 UTC) #20
mmenke
LGTM. Feel free to ignore my comment, but I don't think there's any need for ...
6 years, 8 months ago (2014-03-31 18:38:39 UTC) #21
meacer
https://codereview.chromium.org/131783012/diff/430001/chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.cc File chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.cc (right): https://codereview.chromium.org/131783012/diff/430001/chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.cc#newcode221 chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.cc:221: scoped_gesture.reset(new ExternalProtocolHandler::ScopedUserGesture); On 2014/03/31 18:38:40, mmenke wrote: > On ...
6 years, 8 months ago (2014-03-31 19:34:00 UTC) #22
not at google - send to devlin
On 2014/03/31 19:34:00, Mustafa Emre Acer wrote: > https://codereview.chromium.org/131783012/diff/430001/chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.cc > File chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.cc > (right): > ...
6 years, 8 months ago (2014-03-31 19:37:21 UTC) #23
meacer
On 2014/03/31 19:37:21, kalman wrote: > On 2014/03/31 19:34:00, Mustafa Emre Acer wrote: > > ...
6 years, 8 months ago (2014-03-31 19:38:31 UTC) #24
not at google - send to devlin
ok if it works out then sure
6 years, 8 months ago (2014-03-31 19:42:39 UTC) #25
meacer
On 2014/03/31 19:42:39, kalman wrote: > ok if it works out then sure OK, now ...
6 years, 8 months ago (2014-03-31 21:20:31 UTC) #26
mmenke
Thanks! Think this looks much better. No need for another signoff from me, but still ...
6 years, 8 months ago (2014-03-31 21:38:26 UTC) #27
meacer
Thanks all, committing soon. https://codereview.chromium.org/131783012/diff/460001/chrome/browser/external_protocol/external_protocol_handler.h File chrome/browser/external_protocol/external_protocol_handler.h (right): https://codereview.chromium.org/131783012/diff/460001/chrome/browser/external_protocol/external_protocol_handler.h#newcode94 chrome/browser/external_protocol/external_protocol_handler.h:94: On 2014/03/31 21:38:27, mmenke wrote: ...
6 years, 8 months ago (2014-03-31 22:00:44 UTC) #28
meacer
The CQ bit was checked by meacer@chromium.org
6 years, 8 months ago (2014-03-31 23:02:28 UTC) #29
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/meacer@chromium.org/131783012/470001
6 years, 8 months ago (2014-03-31 23:04:25 UTC) #30
meacer
jochen: I need an OWNER for chrome/browser. Could you take a look? Thanks.
6 years, 8 months ago (2014-03-31 23:45:46 UTC) #31
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 8 months ago (2014-03-31 23:50:09 UTC) #32
commit-bot: I haz the power
Retried try job too often on chromium_presubmit for step(s) presubmit http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=chromium_presubmit&number=58693
6 years, 8 months ago (2014-03-31 23:50:10 UTC) #33
jochen (gone - plz use gerrit)
lgtm
6 years, 8 months ago (2014-04-01 11:29:40 UTC) #34
meacer
The CQ bit was checked by meacer@chromium.org
6 years, 8 months ago (2014-04-01 16:51:37 UTC) #35
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/meacer@chromium.org/131783012/470001
6 years, 8 months ago (2014-04-01 16:51:49 UTC) #36
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 8 months ago (2014-04-01 17:58:53 UTC) #37
commit-bot: I haz the power
Retried try job too often on android_clang_dbg for step(s) slave_steps http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=android_clang_dbg&number=128745
6 years, 8 months ago (2014-04-01 17:58:53 UTC) #38
meacer
boliu: Could you please take a look at android_webview/browser/renderer_host/aw_resource_dispatcher_host_delegate.*? Thanks.
6 years, 8 months ago (2014-04-01 18:51:41 UTC) #39
boliu
aw lgtm
6 years, 8 months ago (2014-04-01 19:57:33 UTC) #40
meacer
The CQ bit was checked by meacer@chromium.org
6 years, 8 months ago (2014-04-01 20:00:30 UTC) #41
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/meacer@chromium.org/131783012/510001
6 years, 8 months ago (2014-04-01 20:00:50 UTC) #42
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/meacer@chromium.org/131783012/510001
6 years, 8 months ago (2014-04-01 22:47:10 UTC) #43
commit-bot: I haz the power
Change committed as 261014
6 years, 8 months ago (2014-04-02 00:55:23 UTC) #44
rlarocque
A revert of this CL has been created in https://codereview.chromium.org/221283006/ by rlarocque@chromium.org. The reason for ...
6 years, 8 months ago (2014-04-02 01:32:49 UTC) #45
meacer
6 years, 4 months ago (2014-07-28 18:00:52 UTC) #46
Message was sent while issue was closed.
A revert of this CL has been created in
https://codereview.chromium.org/426713002/ by meacer@chromium.org.

The reason for reverting is: This change broke certain cases where external
protocol handlers are launched. Consider relanding depending on whether
http://crbug.com/78592 is to be fixed..

Powered by Google App Engine
This is Rietveld 408576698