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

Issue 6253012: Add ContentSettingsProvider Interface. (Closed)

Created:
9 years, 11 months ago by markusheintz_
Modified:
9 years, 6 months ago
CC:
chromium-reviews, Paweł Hajdan Jr.
Visibility:
Public.

Description

Add ContentSettingsProvider Interface. BUG=63656 TEST=TBA Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=73279

Patch Set 1 #

Total comments: 27

Patch Set 2 : " #

Total comments: 2

Patch Set 3 : Fix lints nits and rename *CSP to *DefaultCSP #

Patch Set 4 : Removing ContentSettingIdentifier type #

Patch Set 5 : Add ContentSettingsTypeIsManaged method #

Patch Set 6 : Remove obsolete classes #

Total comments: 8

Patch Set 7 : Re-Add "Interface" suffix to interface class names. #

Patch Set 8 : Fix nits and rename ContentSettingsProviderInterface to ProviderInterface #

Total comments: 2

Patch Set 9 : " #

Patch Set 10 : " #

Patch Set 11 : content_settings::ProviderInterface only #

Patch Set 12 : " #

Total comments: 3

Patch Set 13 : Remove ContentSettingsTypeIsManaged method from ProviderInterface #

Total comments: 2

Patch Set 14 : " #

Total comments: 14

Patch Set 15 : Fix nits and last comments. #

Total comments: 8

Patch Set 16 : " #

Total comments: 6

Patch Set 17 : " #

Unified diffs Side-by-side diffs Delta from patch set Stats (+99 lines, -2 lines) Patch
M chrome/browser/content_settings/content_settings_provider.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 2 chunks +73 lines, -0 lines 0 comments Download
M chrome/browser/content_settings/mock_content_settings_provider.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 3 chunks +26 lines, -2 lines 0 comments Download

Messages

Total messages: 54 (0 generated)
markusheintz_
Please review. Thanks @Jochen: Following up our email conversation: I think you are right that ...
9 years, 11 months ago (2011-01-26 09:45:26 UTC) #1
Bernhard Bauer
On 2011/01/26 09:45:26, markusheintz_ wrote: > Please review. Thanks > > @Jochen: Following up our ...
9 years, 11 months ago (2011-01-26 10:25:18 UTC) #2
jochen (gone - plz use gerrit)
All those new small classes make the interface very hard to understand. e.g. I think ...
9 years, 11 months ago (2011-01-26 11:29:18 UTC) #3
Bernhard Bauer
http://codereview.chromium.org/6253012/diff/1/chrome/browser/content_settings/content_settings_provider.h File chrome/browser/content_settings/content_settings_provider.h (right): http://codereview.chromium.org/6253012/diff/1/chrome/browser/content_settings/content_settings_provider.h#newcode56 chrome/browser/content_settings/content_settings_provider.h:56: virtual ~ContentSettingsProvider() {} On 2011/01/26 11:29:18, jochen wrote: > ...
9 years, 11 months ago (2011-01-26 11:34:23 UTC) #4
markusheintz_
Well ... somehow this degrades more and more to copying code. We start slowly taking ...
9 years, 11 months ago (2011-01-26 13:47:40 UTC) #5
jochen (gone - plz use gerrit)
On 2011/01/26 11:34:23, Bernhard Bauer wrote: > http://codereview.chromium.org/6253012/diff/1/chrome/browser/content_settings/content_settings_provider.h > File chrome/browser/content_settings/content_settings_provider.h (right): > > http://codereview.chromium.org/6253012/diff/1/chrome/browser/content_settings/content_settings_provider.h#newcode56 ...
9 years, 11 months ago (2011-01-26 14:08:32 UTC) #6
Bernhard Bauer
On Wed, Jan 26, 2011 at 15:08, <jochen@chromium.org> wrote: > On 2011/01/26 11:34:23, Bernhard Bauer ...
9 years, 11 months ago (2011-01-26 14:17:57 UTC) #7
markusheintz_
Please see CL http://codereview.chromium.org/6242013/ and let me know if you are fine with adding a ...
9 years, 11 months ago (2011-01-26 14:34:31 UTC) #8
markusheintz_
Please check if I used the namespace definitions according to the style guide and whether ...
9 years, 11 months ago (2011-01-26 15:27:07 UTC) #9
Bernhard Bauer
Just a small nit for now, but I'm holding back review of the rest until ...
9 years, 11 months ago (2011-01-26 15:51:59 UTC) #10
markusheintz_
Fixed the nit some lints and renamed the {Pref,Policy}ContentSettingsProvider to {Pref,Policy}DefaultContentSettingsProvider http://codereview.chromium.org/6253012/diff/15001/chrome/browser/content_settings/host_content_settings_map.h File chrome/browser/content_settings/host_content_settings_map.h (right): ...
9 years, 11 months ago (2011-01-26 16:14:42 UTC) #11
markusheintz_
Updated the CL based on our email discussion.
9 years, 11 months ago (2011-01-27 09:01:09 UTC) #12
jochen (gone - plz use gerrit)
On 2011/01/27 09:01:09, markusheintz_ wrote: > Updated the CL based on our email discussion. Thanks! ...
9 years, 11 months ago (2011-01-27 09:48:26 UTC) #13
Bernhard Bauer
On 2011/01/27 09:48:26, jochen wrote: > On 2011/01/27 09:01:09, markusheintz_ wrote: > > Updated the ...
9 years, 11 months ago (2011-01-27 09:54:14 UTC) #14
Bernhard Bauer
http://codereview.chromium.org/6253012/diff/33001/chrome/browser/content_settings/content_settings_provider.h File chrome/browser/content_settings/content_settings_provider.h (right): http://codereview.chromium.org/6253012/diff/33001/chrome/browser/content_settings/content_settings_provider.h#newcode56 chrome/browser/content_settings/content_settings_provider.h:56: : requesting_url_pattern_(requesting_url_pattern), Nit: The colon should be indented four ...
9 years, 11 months ago (2011-01-27 09:54:26 UTC) #15
jochen (gone - plz use gerrit)
On 2011/01/27 09:54:14, Bernhard Bauer wrote: > On 2011/01/27 09:48:26, jochen wrote: > > On ...
9 years, 11 months ago (2011-01-27 09:57:33 UTC) #16
markusheintz_
I shorted the names and kept the namespaces. Should I really revert renaming the PrefContentSettingsProvider ...
9 years, 11 months ago (2011-01-27 10:24:37 UTC) #17
markusheintz_
I guess you are right separating the changes. Are you fine with me having a ...
9 years, 11 months ago (2011-01-27 10:48:49 UTC) #18
Bernhard Bauer
http://codereview.chromium.org/6253012/diff/10/chrome/browser/content_settings/content_settings_provider.h File chrome/browser/content_settings/content_settings_provider.h (right): http://codereview.chromium.org/6253012/diff/10/chrome/browser/content_settings/content_settings_provider.h#newcode54 chrome/browser/content_settings/content_settings_provider.h:54: struct Rule { Sorry to create conflicts with jochen's ...
9 years, 11 months ago (2011-01-27 11:03:48 UTC) #19
jochen (gone - plz use gerrit)
On 2011/01/27 11:03:48, Bernhard Bauer wrote: > http://codereview.chromium.org/6253012/diff/10/chrome/browser/content_settings/content_settings_provider.h > File chrome/browser/content_settings/content_settings_provider.h (right): > > http://codereview.chromium.org/6253012/diff/10/chrome/browser/content_settings/content_settings_provider.h#newcode54 ...
9 years, 11 months ago (2011-01-27 12:27:21 UTC) #20
markusheintz
I agree with Jochen here. Outside the HostContentSettingsMap you either: - The CONTENT_SETTING or - ...
9 years, 11 months ago (2011-01-27 12:34:53 UTC) #21
markusheintz_
Please continue with the review. NOW: content_settings::ProviderInterface changes only.
9 years, 10 months ago (2011-01-31 13:41:38 UTC) #22
Bernhard Bauer
http://codereview.chromium.org/6253012/diff/54001/chrome/browser/content_settings/content_settings_provider.h File chrome/browser/content_settings/content_settings_provider.h (right): http://codereview.chromium.org/6253012/diff/54001/chrome/browser/content_settings/content_settings_provider.h#newcode73 chrome/browser/content_settings/content_settings_provider.h:73: ContentSettingsType content_type) = 0; Do we need this? What ...
9 years, 10 months ago (2011-01-31 13:48:58 UTC) #23
markusheintz_
http://codereview.chromium.org/6253012/diff/54001/chrome/browser/content_settings/content_settings_provider.h File chrome/browser/content_settings/content_settings_provider.h (right): http://codereview.chromium.org/6253012/diff/54001/chrome/browser/content_settings/content_settings_provider.h#newcode73 chrome/browser/content_settings/content_settings_provider.h:73: ContentSettingsType content_type) = 0; On 2011/01/31 13:48:58, Bernhard Bauer ...
9 years, 10 months ago (2011-01-31 14:21:19 UTC) #24
jochen (gone - plz use gerrit)
http://codereview.chromium.org/6253012/diff/54001/chrome/browser/content_settings/content_settings_provider.h File chrome/browser/content_settings/content_settings_provider.h (right): http://codereview.chromium.org/6253012/diff/54001/chrome/browser/content_settings/content_settings_provider.h#newcode73 chrome/browser/content_settings/content_settings_provider.h:73: ContentSettingsType content_type) = 0; On 2011/01/31 14:21:19, markusheintz_ wrote: ...
9 years, 10 months ago (2011-01-31 14:30:02 UTC) #25
markusheintz
On Mon, Jan 31, 2011 at 3:30 PM, <jochen@chromium.org> wrote: > > > http://codereview.chromium.org/6253012/diff/54001/chrome/browser/content_settings/content_settings_provider.h > ...
9 years, 10 months ago (2011-01-31 14:39:34 UTC) #26
jochen (gone - plz use gerrit)
On 2011/01/31 14:39:34, markusheintz wrote: > On Mon, Jan 31, 2011 at 3:30 PM, <mailto:jochen@chromium.org> ...
9 years, 10 months ago (2011-01-31 14:42:08 UTC) #27
markusheintz
The same source the provider would know. On Mon, Jan 31, 2011 at 3:42 PM, ...
9 years, 10 months ago (2011-01-31 14:43:55 UTC) #28
jochen (gone - plz use gerrit)
Ideally, only the policy provider knows how to check whether something is managed. On 2011/01/31 ...
9 years, 10 months ago (2011-01-31 14:51:33 UTC) #29
Bernhard Bauer
To be exact, the host content settings map would know that the content settings are ...
9 years, 10 months ago (2011-01-31 14:52:08 UTC) #30
markusheintz
Once we replaced the default content settings with a "match_all_pattern" the managed content settings provider ...
9 years, 10 months ago (2011-01-31 14:59:46 UTC) #31
jochen (gone - plz use gerrit)
On 2011/01/31 14:52:08, Bernhard Bauer wrote: > To be exact, the host content settings map ...
9 years, 10 months ago (2011-01-31 15:00:24 UTC) #32
Bernhard Bauer
On Mon, Jan 31, 2011 at 16:00, <jochen@chromium.org> wrote: > On 2011/01/31 14:52:08, Bernhard Bauer ...
9 years, 10 months ago (2011-01-31 15:05:42 UTC) #33
jochen (gone - plz use gerrit)
We want to support the case (1) default managed, user can create exceptions in addition ...
9 years, 10 months ago (2011-01-31 15:13:09 UTC) #34
markusheintz
There are two use cases: 1) Admin wants to manage default and allow the user ...
9 years, 10 months ago (2011-01-31 15:14:28 UTC) #35
Bernhard Bauer
I don't think we are actually in disagreement here. All I'm saying is I think ...
9 years, 10 months ago (2011-01-31 15:26:37 UTC) #36
jochen (gone - plz use gerrit)
On 2011/01/31 15:26:37, Bernhard Bauer wrote: > I don't think we are actually in disagreement ...
9 years, 10 months ago (2011-01-31 15:48:20 UTC) #37
jochen (gone - plz use gerrit)
Bernhard answered: "For case (a) the default setting is set in the recommended content settings ...
9 years, 10 months ago (2011-01-31 16:13:09 UTC) #38
Bernhard Bauer
For case (a) the default setting is set in the recommended content settings provider, for ...
9 years, 10 months ago (2011-01-31 16:23:16 UTC) #39
Bernhard Bauer
I think we already had that discussion ;-) Defaults managed but exceptions allowed effectively means ...
9 years, 10 months ago (2011-01-31 16:32:51 UTC) #40
jochen (gone - plz use gerrit)
On 2011/01/31 16:32:51, Bernhard Bauer wrote: > I think we already had that discussion ;-) ...
9 years, 10 months ago (2011-01-31 16:37:09 UTC) #41
Bernhard Bauer
On Mon, Jan 31, 2011 at 17:37, <jochen@chromium.org> wrote: > On 2011/01/31 16:32:51, Bernhard Bauer ...
9 years, 10 months ago (2011-01-31 16:57:43 UTC) #42
markusheintz
On Mon, Jan 31, 2011 at 4:48 PM, <jochen@chromium.org> wrote: > On 2011/01/31 15:26:37, Bernhard ...
9 years, 10 months ago (2011-01-31 17:04:27 UTC) #43
markusheintz
Somehow my answer got lost so here I sent it again: How would the content_settings_provider ...
9 years, 10 months ago (2011-01-31 17:15:22 UTC) #44
Bernhard Bauer
Can we just try it out without adding ContentSettingsTypeIsManaged and see how far we get? ...
9 years, 10 months ago (2011-01-31 17:32:25 UTC) #45
markusheintz
+1 because: - It's easier to add than to remove from an API - We ...
9 years, 10 months ago (2011-01-31 17:43:26 UTC) #46
Bernhard Bauer
LGTM http://codereview.chromium.org/6253012/diff/54009/chrome/browser/content_settings/content_settings_provider.h File chrome/browser/content_settings/content_settings_provider.h (right): http://codereview.chromium.org/6253012/diff/54009/chrome/browser/content_settings/content_settings_provider.h#newcode74 chrome/browser/content_settings/content_settings_provider.h:74: const GURL requesting_url, Nit: const GURL&
9 years, 10 months ago (2011-02-01 09:38:43 UTC) #47
markusheintz_
Added comments to the interface methods and a dummy implementation of the ProviderInterface to the ...
9 years, 10 months ago (2011-02-01 10:09:37 UTC) #48
jochen (gone - plz use gerrit)
LGTM with nits http://codereview.chromium.org/6253012/diff/13006/chrome/browser/content_settings/content_settings_provider.h File chrome/browser/content_settings/content_settings_provider.h (right): http://codereview.chromium.org/6253012/diff/13006/chrome/browser/content_settings/content_settings_provider.h#newcode63 chrome/browser/content_settings/content_settings_provider.h:63: const ContentSettingsPattern requesting_url_pattern_; no _ at ...
9 years, 10 months ago (2011-02-01 11:22:35 UTC) #49
markusheintz_
http://codereview.chromium.org/6253012/diff/13006/chrome/browser/content_settings/content_settings_provider.h File chrome/browser/content_settings/content_settings_provider.h (right): http://codereview.chromium.org/6253012/diff/13006/chrome/browser/content_settings/content_settings_provider.h#newcode63 chrome/browser/content_settings/content_settings_provider.h:63: const ContentSettingsPattern requesting_url_pattern_; On 2011/02/01 11:22:35, jochen wrote: > ...
9 years, 10 months ago (2011-02-01 11:34:38 UTC) #50
jochen (gone - plz use gerrit)
http://codereview.chromium.org/6253012/diff/54010/chrome/browser/content_settings/content_settings_provider.h File chrome/browser/content_settings/content_settings_provider.h (right): http://codereview.chromium.org/6253012/diff/54010/chrome/browser/content_settings/content_settings_provider.h#newcode59 chrome/browser/content_settings/content_settings_provider.h:59: : requesting_url_pattern_(requesting_url_pattern), also remove the underscores here http://codereview.chromium.org/6253012/diff/54010/chrome/browser/content_settings/mock_content_settings_provider.h File ...
9 years, 10 months ago (2011-02-01 11:38:39 UTC) #51
markusheintz_
http://codereview.chromium.org/6253012/diff/54010/chrome/browser/content_settings/content_settings_provider.h File chrome/browser/content_settings/content_settings_provider.h (right): http://codereview.chromium.org/6253012/diff/54010/chrome/browser/content_settings/content_settings_provider.h#newcode59 chrome/browser/content_settings/content_settings_provider.h:59: : requesting_url_pattern_(requesting_url_pattern), On 2011/02/01 11:38:39, jochen wrote: > also ...
9 years, 10 months ago (2011-02-01 12:17:12 UTC) #52
jochen (gone - plz use gerrit)
lgtm, no need for a further cycle http://codereview.chromium.org/6253012/diff/36002/chrome/browser/content_settings/content_settings_provider.h File chrome/browser/content_settings/content_settings_provider.h (right): http://codereview.chromium.org/6253012/diff/36002/chrome/browser/content_settings/content_settings_provider.h#newcode59 chrome/browser/content_settings/content_settings_provider.h:59: : requesting_url_pattern(requesting_pattern), ...
9 years, 10 months ago (2011-02-01 12:33:11 UTC) #53
markusheintz_
9 years, 10 months ago (2011-02-01 12:38:01 UTC) #54
THANKS! Just an FYI reply here

http://codereview.chromium.org/6253012/diff/36002/chrome/browser/content_sett...
File chrome/browser/content_settings/content_settings_provider.h (right):

http://codereview.chromium.org/6253012/diff/36002/chrome/browser/content_sett...
chrome/browser/content_settings/content_settings_provider.h:59: :
requesting_url_pattern(requesting_pattern),
On 2011/02/01 12:33:11, jochen wrote:
> nit. you can use requesting_url_pattern both times (as parameter and member
> variable). C++ will do the right thing

Ah cool! :-) THANKS.

http://codereview.chromium.org/6253012/diff/36002/chrome/browser/content_sett...
chrome/browser/content_settings/content_settings_provider.h:91: const
ContentSettingsPattern& requesting_pattern,
On 2011/02/01 12:33:11, jochen wrote:
> nit. requesting_url_pattern and embedding_url_pattern

Done.

http://codereview.chromium.org/6253012/diff/36002/chrome/browser/content_sett...
File chrome/browser/content_settings/mock_content_settings_provider.h (right):

http://codereview.chromium.org/6253012/diff/36002/chrome/browser/content_sett...
chrome/browser/content_settings/mock_content_settings_provider.h:44: const
ContentSettingsPattern& requesting_pattern,
On 2011/02/01 12:33:11, jochen wrote:
> nit. requesting_url_pattern and embedding_url_pattern

Done.

Powered by Google App Engine
This is Rietveld 408576698