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

Issue 884222 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
OOO January 21 (US Holiday)
Closed: Sep 25
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Chrome , Mac
Pri: 2
Type: Bug



Sign in to add a comment

Extensions Click-to-Script: Bring up the host dialog immediately when selecting "On specific sites" from chrome://extensions

Project Member Reported by rdevlin....@chromium.org, Sep 14

Issue description

What steps will reproduce the problem?
(0) Enable chrome://flags/#extension-active-script-permission
(1) Install an extension that requests all-hosts access (adblock will do)
(2) Visit chrome://extensions, and change "Allow this extension to read and change all your data on the websites you visit" to "On specific sites"

What is the expected result?
The host dialog should pop up, prompting the user to add a site.

What happens instead?
It doesn't.  This causes issues because a) it won't currently run on any specific sites, and b) the C++ calculates the difference between "on click" and "on specific sites" by checking if there are any specific sites.  If we pop up the dialog immediately in the transition, it solves both issues.  If the user cancels the dialog, the setting should remain at the previous value.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Sep 18

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

commit 146671c18f028303543a4a5e7839f6aaca54801d
Author: Devlin Cronin <rdevlin.cronin@chromium.org>
Date: Tue Sep 18 18:38:14 2018

[Extensions Click-to-Script] Bring up dialog on 'specific sites' selection

When the user selects "On specific sites" from the dropdown in the
chrome://extensions page, automatically bring up the dialog to add an
allowed site. This makes it clear to the user that they need to specify
a site for this setting to work, and also fixes an issue where
selecting "On specific sites" and then refreshing the page (or having
the data model otherwise update) reset the value to "on click".

Bug:  884222 

Change-Id: Ie89757f7fba2409774e5fcc2f4a8028aff31f7ba
Reviewed-on: https://chromium-review.googlesource.com/1226017
Reviewed-by: Demetrios Papadopoulos <dpapad@chromium.org>
Commit-Queue: Devlin <rdevlin.cronin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#592118}
[modify] https://crrev.com/146671c18f028303543a4a5e7839f6aaca54801d/chrome/browser/resources/md_extensions/runtime_host_permissions.html
[modify] https://crrev.com/146671c18f028303543a4a5e7839f6aaca54801d/chrome/browser/resources/md_extensions/runtime_host_permissions.js
[modify] https://crrev.com/146671c18f028303543a4a5e7839f6aaca54801d/chrome/browser/resources/md_extensions/runtime_hosts_dialog.js
[modify] https://crrev.com/146671c18f028303543a4a5e7839f6aaca54801d/chrome/test/data/webui/extensions/runtime_host_permissions_test.js
[modify] https://crrev.com/146671c18f028303543a4a5e7839f6aaca54801d/chrome/test/data/webui/extensions/runtime_hosts_dialog_test.js

Status: Fixed (was: Started)
This should be fixed.  jawag@, did we want to merge this?
Cc: abdulsyed@chromium.org
Labels: Merge-Request-70
Would be nice if we can. +abdulsyed, lost track of this one until just now. Can we still merge this to 70?
Project Member

Comment 4 by sheriffbot@chromium.org, Sep 25

Labels: -Merge-Request-70 Merge-Review-70 Hotlist-Merge-Review
This bug requires manual review: M70 has already been promoted to the beta branch, so this requires manual review
Please contact the milestone owner if you have questions.
Owners: benmason@(Android), kariahda@(iOS), geohsu@(ChromeOS), abdulsyed@(Desktop)

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Labels: -Merge-Review-70 Merge-Approved-70
Project Member

Comment 6 by bugdroid1@chromium.org, Sep 25

Labels: -merge-approved-70 merge-merged-3538
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/a3b21f3ca06748f3a3fdb52f3c1e3f56fe8cb4ed

commit a3b21f3ca06748f3a3fdb52f3c1e3f56fe8cb4ed
Author: Devlin Cronin <rdevlin.cronin@chromium.org>
Date: Tue Sep 25 21:36:36 2018

[Merge M70][Extensions Click-to-Script] Bring up dialog on 'specific sites' selection

When the user selects "On specific sites" from the dropdown in the
chrome://extensions page, automatically bring up the dialog to add an
allowed site. This makes it clear to the user that they need to specify
a site for this setting to work, and also fixes an issue where
selecting "On specific sites" and then refreshing the page (or having
the data model otherwise update) reset the value to "on click".

Bug:  884222 

TBR=rdevlin.cronin@chromium.org

(cherry picked from commit 146671c18f028303543a4a5e7839f6aaca54801d)

Change-Id: Ie89757f7fba2409774e5fcc2f4a8028aff31f7ba
Reviewed-on: https://chromium-review.googlesource.com/1226017
Reviewed-by: Demetrios Papadopoulos <dpapad@chromium.org>
Commit-Queue: Devlin <rdevlin.cronin@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#592118}
Reviewed-on: https://chromium-review.googlesource.com/1244718
Reviewed-by: Devlin <rdevlin.cronin@chromium.org>
Cr-Commit-Position: refs/branch-heads/3538@{#669}
Cr-Branched-From: 79f7c91a2b2a2932cd447fa6f865cb6662fa8fa6-refs/heads/master@{#587811}
[modify] https://crrev.com/a3b21f3ca06748f3a3fdb52f3c1e3f56fe8cb4ed/chrome/browser/resources/md_extensions/runtime_host_permissions.html
[modify] https://crrev.com/a3b21f3ca06748f3a3fdb52f3c1e3f56fe8cb4ed/chrome/browser/resources/md_extensions/runtime_host_permissions.js
[modify] https://crrev.com/a3b21f3ca06748f3a3fdb52f3c1e3f56fe8cb4ed/chrome/browser/resources/md_extensions/runtime_hosts_dialog.js
[modify] https://crrev.com/a3b21f3ca06748f3a3fdb52f3c1e3f56fe8cb4ed/chrome/test/data/webui/extensions/runtime_host_permissions_test.js
[modify] https://crrev.com/a3b21f3ca06748f3a3fdb52f3c1e3f56fe8cb4ed/chrome/test/data/webui/extensions/runtime_hosts_dialog_test.js

Labels: Merge-Merged-70-3538
The following revision refers to this bug: 
https://chromium.googlesource.com/chromium/src.git/+/a3b21f3ca06748f3a3fdb52f3c1e3f56fe8cb4ed

Commit: a3b21f3ca06748f3a3fdb52f3c1e3f56fe8cb4ed
Author: rdevlin.cronin@chromium.org
Commiter: rdevlin.cronin@chromium.org
Date: 2018-09-25 21:36:36 +0000 UTC

[Merge M70][Extensions Click-to-Script] Bring up dialog on 'specific sites' selection

When the user selects "On specific sites" from the dropdown in the
chrome://extensions page, automatically bring up the dialog to add an
allowed site. This makes it clear to the user that they need to specify
a site for this setting to work, and also fixes an issue where
selecting "On specific sites" and then refreshing the page (or having
the data model otherwise update) reset the value to "on click".

Bug:  884222 

TBR=rdevlin.cronin@chromium.org

(cherry picked from commit 146671c18f028303543a4a5e7839f6aaca54801d)

Change-Id: Ie89757f7fba2409774e5fcc2f4a8028aff31f7ba
Reviewed-on: https://chromium-review.googlesource.com/1226017
Reviewed-by: Demetrios Papadopoulos <dpapad@chromium.org>
Commit-Queue: Devlin <rdevlin.cronin@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#592118}
Reviewed-on: https://chromium-review.googlesource.com/1244718
Reviewed-by: Devlin <rdevlin.cronin@chromium.org>
Cr-Commit-Position: refs/branch-heads/3538@{#669}
Cr-Branched-From: 79f7c91a2b2a2932cd447fa6f865cb6662fa8fa6-refs/heads/master@{#587811}

Sign in to add a comment