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

Issue 2495353003: chrome.webRequest support for ExtensionSettings (Closed)

Created:
4 years, 1 month ago by nrpeter
Modified:
3 years, 6 months ago
CC:
chromium-apps-reviews_chromium.org, chromium-reviews, extensions-reviews_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

chrome.webRequest support for ExtensionSettings -If URL or Origin matches an ExtensionSettings protected host, the event will not be dispatched to that extension / app. BUG=624649 Review-Url: https://codereview.chromium.org/2495353003 Cr-Commit-Position: refs/heads/master@{#478018} Committed: https://chromium.googlesource.com/chromium/src/+/ea0116aad7867695cb2e438d3546f148ea271858

Patch Set 1 #

Patch Set 2 : Log which webpages the embedded test server has served & query them. #

Total comments: 4

Patch Set 3 : Return ACCESS_DENIED, Remove excess check or URL #

Total comments: 4

Patch Set 4 : Clean up and update tests to work with ACCESS_DENIED #

Patch Set 5 : runtime_blocked_hosts, runtime_allowed_hosts no longer accept paths, checks url::Origin rather than… #

Patch Set 6 : Rebase #

Patch Set 7 : Policy template translation doesn't like '&', switching to 'and'. Small fix to browser test. #

Total comments: 35

Patch Set 8 : Clean up tests & comments #

Total comments: 3

Patch Set 9 : Move policy changes to seperate CL #

Total comments: 22

Patch Set 10 : Moved policy check to WebRequestPermissions, code cleanup, rebase #

Total comments: 5

Patch Set 11 : Comment cleanup #

Unified diffs Side-by-side diffs Delta from patch set Stats (+345 lines, -49 lines) Patch
M chrome/browser/extensions/api/web_request/web_request_apitest.cc View 1 2 3 4 5 6 7 8 9 10 4 chunks +197 lines, -1 line 0 comments Download
M chrome/browser/extensions/api/web_request/web_request_permissions_unittest.cc View 1 2 3 4 5 6 7 8 9 4 chunks +39 lines, -32 lines 0 comments Download
M chrome/browser/extensions/extension_with_management_policy_apitest.h View 1 2 3 4 5 6 7 8 9 2 chunks +12 lines, -0 lines 0 comments Download
M chrome/browser/extensions/extension_with_management_policy_apitest.cc View 1 2 3 2 chunks +26 lines, -0 lines 0 comments Download
A chrome/test/data/extensions/api_test/webrequest/policy_blocked/background.js View 1 2 3 4 5 6 7 8 9 1 chunk +13 lines, -0 lines 0 comments Download
A chrome/test/data/extensions/api_test/webrequest/policy_blocked/manifest.json View 1 2 3 4 5 6 7 1 chunk +9 lines, -0 lines 0 comments Download
A chrome/test/data/extensions/api_test/webrequest/policy_blocked/ref_remote_js.html View 1 2 3 4 5 6 7 8 9 1 chunk +9 lines, -0 lines 0 comments Download
A chrome/test/data/extensions/api_test/webrequest/policy_blocked/ref_remote_js.js View 1 2 3 4 5 6 7 8 9 1 chunk +11 lines, -0 lines 0 comments Download
M extensions/browser/api/declarative_webrequest/webrequest_action.cc View 1 2 3 4 5 6 7 8 9 1 chunk +2 lines, -2 lines 0 comments Download
M extensions/browser/api/web_request/web_request_api.cc View 1 2 3 4 5 6 7 8 9 1 chunk +3 lines, -1 line 0 comments Download
M extensions/browser/api/web_request/web_request_permissions.h View 1 2 3 4 5 6 7 8 9 2 chunks +5 lines, -2 lines 0 comments Download
M extensions/browser/api/web_request/web_request_permissions.cc View 1 2 3 4 5 6 7 8 9 3 chunks +8 lines, -2 lines 0 comments Download
M extensions/common/permissions/permissions_data.h View 1 2 3 4 5 6 7 2 chunks +8 lines, -6 lines 0 comments Download
M extensions/common/permissions/permissions_data.cc View 1 2 3 chunks +3 lines, -3 lines 0 comments Download

Messages

Total messages: 82 (56 generated)
NickP
4 years, 1 month ago (2016-11-16 23:13:18 UTC) #5
nrpeter
Rebased, ran a CQ dry-run which passed. Looks like we're ready for review.
3 years, 7 months ago (2017-05-12 17:34:37 UTC) #12
dcheng
(let me know if there's anything in particular you'd like me to review here; I ...
3 years, 7 months ago (2017-05-12 18:11:12 UTC) #15
Devlin
https://codereview.chromium.org/2495353003/diff/40001/extensions/browser/api/web_request/web_request_api.cc File extensions/browser/api/web_request/web_request_api.cc (right): https://codereview.chromium.org/2495353003/diff/40001/extensions/browser/api/web_request/web_request_api.cc#newcode1507 extensions/browser/api/web_request/web_request_api.cc:1507: if (extension->permissions_data()->IsRuntimeBlockedHost(url)) Why do we need this? WebRequestPermissions::CanExtensionAccessURL() checks ...
3 years, 7 months ago (2017-05-15 20:54:51 UTC) #16
nrpeter
https://codereview.chromium.org/2495353003/diff/40001/extensions/browser/api/web_request/web_request_api.cc File extensions/browser/api/web_request/web_request_api.cc (right): https://codereview.chromium.org/2495353003/diff/40001/extensions/browser/api/web_request/web_request_api.cc#newcode1507 extensions/browser/api/web_request/web_request_api.cc:1507: if (extension->permissions_data()->IsRuntimeBlockedHost(url)) On 2017/05/15 20:54:51, Devlin (catching up) wrote: ...
3 years, 7 months ago (2017-05-15 22:44:44 UTC) #17
Devlin
https://codereview.chromium.org/2495353003/diff/60001/extensions/browser/api/web_request/web_request_api.cc File extensions/browser/api/web_request/web_request_api.cc (right): https://codereview.chromium.org/2495353003/diff/60001/extensions/browser/api/web_request/web_request_api.cc#newcode1509 extensions/browser/api/web_request/web_request_api.cc:1509: request->first_party_for_cookies())) I don't think this is doing what you ...
3 years, 7 months ago (2017-05-17 20:03:40 UTC) #19
Devlin
https://codereview.chromium.org/2495353003/diff/60001/extensions/browser/api/web_request/web_request_api.cc File extensions/browser/api/web_request/web_request_api.cc (right): https://codereview.chromium.org/2495353003/diff/60001/extensions/browser/api/web_request/web_request_api.cc#newcode1509 extensions/browser/api/web_request/web_request_api.cc:1509: request->first_party_for_cookies())) On 2017/05/17 20:03:40, Devlin (catching up) wrote: > ...
3 years, 7 months ago (2017-05-17 20:04:08 UTC) #20
nrpeter
https://codereview.chromium.org/2495353003/diff/60001/extensions/browser/api/web_request/web_request_api.cc File extensions/browser/api/web_request/web_request_api.cc (right): https://codereview.chromium.org/2495353003/diff/60001/extensions/browser/api/web_request/web_request_api.cc#newcode1509 extensions/browser/api/web_request/web_request_api.cc:1509: request->first_party_for_cookies())) On 2017/05/17 20:03:40, Devlin (catching up) wrote: > ...
3 years, 7 months ago (2017-05-18 21:10:46 UTC) #21
Devlin
https://codereview.chromium.org/2495353003/diff/60001/extensions/browser/api/web_request/web_request_api.cc File extensions/browser/api/web_request/web_request_api.cc (right): https://codereview.chromium.org/2495353003/diff/60001/extensions/browser/api/web_request/web_request_api.cc#newcode1509 extensions/browser/api/web_request/web_request_api.cc:1509: request->first_party_for_cookies())) On 2017/05/18 21:10:46, nrpeter wrote: > On 2017/05/17 ...
3 years, 7 months ago (2017-05-18 21:23:27 UTC) #22
nrpeter
It looks like the URLRequest::Initiator is the only reliable method to determine where a request ...
3 years, 7 months ago (2017-05-24 16:50:02 UTC) #32
Devlin
On 2017/05/24 16:50:02, nrpeter wrote: > It looks like the URLRequest::Initiator is the only reliable ...
3 years, 7 months ago (2017-05-25 19:01:31 UTC) #46
nrpeter
On 2017/05/25 19:01:31, Devlin (catching up) wrote: > On 2017/05/24 16:50:02, nrpeter wrote: > > ...
3 years, 7 months ago (2017-05-25 19:37:08 UTC) #47
Devlin
On 2017/05/25 19:37:08, nrpeter wrote: > On 2017/05/25 19:01:31, Devlin (catching up) wrote: > > ...
3 years, 7 months ago (2017-05-25 20:09:27 UTC) #48
Devlin
first round https://codereview.chromium.org/2495353003/diff/240001/chrome/browser/extensions/api/web_request/web_request_apitest.cc File chrome/browser/extensions/api/web_request/web_request_apitest.cc (right): https://codereview.chromium.org/2495353003/diff/240001/chrome/browser/extensions/api/web_request/web_request_apitest.cc#newcode192 chrome/browser/extensions/api/web_request/web_request_apitest.cc:192: class ExtensionWebRequestApiTest : public ExtensionApiTestWithManagementPolicy { Let's ...
3 years, 7 months ago (2017-05-25 20:38:33 UTC) #49
nrpeter
These changes address Devlin's comments related to the webRequest section of this CL. I'll now ...
3 years, 7 months ago (2017-05-26 02:46:52 UTC) #54
Mike West
https://codereview.chromium.org/2495353003/diff/280001/url/origin.cc File url/origin.cc (right): https://codereview.chromium.org/2495353003/diff/280001/url/origin.cc#newcode172 url/origin.cc:172: } +Jochen, who's responsible for suborigins these days. What ...
3 years, 7 months ago (2017-05-26 11:45:35 UTC) #58
jochen (gone - plz use gerrit)
https://codereview.chromium.org/2495353003/diff/280001/url/origin.cc File url/origin.cc (right): https://codereview.chromium.org/2495353003/diff/280001/url/origin.cc#newcode172 url/origin.cc:172: } why not use origin->GetPhysicalOrigin().GetURL() ?
3 years, 7 months ago (2017-05-26 11:51:54 UTC) #59
nrpeter
https://codereview.chromium.org/2495353003/diff/280001/url/origin.cc File url/origin.cc (right): https://codereview.chromium.org/2495353003/diff/280001/url/origin.cc#newcode172 url/origin.cc:172: } On 2017/05/26 11:51:53, jochen wrote: > why not ...
3 years, 7 months ago (2017-05-26 15:50:24 UTC) #60
nrpeter
Moved policy changes to a CL on gerrit. https://chromium-review.googlesource.com/c/517228/ I'll make sure to submit the ...
3 years, 6 months ago (2017-05-30 22:36:30 UTC) #63
Devlin
Hey Nick, friendly reminder that often comments can apply to a whole patch set (though ...
3 years, 6 months ago (2017-06-01 15:21:33 UTC) #64
nrpeter
Thanks for your patience, I was focusing on getting the policy changes this CL relies ...
3 years, 6 months ago (2017-06-06 21:42:08 UTC) #69
Devlin
lgtm; thanks for bearing with us through the review! https://codereview.chromium.org/2495353003/diff/450001/chrome/browser/extensions/api/web_request/web_request_apitest.cc File chrome/browser/extensions/api/web_request/web_request_apitest.cc (right): https://codereview.chromium.org/2495353003/diff/450001/chrome/browser/extensions/api/web_request/web_request_apitest.cc#newcode963 chrome/browser/extensions/api/web_request/web_request_apitest.cc:963: ...
3 years, 6 months ago (2017-06-08 13:58:46 UTC) #74
nrpeter
https://codereview.chromium.org/2495353003/diff/450001/chrome/browser/extensions/api/web_request/web_request_apitest.cc File chrome/browser/extensions/api/web_request/web_request_apitest.cc (right): https://codereview.chromium.org/2495353003/diff/450001/chrome/browser/extensions/api/web_request/web_request_apitest.cc#newcode963 chrome/browser/extensions/api/web_request/web_request_apitest.cc:963: // We expect that no webRequest will be hidden ...
3 years, 6 months ago (2017-06-08 15:47:42 UTC) #75
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2495353003/470001
3 years, 6 months ago (2017-06-08 15:48:13 UTC) #78
commit-bot: I haz the power
Committed patchset #11 (id:470001) as https://chromium.googlesource.com/chromium/src/+/ea0116aad7867695cb2e438d3546f148ea271858
3 years, 6 months ago (2017-06-08 17:50:59 UTC) #81
Dan Beam
3 years, 6 months ago (2017-06-08 21:29:31 UTC) #82
Message was sent while issue was closed.
A revert of this CL (patchset #11 id:470001) has been created in
https://codereview.chromium.org/2930983002/ by dbeam@chromium.org.

The reason for reverting is: Breaking
ExtensionApiTestWithManagementPolicy.InitiatorProtectedByPolicy browser_test on
multiple testers

https://build.chromium.org/p/chromium.memory/builders/Linux%20ChromiumOS%20MS...
https://build.chromium.org/p/chromium.memory/builders/Linux%20MSan%20Tests/bu...
https://build.chromium.org/p/chromium.memory/builders/Mac%20ASan%2064%20Tests....

Powered by Google App Engine
This is Rietveld 408576698