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

Issue 7828022: Add a method to the HostContentSettings map to return the |Value| of a content setting (Closed)

Created:
9 years, 3 months ago by markusheintz_
Modified:
9 years, 3 months ago
CC:
chromium-reviews, Paweł Hajdan Jr., Bernhard Bauer, Mattias Nissler (ping if slow)
Visibility:
Public.

Description

- Add a method to the HostContentSettings map to return the |Value| of a content setting instead of the type ContentSetting. The HostContentSettingsMap should allow storing arbitrary |Value|s instead of only |ContentSettings| for content settings types (BTW: content settings should be called website settings). This allows to add other content settings type(website settings types) to the host content settings map that require more complex settings than ALLOW, BLOCK, ASK, ... . CONTENT_TYPE_AUTO_SELECT_CERTIFICATE is one example of such a content settings type. CONTENT_TYPE_AUTO_SELECT_CERTIFICATE requires a map with certain criteria that a certificate must match to be selected. - Add filter to the AutoSelectCertificate policy. Instead of only giving a list of origin patterns that specify origins for which client certificates should be auto selected, each origin pattern now also requires a filter with certificate criteria. This is the second CL in a series and follows CL http://codereview.chromium.org/7831004/ BUG=63656, 81825 TEST=host_content_settings_map_unittest.cc, content_settings_policy_provider_unittests.cc TBR=pam@chromium.org Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=99672

Patch Set 1 #

Total comments: 18

Patch Set 2 : Comments addressed & Removed default auto select cert setting. #

Total comments: 12

Patch Set 3 : Comments addressed. Use JSON only for policy format. #

Patch Set 4 : Remove unrelated changes from patchset. #

Total comments: 8

Patch Set 5 : Comments from pam, wtc addressed. Obsolete test removed #

Patch Set 6 : Again: Remove unrelated changes. *sigh* #

Patch Set 7 : Fix typos #

Patch Set 8 : Rebase on top of tree and fix policy template conflicts. #

Patch Set 9 : Change TabContentsSSLHelper to use cert-filters instead of ALLOW and BLOCK #

Patch Set 10 : Update example value of AutoSelectCertificate policy in policy_template.json #

Total comments: 14
Unified diffs Side-by-side diffs Delta from patch set Stats (+193 lines, -100 lines) Patch
M chrome/app/policy/policy_templates.json View 1 2 3 4 5 6 7 8 9 4 chunks +5 lines, -27 lines 0 comments Download
M chrome/browser/content_settings/content_settings_policy_provider.h View 1 2 3 4 5 6 7 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/browser/content_settings/content_settings_policy_provider.cc View 1 2 3 4 5 6 7 9 chunks +83 lines, -14 lines 12 comments Download
M chrome/browser/content_settings/content_settings_policy_provider_unittest.cc View 1 2 3 4 5 4 chunks +22 lines, -24 lines 0 comments Download
M chrome/browser/content_settings/host_content_settings_map.h View 1 2 3 chunks +15 lines, -1 line 0 comments Download
M chrome/browser/content_settings/host_content_settings_map.cc View 1 2 3 4 5 6 8 chunks +56 lines, -9 lines 2 comments Download
M chrome/browser/content_settings/host_content_settings_map_unittest.cc View 1 3 chunks +0 lines, -6 lines 0 comments Download
M chrome/browser/policy/configuration_policy_pref_store.cc View 1 2 3 4 5 6 7 2 chunks +0 lines, -4 lines 0 comments Download
M chrome/browser/policy/configuration_policy_pref_store_unittest.cc View 1 2 3 4 5 6 7 1 chunk +1 line, -3 lines 0 comments Download
M chrome/browser/tab_contents/tab_contents_ssl_helper.cc View 1 2 3 4 5 6 7 8 3 chunks +8 lines, -9 lines 0 comments Download
M chrome/common/pref_names.h View 1 2 3 4 5 6 7 8 9 1 chunk +0 lines, -1 line 0 comments Download
M chrome/common/pref_names.cc View 1 2 3 4 5 6 7 8 9 1 chunk +0 lines, -2 lines 0 comments Download

Messages

Total messages: 18 (0 generated)
markusheintz_
@pam: Please review this CL. @bauerb: Please feel free to comment as well @wtc, @mnissler: ...
9 years, 3 months ago (2011-09-01 19:45:54 UTC) #1
wtc
markusheintz: this is a "drive-by" review. I didn't review the unit test. The CL seems ...
9 years, 3 months ago (2011-09-01 22:42:34 UTC) #2
Pam (message me for reviews)
http://codereview.chromium.org/7828022/diff/1/chrome/browser/content_settings/content_settings_policy_provider_unittest.cc File chrome/browser/content_settings/content_settings_policy_provider_unittest.cc (right): http://codereview.chromium.org/7828022/diff/1/chrome/browser/content_settings/content_settings_policy_provider_unittest.cc#newcode288 chrome/browser/content_settings/content_settings_policy_provider_unittest.cc:288: static_cast<DictionaryValue*>(cert_filter.get())->HasKey("issuer")); Can you test at more detail than this, ...
9 years, 3 months ago (2011-09-02 11:05:29 UTC) #3
markusheintz_
@nmissler: would you please review the policy changes as I'm not in the OWNERS file. ...
9 years, 3 months ago (2011-09-02 14:55:59 UTC) #4
Mattias Nissler (ping if slow)
I didn't look at the details of the content_settings part, but the policy part is ...
9 years, 3 months ago (2011-09-02 15:06:21 UTC) #5
wtc
Drive-by review: Patch Set 2 looks good to me. http://codereview.chromium.org/7828022/diff/6001/chrome/browser/content_settings/content_settings_policy_provider.cc File chrome/browser/content_settings/content_settings_policy_provider.cc (right): http://codereview.chromium.org/7828022/diff/6001/chrome/browser/content_settings/content_settings_policy_provider.cc#newcode37 chrome/browser/content_settings/content_settings_policy_provider.cc:37: ...
9 years, 3 months ago (2011-09-02 18:53:22 UTC) #6
markusheintz_
http://codereview.chromium.org/7828022/diff/6001/chrome/browser/content_settings/content_settings_policy_provider.cc File chrome/browser/content_settings/content_settings_policy_provider.cc (right): http://codereview.chromium.org/7828022/diff/6001/chrome/browser/content_settings/content_settings_policy_provider.cc#newcode37 chrome/browser/content_settings/content_settings_policy_provider.cc:37: NULL, On 2011/09/02 18:53:22, wtc wrote: > Just wanted ...
9 years, 3 months ago (2011-09-02 19:39:12 UTC) #7
wtc
Drive-by review comments on Patch Set 4: http://codereview.chromium.org/7828022/diff/7022/chrome/browser/content_settings/host_content_settings_map.cc File chrome/browser/content_settings/host_content_settings_map.cc (right): http://codereview.chromium.org/7828022/diff/7022/chrome/browser/content_settings/host_content_settings_map.cc#newcode187 chrome/browser/content_settings/host_content_settings_map.cc:187: continue; Thank ...
9 years, 3 months ago (2011-09-02 19:58:50 UTC) #8
Pam (message me for reviews)
http://codereview.chromium.org/7828022/diff/7022/chrome/app/policy/policy_templates.json File chrome/app/policy/policy_templates.json (right): http://codereview.chromium.org/7828022/diff/7022/chrome/app/policy/policy_templates.json#newcode1280 chrome/app/policy/policy_templates.json:1280: 'id': 102, Is it safe to renumber this item? ...
9 years, 3 months ago (2011-09-04 09:10:14 UTC) #9
markusheintz_
http://codereview.chromium.org/7828022/diff/7022/chrome/app/policy/policy_templates.json File chrome/app/policy/policy_templates.json (right): http://codereview.chromium.org/7828022/diff/7022/chrome/app/policy/policy_templates.json#newcode1280 chrome/app/policy/policy_templates.json:1280: 'id': 102, On 2011/09/04 09:10:14, Pam wrote: > Is ...
9 years, 3 months ago (2011-09-04 18:07:01 UTC) #10
markusheintz_
@joao: I need to change the numbering of the policies you just checked in. Maybe ...
9 years, 3 months ago (2011-09-05 12:22:41 UTC) #11
Joao da Silva
Changes in policy_templates.json LGTM.
9 years, 3 months ago (2011-09-05 12:35:49 UTC) #12
wtc
markusheintz: I reviewed the diffs between Patch Sets 4 and 10. I have some comments ...
9 years, 3 months ago (2011-09-06 22:11:42 UTC) #13
wtc
http://codereview.chromium.org/7828022/diff/9003/chrome/browser/content_settings/content_settings_policy_provider.cc File chrome/browser/content_settings/content_settings_policy_provider.cc (right): http://codereview.chromium.org/7828022/diff/9003/chrome/browser/content_settings/content_settings_policy_provider.cc#newcode402 chrome/browser/content_settings/content_settings_policy_provider.cc:402: if (!pattern_read || !filter_read) { We need to allow ...
9 years, 3 months ago (2011-09-07 17:27:48 UTC) #14
markusheintz_
I uploaded the next patchset as CL http://codereview.chromium.org/7837038/ http://codereview.chromium.org/7828022/diff/9003/chrome/browser/content_settings/content_settings_policy_provider.cc File chrome/browser/content_settings/content_settings_policy_provider.cc (right): http://codereview.chromium.org/7828022/diff/9003/chrome/browser/content_settings/content_settings_policy_provider.cc#newcode343 chrome/browser/content_settings/content_settings_policy_provider.cc:343: static_cast<Value*>(Value::CreateIntegerValue( ...
9 years, 3 months ago (2011-09-07 19:29:48 UTC) #15
wtc
http://codereview.chromium.org/7828022/diff/9003/chrome/browser/content_settings/content_settings_policy_provider.cc File chrome/browser/content_settings/content_settings_policy_provider.cc (right): http://codereview.chromium.org/7828022/diff/9003/chrome/browser/content_settings/content_settings_policy_provider.cc#newcode402 chrome/browser/content_settings/content_settings_policy_provider.cc:402: if (!pattern_read || !filter_read) { On 2011/09/07 19:29:48, markusheintz_ ...
9 years, 3 months ago (2011-09-07 21:31:35 UTC) #16
markusheintz_
http://codereview.chromium.org/7828022/diff/9003/chrome/browser/content_settings/content_settings_policy_provider.cc File chrome/browser/content_settings/content_settings_policy_provider.cc (right): http://codereview.chromium.org/7828022/diff/9003/chrome/browser/content_settings/content_settings_policy_provider.cc#newcode402 chrome/browser/content_settings/content_settings_policy_provider.cc:402: if (!pattern_read || !filter_read) { On 2011/09/07 21:31:35, wtc ...
9 years, 3 months ago (2011-09-07 22:23:37 UTC) #17
wtc
9 years, 3 months ago (2011-09-07 23:14:20 UTC) #18
http://codereview.chromium.org/7828022/diff/9003/chrome/browser/content_setti...
File chrome/browser/content_settings/content_settings_policy_provider.cc
(right):

http://codereview.chromium.org/7828022/diff/9003/chrome/browser/content_setti...
chrome/browser/content_settings/content_settings_policy_provider.cc:402: if
(!pattern_read || !filter_read) {
On 2011/09/07 22:23:37, markusheintz_ wrote:
>
> In the TSL handshake the TSL server can request the client certificate with a
> CertificateRequest message right?

Yes, that's how a TLS server requests client authentication.

> And the CertificateRequest message contains
> three fields: certificate_types, supported_signature_algorithme and
> certificate_authorities. So I guess you mean the certificate_authorities field
> which is list of distinguished names.

Yes.  I'm sorry I used inaccurate terminology.
A TLS server can specify the list of acceptable
certificate authorities in the CertificateRequest
message.

> Can a Distinguished Name in this message
> contain a set of AttributetypeAndValue pairs like "CN=... O=... C=... "

Yes, a Distinguished Name is a set of AttributetypeAndValue
pairs like "CN=... O=... C=... ".

For this work, it's useful to understand the CertificateRequest
message.  The info inside the CertificateRequest message
helps the browser narrow down the acceptable client
certificates, ideally to just one certificate.

Powered by Google App Engine
This is Rietveld 408576698