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

Issue 1631603002: Web restrictions component only. (Closed)

Created:
4 years, 11 months ago by knn
Modified:
4 years, 10 months ago
CC:
blundell+watchlist_chromium.org, chromium-reviews, droger+watchlist_chromium.org, 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 only. Splitting away non webview specific pieces from https://codereview.chromium.org/1423713015 so that Anthony can work parallely on the chrome bits while the webview bits are reviewed. The individual pieces are: A content resolver based web restriction provider. A gin wrapper and a resource throttle to tie it together. BUG=569879

Patch Set 1 #

Total comments: 35

Patch Set 2 : rebase #

Total comments: 4

Patch Set 3 : #

Patch Set 4 : comments #

Total comments: 16

Patch Set 5 : use sequenced task runner #

Total comments: 6

Patch Set 6 : moar comments #

Total comments: 13

Patch Set 7 : compare with ps5 #

Patch Set 8 : rm thread_checker #

Total comments: 10

Patch Set 9 : edge case #

Patch Set 10 : destruct anywhere #

Total comments: 11

Patch Set 11 : comments #

Patch Set 12 : #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+823 lines, -14 lines) Patch
M components/web_restrictions.gypi View 1 2 1 chunk +31 lines, -0 lines 0 comments Download
M components/web_restrictions/BUILD.gn View 1 2 1 chunk +39 lines, -12 lines 0 comments Download
A + components/web_restrictions/DEPS View 1 1 chunk +3 lines, -2 lines 2 comments Download
A components/web_restrictions/content_resolver_web_restrictions_provider.h View 1 2 3 4 5 6 7 8 1 chunk +86 lines, -0 lines 0 comments Download
A components/web_restrictions/content_resolver_web_restrictions_provider.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +304 lines, -0 lines 0 comments Download
A components/web_restrictions/java/src/org/chromium/components/webrestrictions/ContentResolverWebRestrictionsProvider.java View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +111 lines, -0 lines 0 comments Download
A components/web_restrictions/web_restrictions_gin_wrapper.h View 1 2 1 chunk +43 lines, -0 lines 2 comments Download
A components/web_restrictions/web_restrictions_gin_wrapper.cc View 1 2 1 chunk +54 lines, -0 lines 0 comments Download
A components/web_restrictions/web_restrictions_provider.h View 1 2 1 chunk +40 lines, -0 lines 0 comments Download
A components/web_restrictions/web_restrictions_resource_throttle.h View 1 2 3 1 chunk +50 lines, -0 lines 0 comments Download
A components/web_restrictions/web_restrictions_resource_throttle.cc View 1 2 1 chunk +62 lines, -0 lines 0 comments Download

Messages

Total messages: 38 (4 generated)
knn
PTAL. Thanks!
4 years, 11 months ago (2016-01-25 11:55:10 UTC) #2
Bernhard Bauer
https://codereview.chromium.org/1631603002/diff/1/components/web_restriction.gypi File components/web_restriction.gypi (right): https://codereview.chromium.org/1631603002/diff/1/components/web_restriction.gypi#newcode34 components/web_restriction.gypi:34: #GN: //components/web_restriction:web_restriction Nit: Space after the comment character (#) ...
4 years, 11 months ago (2016-01-26 11:09:03 UTC) #3
knn
PTAL. Thanks! https://codereview.chromium.org/1631603002/diff/1/components/web_restriction.gypi File components/web_restriction.gypi (right): https://codereview.chromium.org/1631603002/diff/1/components/web_restriction.gypi#newcode34 components/web_restriction.gypi:34: #GN: //components/web_restriction:web_restriction On 2016/01/26 11:09:02, Bernhard Bauer ...
4 years, 11 months ago (2016-01-26 14:37:44 UTC) #4
aberent
https://codereview.chromium.org/1631603002/diff/40001/components/web_restrictions/content_resolver_web_restrictions_provider.cc File components/web_restrictions/content_resolver_web_restrictions_provider.cc (right): https://codereview.chromium.org/1631603002/diff/40001/components/web_restrictions/content_resolver_web_restrictions_provider.cc#newcode50 components/web_restrictions/content_resolver_web_restrictions_provider.cc:50: url_access_cache[url_] = should_proceed; What happens when the parent grants ...
4 years, 11 months ago (2016-01-27 14:16:42 UTC) #6
Bernhard Bauer
https://codereview.chromium.org/1631603002/diff/1/components/web_restriction/content_resolver_web_restriction_provider.cc File components/web_restriction/content_resolver_web_restriction_provider.cc (right): https://codereview.chromium.org/1631603002/diff/1/components/web_restriction/content_resolver_web_restriction_provider.cc#newcode81 components/web_restriction/content_resolver_web_restriction_provider.cc:81: const std::string& content_provider_authority) { Could you also DCHECK(!initialized_)? https://codereview.chromium.org/1631603002/diff/1/components/web_restriction/content_resolver_web_restriction_provider.cc#newcode92 ...
4 years, 11 months ago (2016-01-27 14:24:01 UTC) #7
knn
PTAL. Thanks! https://codereview.chromium.org/1631603002/diff/1/components/web_restriction/content_resolver_web_restriction_provider.cc File components/web_restriction/content_resolver_web_restriction_provider.cc (right): https://codereview.chromium.org/1631603002/diff/1/components/web_restriction/content_resolver_web_restriction_provider.cc#newcode81 components/web_restriction/content_resolver_web_restriction_provider.cc:81: const std::string& content_provider_authority) { On 2016/01/27 14:24:00, ...
4 years, 10 months ago (2016-01-28 11:43:25 UTC) #8
Bernhard Bauer
https://codereview.chromium.org/1631603002/diff/1/components/web_restriction/content_resolver_web_restriction_provider.cc File components/web_restriction/content_resolver_web_restriction_provider.cc (right): https://codereview.chromium.org/1631603002/diff/1/components/web_restriction/content_resolver_web_restriction_provider.cc#newcode81 components/web_restriction/content_resolver_web_restriction_provider.cc:81: const std::string& content_provider_authority) { On 2016/01/28 11:43:25, knn wrote: ...
4 years, 10 months ago (2016-01-28 12:15:14 UTC) #9
aberent
No additional comments beyond Bernhard's comments.
4 years, 10 months ago (2016-01-28 17:44:30 UTC) #10
knn
PTAL. Hopefully the threading is right this time. Thanks! https://codereview.chromium.org/1631603002/diff/80001/components/web_restrictions/content_resolver_web_restrictions_provider.cc File components/web_restrictions/content_resolver_web_restrictions_provider.cc (right): https://codereview.chromium.org/1631603002/diff/80001/components/web_restrictions/content_resolver_web_restrictions_provider.cc#newcode19 components/web_restrictions/content_resolver_web_restrictions_provider.cc:19: ...
4 years, 10 months ago (2016-01-28 18:10:37 UTC) #11
knn
Looks like I forgot to say PTAL!
4 years, 10 months ago (2016-02-02 15:01:20 UTC) #12
Bernhard Bauer
You didn't, I just forgot to send this off. Sorry! https://codereview.chromium.org/1631603002/diff/100001/components/web_restrictions/content_resolver_web_restrictions_provider.cc File components/web_restrictions/content_resolver_web_restrictions_provider.cc (right): https://codereview.chromium.org/1631603002/diff/100001/components/web_restrictions/content_resolver_web_restrictions_provider.cc#newcode88 ...
4 years, 10 months ago (2016-02-02 15:03:56 UTC) #13
knn
PTAL. Thanks! https://codereview.chromium.org/1631603002/diff/100001/components/web_restrictions/content_resolver_web_restrictions_provider.cc File components/web_restrictions/content_resolver_web_restrictions_provider.cc (right): https://codereview.chromium.org/1631603002/diff/100001/components/web_restrictions/content_resolver_web_restrictions_provider.cc#newcode88 components/web_restrictions/content_resolver_web_restrictions_provider.cc:88: provider_->UpdateCache(url_, should_proceed, error_page); On 2016/02/02 15:03:56, Bernhard ...
4 years, 10 months ago (2016-02-03 15:47:18 UTC) #14
Bernhard Bauer
https://codereview.chromium.org/1631603002/diff/120001/components/web_restrictions/content_resolver_web_restrictions_provider.cc File components/web_restrictions/content_resolver_web_restrictions_provider.cc (right): https://codereview.chromium.org/1631603002/diff/120001/components/web_restrictions/content_resolver_web_restrictions_provider.cc#newcode78 components/web_restrictions/content_resolver_web_restrictions_provider.cc:78: const scoped_refptr<base::TaskRunner>& callback_runner, If the contract of ContentResolverWebRestrictionsProvider says ...
4 years, 10 months ago (2016-02-03 16:15:42 UTC) #15
aberent
https://codereview.chromium.org/1631603002/diff/120001/components/web_restrictions/content_resolver_web_restrictions_provider.cc File components/web_restrictions/content_resolver_web_restrictions_provider.cc (right): https://codereview.chromium.org/1631603002/diff/120001/components/web_restrictions/content_resolver_web_restrictions_provider.cc#newcode97 components/web_restrictions/content_resolver_web_restrictions_provider.cc:97: base::Unretained(provider_), url_, should_proceed, Is |provider_| still guaranteed to still ...
4 years, 10 months ago (2016-02-03 16:22:07 UTC) #16
knn
https://codereview.chromium.org/1631603002/diff/120001/components/web_restrictions/content_resolver_web_restrictions_provider.cc File components/web_restrictions/content_resolver_web_restrictions_provider.cc (right): https://codereview.chromium.org/1631603002/diff/120001/components/web_restrictions/content_resolver_web_restrictions_provider.cc#newcode245 components/web_restrictions/content_resolver_web_restrictions_provider.cc:245: error_page_cache_[url] = *error_page; On 2016/02/03 16:15:42, Bernhard Bauer wrote: ...
4 years, 10 months ago (2016-02-03 16:23:56 UTC) #17
knn
https://codereview.chromium.org/1631603002/diff/120001/components/web_restrictions/content_resolver_web_restrictions_provider.cc File components/web_restrictions/content_resolver_web_restrictions_provider.cc (right): https://codereview.chromium.org/1631603002/diff/120001/components/web_restrictions/content_resolver_web_restrictions_provider.cc#newcode97 components/web_restrictions/content_resolver_web_restrictions_provider.cc:97: base::Unretained(provider_), url_, should_proceed, On 2016/02/03 16:22:07, aberent wrote: > ...
4 years, 10 months ago (2016-02-03 16:26:07 UTC) #18
Bernhard Bauer
https://codereview.chromium.org/1631603002/diff/120001/components/web_restrictions/content_resolver_web_restrictions_provider.cc File components/web_restrictions/content_resolver_web_restrictions_provider.cc (right): https://codereview.chromium.org/1631603002/diff/120001/components/web_restrictions/content_resolver_web_restrictions_provider.cc#newcode245 components/web_restrictions/content_resolver_web_restrictions_provider.cc:245: error_page_cache_[url] = *error_page; On 2016/02/03 16:23:56, knn wrote: > ...
4 years, 10 months ago (2016-02-03 16:26:50 UTC) #19
knn
PTAL. Thanks! https://codereview.chromium.org/1631603002/diff/120001/components/web_restrictions/content_resolver_web_restrictions_provider.cc File components/web_restrictions/content_resolver_web_restrictions_provider.cc (right): https://codereview.chromium.org/1631603002/diff/120001/components/web_restrictions/content_resolver_web_restrictions_provider.cc#newcode78 components/web_restrictions/content_resolver_web_restrictions_provider.cc:78: const scoped_refptr<base::TaskRunner>& callback_runner, On 2016/02/03 16:15:42, Bernhard ...
4 years, 10 months ago (2016-02-03 17:15:09 UTC) #20
aberent
https://codereview.chromium.org/1631603002/diff/120001/components/web_restrictions/content_resolver_web_restrictions_provider.cc File components/web_restrictions/content_resolver_web_restrictions_provider.cc (right): https://codereview.chromium.org/1631603002/diff/120001/components/web_restrictions/content_resolver_web_restrictions_provider.cc#newcode97 components/web_restrictions/content_resolver_web_restrictions_provider.cc:97: base::Unretained(provider_), url_, should_proceed, On 2016/02/03 16:26:07, knn wrote: > ...
4 years, 10 months ago (2016-02-03 17:56:15 UTC) #21
knn
https://codereview.chromium.org/1631603002/diff/120001/components/web_restrictions/content_resolver_web_restrictions_provider.cc File components/web_restrictions/content_resolver_web_restrictions_provider.cc (right): https://codereview.chromium.org/1631603002/diff/120001/components/web_restrictions/content_resolver_web_restrictions_provider.cc#newcode97 components/web_restrictions/content_resolver_web_restrictions_provider.cc:97: base::Unretained(provider_), url_, should_proceed, On 2016/02/03 17:56:15, aberent wrote: > ...
4 years, 10 months ago (2016-02-03 18:51:13 UTC) #22
aberent
More threading problems. Sorry! https://codereview.chromium.org/1631603002/diff/160001/components/web_restrictions/content_resolver_web_restrictions_provider.cc File components/web_restrictions/content_resolver_web_restrictions_provider.cc (right): https://codereview.chromium.org/1631603002/diff/160001/components/web_restrictions/content_resolver_web_restrictions_provider.cc#newcode85 components/web_restrictions/content_resolver_web_restrictions_provider.cc:85: void SelfDeletingCallback::ShouldProceed(bool should_proceed, Further to ...
4 years, 10 months ago (2016-02-03 19:26:22 UTC) #23
knn
PTAL. Thanks! https://codereview.chromium.org/1631603002/diff/160001/components/web_restrictions/content_resolver_web_restrictions_provider.cc File components/web_restrictions/content_resolver_web_restrictions_provider.cc (right): https://codereview.chromium.org/1631603002/diff/160001/components/web_restrictions/content_resolver_web_restrictions_provider.cc#newcode85 components/web_restrictions/content_resolver_web_restrictions_provider.cc:85: void SelfDeletingCallback::ShouldProceed(bool should_proceed, On 2016/02/03 19:26:22, aberent ...
4 years, 10 months ago (2016-02-03 21:23:21 UTC) #24
aberent
lgtm - assuming we are doing the tests as a separate CL. https://codereview.chromium.org/1631603002/diff/200001/components/web_restrictions/java/src/org/chromium/components/webrestrictions/ContentResolverWebRestrictionsProvider.java File components/web_restrictions/java/src/org/chromium/components/webrestrictions/ContentResolverWebRestrictionsProvider.java ...
4 years, 10 months ago (2016-02-04 10:53:58 UTC) #25
Bernhard Bauer
https://codereview.chromium.org/1631603002/diff/200001/components/web_restrictions/content_resolver_web_restrictions_provider.cc File components/web_restrictions/content_resolver_web_restrictions_provider.cc (right): https://codereview.chromium.org/1631603002/diff/200001/components/web_restrictions/content_resolver_web_restrictions_provider.cc#newcode234 components/web_restrictions/content_resolver_web_restrictions_provider.cc:234: if (provider_authority != provider_authority_) You could add a comment ...
4 years, 10 months ago (2016-02-04 11:13:53 UTC) #26
knn
PTAL. Thanks! https://codereview.chromium.org/1631603002/diff/200001/components/web_restrictions/content_resolver_web_restrictions_provider.cc File components/web_restrictions/content_resolver_web_restrictions_provider.cc (right): https://codereview.chromium.org/1631603002/diff/200001/components/web_restrictions/content_resolver_web_restrictions_provider.cc#newcode234 components/web_restrictions/content_resolver_web_restrictions_provider.cc:234: if (provider_authority != provider_authority_) On 2016/02/04 11:13:53, ...
4 years, 10 months ago (2016-02-04 13:09:28 UTC) #27
knn
Adding Owners for added DEPS, jochen@chromium.org: Please review a DEP on: content/public, gin, third_party/WebKit (using ...
4 years, 10 months ago (2016-02-04 13:54:52 UTC) #29
aberent
Still lgtm
4 years, 10 months ago (2016-02-04 14:26:15 UTC) #30
Bernhard Bauer
https://codereview.chromium.org/1631603002/diff/200001/components/web_restrictions/java/src/org/chromium/components/webrestrictions/ContentResolverWebRestrictionsProvider.java File components/web_restrictions/java/src/org/chromium/components/webrestrictions/ContentResolverWebRestrictionsProvider.java (right): https://codereview.chromium.org/1631603002/diff/200001/components/web_restrictions/java/src/org/chromium/components/webrestrictions/ContentResolverWebRestrictionsProvider.java#newcode90 components/web_restrictions/java/src/org/chromium/components/webrestrictions/ContentResolverWebRestrictionsProvider.java:90: synchronized (this) { On 2016/02/04 13:09:27, knn wrote: > ...
4 years, 10 months ago (2016-02-04 14:27:21 UTC) #31
knn
PTAL. Thanks! https://codereview.chromium.org/1631603002/diff/200001/components/web_restrictions/java/src/org/chromium/components/webrestrictions/ContentResolverWebRestrictionsProvider.java File components/web_restrictions/java/src/org/chromium/components/webrestrictions/ContentResolverWebRestrictionsProvider.java (right): https://codereview.chromium.org/1631603002/diff/200001/components/web_restrictions/java/src/org/chromium/components/webrestrictions/ContentResolverWebRestrictionsProvider.java#newcode90 components/web_restrictions/java/src/org/chromium/components/webrestrictions/ContentResolverWebRestrictionsProvider.java:90: synchronized (this) { On 2016/02/04 14:27:21, Bernhard ...
4 years, 10 months ago (2016-02-04 15:31:33 UTC) #32
Bernhard Bauer
lgtm https://codereview.chromium.org/1631603002/diff/200001/components/web_restrictions/java/src/org/chromium/components/webrestrictions/ContentResolverWebRestrictionsProvider.java File components/web_restrictions/java/src/org/chromium/components/webrestrictions/ContentResolverWebRestrictionsProvider.java (right): https://codereview.chromium.org/1631603002/diff/200001/components/web_restrictions/java/src/org/chromium/components/webrestrictions/ContentResolverWebRestrictionsProvider.java#newcode90 components/web_restrictions/java/src/org/chromium/components/webrestrictions/ContentResolverWebRestrictionsProvider.java:90: synchronized (this) { On 2016/02/04 15:31:33, knn wrote: ...
4 years, 10 months ago (2016-02-04 22:37:18 UTC) #33
jochen (gone - plz use gerrit)
https://codereview.chromium.org/1631603002/diff/240001/components/web_restrictions/DEPS File components/web_restrictions/DEPS (right): https://codereview.chromium.org/1631603002/diff/240001/components/web_restrictions/DEPS#newcode2 components/web_restrictions/DEPS:2: "+content/public", please don't mix browser and renderer stuff in ...
4 years, 10 months ago (2016-02-05 14:55:07 UTC) #34
aberent
knn@ - I cannot wait any longer for this; since you are no longer on ...
4 years, 10 months ago (2016-02-10 12:09:57 UTC) #35
aberent
not lgtm Cancelling LGTM since this is now replaced by https://codereview.chromium.org/1684153002
4 years, 10 months ago (2016-02-10 15:52:34 UTC) #36
aberent
4 years, 10 months ago (2016-02-19 12:31:18 UTC) #38
Message was sent while issue was closed.
https://codereview.chromium.org/1631603002/diff/240001/components/web_restric...
File components/web_restrictions/DEPS (right):

https://codereview.chromium.org/1631603002/diff/240001/components/web_restric...
components/web_restrictions/DEPS:2: "+content/public",
On 2016/02/05 14:55:07, jochen (OOO) wrote:
> please don't mix browser and renderer stuff in one target.
> 
> Instead, create the usual subdirectory structure (browser/common/renderer) and
> create individual targets for that.
Done in https://codereview.chromium.org/1684153002/
> 
> It would also be great to include the code that uses this component in the CL,
> so it's easier to see whether the interface is right.
I would prefer to keep this separate, because if I include this, and the tests,
the CL becomes unmanageably large. You can see an initial version of its use in
https://codereview.chromium.org/1423713015.
> 
> last but not least: tests please
Done in https://codereview.chromium.org/1684153002/

https://codereview.chromium.org/1631603002/diff/240001/components/web_restric...
File components/web_restrictions/web_restrictions_gin_wrapper.h (right):

https://codereview.chromium.org/1631603002/diff/240001/components/web_restric...
components/web_restrictions/web_restrictions_gin_wrapper.h:36:
content::RenderFrame* render_frame_;
On 2016/02/05 14:55:07, jochen (OOO) wrote:
> please derive from RenderFrameObserver instead of maintaining the pointer
> yourself
Done in https://codereview.chromium.org/1684153002/

Powered by Google App Engine
This is Rietveld 408576698