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

Issue 1684153002: Web restrictions component. (Closed)

Created:
4 years, 10 months ago by aberent
Modified:
4 years, 8 months ago
CC:
blundell+watchlist_chromium.org, chromium-reviews, droger+watchlist_chromium.org, knn, sdefresne+watchlist_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Web restrictions component. The Web restrictions component provides a resource throttle that allows Chrome on Android and Webview to restrict URL access using a content provider provided by a different app. It also allows that content provider to return custom error pages when requests fail, that can then be used by the user to request access to those URLs. This is intended for use, in particular: - For supervised users of Webview, where Chrome provides the content provider. - For enterprise environments, where the content provider will be provided by a third party app. The individual pieces are: A content resolver based web restriction provider. A gin wrapper and a resource throttle to tie it together. Preliminary code making use of this is in https://codereview.chromium.org/1423713015. This CL replaces https://codereview.chromium.org/1631603002/ BUG=569879 Committed: https://crrev.com/d6457207130f1a5abb0d36a27fbf9f4cb31f131f Cr-Commit-Position: refs/heads/master@{#378601}

Patch Set 1 : Copy of https://codereview.chromium.org/1631603002/ patch set 12 #

Patch Set 2 : Split browser and renderer components, remove unnecessary abstraction, clean up class names #

Patch Set 3 : Add tests. Also rethink threading. #

Patch Set 4 : Add tests of web_restrictions_resource_throttle #

Patch Set 5 : Build unit tests with GYP #

Patch Set 6 : Remove unnecessary file #

Total comments: 34

Patch Set 7 : Respond to comments #

Patch Set 8 : Fix test compilation errors. #

Total comments: 20

Patch Set 9 : Respond to comments #

Patch Set 10 : Fix GN test target names #

Total comments: 8

Patch Set 11 : More comments #

Patch Set 12 : Fix build problems and missing file #

Total comments: 4

Patch Set 13 : Use source_set for test_support #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1431 lines, -348 lines) Patch
M components/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 1 chunk +3 lines, -0 lines 0 comments Download
M components/OWNERS View 1 2 1 chunk +3 lines, -0 lines 0 comments Download
M components/components_tests.gyp View 1 2 3 4 5 6 7 8 9 10 4 chunks +11 lines, -1 line 0 comments Download
M components/test/run_all_unittests.cc View 1 2 3 4 5 6 7 8 9 10 2 chunks +4 lines, -2 lines 0 comments Download
M components/web_restrictions.gypi View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +81 lines, -1 line 0 comments Download
M components/web_restrictions/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +108 lines, -12 lines 0 comments Download
A + components/web_restrictions/browser/DEPS View 1 2 3 4 5 6 1 chunk +3 lines, -1 line 0 comments Download
A components/web_restrictions/browser/java/src/org/chromium/components/webrestrictions/WebRestrictionsClient.java View 1 2 3 4 5 6 1 chunk +139 lines, -0 lines 0 comments Download
A + components/web_restrictions/browser/java/src/org/chromium/components/webrestrictions/WebRestrictionsContentProvider.java View 1 2 1 chunk +1 line, -3 lines 0 comments Download
A components/web_restrictions/browser/javatest/src/org/chromium/components/webrestrictions/MockWebRestrictionsClient.java View 1 2 3 4 5 6 7 8 1 chunk +68 lines, -0 lines 0 comments Download
A components/web_restrictions/browser/junit/src/org/chromium/components/webrestrictions/WebRestrictionsClientTest.java View 1 2 7 1 chunk +123 lines, -0 lines 0 comments Download
A + components/web_restrictions/browser/junit/src/org/chromium/components/webrestrictions/WebRestrictionsContentProviderTest.java View 1 2 1 chunk +2 lines, -1 line 0 comments Download
A components/web_restrictions/browser/mock_web_restrictions_client.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +25 lines, -0 lines 0 comments Download
A components/web_restrictions/browser/mock_web_restrictions_client.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +26 lines, -0 lines 0 comments Download
A components/web_restrictions/browser/web_restrictions_client.h View 1 2 3 1 chunk +101 lines, -0 lines 0 comments Download
A components/web_restrictions/browser/web_restrictions_client.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +237 lines, -0 lines 0 comments Download
A components/web_restrictions/browser/web_restrictions_client_unittest.cc View 1 2 3 4 5 6 7 8 1 chunk +119 lines, -0 lines 0 comments Download
A components/web_restrictions/browser/web_restrictions_resource_throttle.h View 1 1 chunk +50 lines, -0 lines 0 comments Download
A components/web_restrictions/browser/web_restrictions_resource_throttle.cc View 1 1 chunk +62 lines, -0 lines 0 comments Download
A components/web_restrictions/browser/web_restrictions_resource_throttle_unittest.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +157 lines, -0 lines 0 comments Download
D components/web_restrictions/java/src/org/chromium/components/webrestrictions/WebRestrictionsContentProvider.java View 1 1 chunk +0 lines, -188 lines 0 comments Download
D components/web_restrictions/junit/src/org/chromium/components/webrestrictions/WebRestrictionsContentProviderTest.java View 1 1 chunk +0 lines, -139 lines 0 comments Download
A + components/web_restrictions/renderer/DEPS View 1 2 3 4 5 6 1 chunk +2 lines, -0 lines 0 comments Download
A components/web_restrictions/renderer/web_restrictions_gin_wrapper.h View 1 2 3 4 5 6 7 8 1 chunk +46 lines, -0 lines 0 comments Download
A components/web_restrictions/renderer/web_restrictions_gin_wrapper.cc View 1 2 3 4 5 6 7 8 1 chunk +60 lines, -0 lines 0 comments Download

Messages

Total messages: 59 (21 generated)
aberent
This replaces https://codereview.chromium.org/1631603002/ with a change of author. The first patchset is identical to https://codereview.chromium.org/1631603002/#ps240001 ...
4 years, 10 months ago (2016-02-10 15:56:03 UTC) #1
aberent
This replaces https://codereview.chromium.org/1631603002/ with a change of author. The first patchset is identical to https://codereview.chromium.org/1631603002/#ps240001 ...
4 years, 10 months ago (2016-02-10 16:00:42 UTC) #2
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1684153002/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1684153002/80001
4 years, 10 months ago (2016-02-19 12:33:35 UTC) #6
aberent
jochen@ - Please review files in //components top level directory bauerb@ - Please review //components/web_restrictions
4 years, 10 months ago (2016-02-19 12:37:51 UTC) #8
Bernhard Bauer
https://codereview.chromium.org/1684153002/diff/100001/components/web_restrictions/browser/web_restrictions_client.cc File components/web_restrictions/browser/web_restrictions_client.cc (right): https://codereview.chromium.org/1684153002/diff/100001/components/web_restrictions/browser/web_restrictions_client.cc#newcode207 components/web_restrictions/browser/web_restrictions_client.cc:207: WebRestrictionsClient::ShouldProceedTask( Does this need to be a private static ...
4 years, 10 months ago (2016-02-19 13:46:26 UTC) #9
jochen (gone - plz use gerrit)
https://codereview.chromium.org/1684153002/diff/100001/components/web_restrictions/browser/DEPS File components/web_restrictions/browser/DEPS (right): https://codereview.chromium.org/1684153002/diff/100001/components/web_restrictions/browser/DEPS#newcode2 components/web_restrictions/browser/DEPS:2: "+content/public", content/public/browser please https://codereview.chromium.org/1684153002/diff/100001/components/web_restrictions/renderer/DEPS File components/web_restrictions/renderer/DEPS (right): https://codereview.chromium.org/1684153002/diff/100001/components/web_restrictions/renderer/DEPS#newcode2 components/web_restrictions/renderer/DEPS:2: ...
4 years, 10 months ago (2016-02-19 14:51:21 UTC) #10
Bernhard Bauer
https://codereview.chromium.org/1684153002/diff/100001/components/web_restrictions/renderer/web_restrictions_gin_wrapper.cc File components/web_restrictions/renderer/web_restrictions_gin_wrapper.cc (right): https://codereview.chromium.org/1684153002/diff/100001/components/web_restrictions/renderer/web_restrictions_gin_wrapper.cc#newcode32 components/web_restrictions/renderer/web_restrictions_gin_wrapper.cc:32: global->Set(gin::StringToV8(isolate, "webRestriction"), controller.ToV8()); On 2016/02/19 14:51:21, jochen wrote: > ...
4 years, 10 months ago (2016-02-19 15:13:31 UTC) #11
aberent
cbentzel@ - Please review new dependency on '//net' brettw@ - Please review new dependency on ...
4 years, 10 months ago (2016-02-19 19:40:09 UTC) #13
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1684153002/120001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1684153002/120001
4 years, 10 months ago (2016-02-19 19:43:33 UTC) #15
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: linux_chromium_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_rel_ng/builds/183876)
4 years, 10 months ago (2016-02-19 19:55:26 UTC) #17
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1684153002/140001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1684153002/140001
4 years, 10 months ago (2016-02-22 11:45:45 UTC) #19
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: android_chromium_gn_compile_rel on tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/android_chromium_gn_compile_rel/builds/25275)
4 years, 10 months ago (2016-02-22 11:54:21 UTC) #21
Bernhard Bauer
https://codereview.chromium.org/1684153002/diff/100001/components/web_restrictions/browser/web_restrictions_client.cc File components/web_restrictions/browser/web_restrictions_client.cc (right): https://codereview.chromium.org/1684153002/diff/100001/components/web_restrictions/browser/web_restrictions_client.cc#newcode223 components/web_restrictions/browser/web_restrictions_client.cc:223: result.error_page = On 2016/02/19 19:40:08, aberent wrote: > On ...
4 years, 10 months ago (2016-02-22 12:39:17 UTC) #22
jochen (gone - plz use gerrit)
https://codereview.chromium.org/1684153002/diff/140001/components/web_restrictions/renderer/web_restrictions_gin_wrapper.cc File components/web_restrictions/renderer/web_restrictions_gin_wrapper.cc (right): https://codereview.chromium.org/1684153002/diff/140001/components/web_restrictions/renderer/web_restrictions_gin_wrapper.cc#newcode42 components/web_restrictions/renderer/web_restrictions_gin_wrapper.cc:42: render_frame()->GetWebFrame()->reload(); render_frame() might be nullptr https://codereview.chromium.org/1684153002/diff/140001/components/web_restrictions/renderer/web_restrictions_gin_wrapper.h File components/web_restrictions/renderer/web_restrictions_gin_wrapper.h (right): ...
4 years, 10 months ago (2016-02-22 14:22:44 UTC) #23
aberent
https://codereview.chromium.org/1684153002/diff/100001/components/web_restrictions/browser/web_restrictions_client.cc File components/web_restrictions/browser/web_restrictions_client.cc (right): https://codereview.chromium.org/1684153002/diff/100001/components/web_restrictions/browser/web_restrictions_client.cc#newcode223 components/web_restrictions/browser/web_restrictions_client.cc:223: result.error_page = On 2016/02/22 12:39:16, Bernhard Bauer wrote: > ...
4 years, 10 months ago (2016-02-23 13:52:37 UTC) #24
Bernhard Bauer
https://codereview.chromium.org/1684153002/diff/100001/components/web_restrictions/browser/web_restrictions_client.cc File components/web_restrictions/browser/web_restrictions_client.cc (right): https://codereview.chromium.org/1684153002/diff/100001/components/web_restrictions/browser/web_restrictions_client.cc#newcode223 components/web_restrictions/browser/web_restrictions_client.cc:223: result.error_page = On 2016/02/23 13:52:37, aberent wrote: > On ...
4 years, 10 months ago (2016-02-23 14:29:13 UTC) #25
jochen (gone - plz use gerrit)
lgtm
4 years, 10 months ago (2016-02-23 14:38:01 UTC) #26
aberent
https://codereview.chromium.org/1684153002/diff/100001/components/web_restrictions/browser/web_restrictions_client.cc File components/web_restrictions/browser/web_restrictions_client.cc (right): https://codereview.chromium.org/1684153002/diff/100001/components/web_restrictions/browser/web_restrictions_client.cc#newcode223 components/web_restrictions/browser/web_restrictions_client.cc:223: result.error_page = On 2016/02/23 14:29:13, Bernhard Bauer wrote: > ...
4 years, 10 months ago (2016-02-23 16:26:51 UTC) #28
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1684153002/200001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1684153002/200001
4 years, 10 months ago (2016-02-23 16:27:16 UTC) #29
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: android_chromium_gn_compile_dbg on tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/android_chromium_gn_compile_dbg/builds/25952) android_chromium_gn_compile_rel on ...
4 years, 10 months ago (2016-02-23 16:34:44 UTC) #31
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1684153002/220001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1684153002/220001
4 years, 10 months ago (2016-02-23 17:15:53 UTC) #33
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: chromium_presubmit on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/149104)
4 years, 10 months ago (2016-02-23 17:38:29 UTC) #35
Bernhard Bauer
LGTM, thanks! https://codereview.chromium.org/1684153002/diff/220001/components/web_restrictions/BUILD.gn File components/web_restrictions/BUILD.gn (right): https://codereview.chromium.org/1684153002/diff/220001/components/web_restrictions/BUILD.gn#newcode88 components/web_restrictions/BUILD.gn:88: static_library("test_support") { Should this be a source_set?
4 years, 10 months ago (2016-02-23 18:09:12 UTC) #36
brettw
https://codereview.chromium.org/1684153002/diff/220001/components/web_restrictions/BUILD.gn File components/web_restrictions/BUILD.gn (right): https://codereview.chromium.org/1684153002/diff/220001/components/web_restrictions/BUILD.gn#newcode88 components/web_restrictions/BUILD.gn:88: static_library("test_support") { Yeah, we should make all static_libraries source ...
4 years, 10 months ago (2016-02-23 19:12:26 UTC) #37
cbentzel
Where is the error page HTML being used? That's the portion which concerns me the ...
4 years, 10 months ago (2016-02-24 04:03:02 UTC) #38
aberent
On 2016/02/24 04:03:02, cbentzel (Out til Feb22) wrote: > Where is the error page HTML ...
4 years, 10 months ago (2016-02-24 10:55:52 UTC) #39
aberent
https://codereview.chromium.org/1684153002/diff/220001/components/web_restrictions/BUILD.gn File components/web_restrictions/BUILD.gn (right): https://codereview.chromium.org/1684153002/diff/220001/components/web_restrictions/BUILD.gn#newcode88 components/web_restrictions/BUILD.gn:88: static_library("test_support") { On 2016/02/23 18:09:12, Bernhard Bauer wrote: > ...
4 years, 10 months ago (2016-02-24 10:59:40 UTC) #40
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1684153002/240001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1684153002/240001
4 years, 10 months ago (2016-02-24 11:03:19 UTC) #42
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: chromium_presubmit on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/149537)
4 years, 10 months ago (2016-02-24 11:16:07 UTC) #44
cbentzel
On 2016/02/24 10:55:52, aberent wrote: > On 2016/02/24 04:03:02, cbentzel (Out til Feb22) wrote: > ...
4 years, 10 months ago (2016-02-24 14:20:36 UTC) #45
cbentzel
net/ DEPS usage LGTM (sorry about the gap, forgot about this!)
4 years, 9 months ago (2016-03-01 17:32:09 UTC) #46
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1684153002/240001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1684153002/240001
4 years, 9 months ago (2016-03-01 17:34:19 UTC) #49
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_gn_chromeos_rel on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_gn_chromeos_rel/builds/151045)
4 years, 9 months ago (2016-03-01 17:46:20 UTC) #51
Bernhard Bauer
Brett, friendly ping on DEPS review for url/?
4 years, 9 months ago (2016-03-01 19:29:35 UTC) #52
brettw
deps lgtm
4 years, 9 months ago (2016-03-01 22:35:21 UTC) #53
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1684153002/240001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1684153002/240001
4 years, 9 months ago (2016-03-01 22:59:28 UTC) #55
commit-bot: I haz the power
Committed patchset #13 (id:240001)
4 years, 9 months ago (2016-03-01 23:34:56 UTC) #57
commit-bot: I haz the power
4 years, 9 months ago (2016-03-01 23:37:16 UTC) #59
Message was sent while issue was closed.
Patchset 13 (id:??) landed as
https://crrev.com/d6457207130f1a5abb0d36a27fbf9f4cb31f131f
Cr-Commit-Position: refs/heads/master@{#378601}

Powered by Google App Engine
This is Rietveld 408576698