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

Issue 7831075: Delegating the "are images allowed" decision to renderer. (Closed)

Created:
9 years, 3 months ago by marja
Modified:
9 years, 1 month ago
CC:
chromium-reviews, darin-cc_chromium.org, brettw-cc_chromium.org, markusheintz_
Visibility:
Public.

Description

Delegating the "are images allowed" decision to renderer. This enables making the decision based on both image url and the page url. E.g., blocking third-party images. BUG=81179 TEST=RenderViewTest.ImagesBlockedByDefault, RenderViewTest.ImagesAllowedByDefault Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=107562

Patch Set 1 #

Patch Set 2 : Transmit image settings to the renderer. Draft. #

Total comments: 10

Patch Set 3 : Code review comments. #

Total comments: 4

Patch Set 4 : Code review modifications. #

Patch Set 5 : More code review comments. #

Total comments: 2

Patch Set 6 : Rebasing on top of trunk. #

Patch Set 7 : Tests. #

Patch Set 8 : Primary <-> secondary url flip here too. #

Patch Set 9 : Test addition. Bugfix. #

Patch Set 10 : DCHECK. #

Patch Set 11 : Rebased to trunk. #

Patch Set 12 : Rebased. #

Total comments: 15

Patch Set 13 : Code review comments. #

Patch Set 14 : Test build fixes. #

Total comments: 2

Patch Set 15 : Rebased. #

Patch Set 16 : Fixing the rebase. #

Patch Set 17 : Code review. #

Patch Set 18 : Cleanup. #

Patch Set 19 : Rebased. #

Patch Set 20 : Style fix. #

Patch Set 21 : Updated contentSettings.html. #

Total comments: 22

Patch Set 22 : Code review. #

Patch Set 23 : Code review (maybe). #

Patch Set 24 : Code review (maybe again) #

Total comments: 3

Patch Set 25 : . #

Patch Set 26 : Rebased. Just in case. #

Patch Set 27 : Rebased. #

Patch Set 28 : Rebasing some more. #

Patch Set 29 : Long line fix. #

Patch Set 30 : Doc fix. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+275 lines, -83 lines) Patch
M chrome/browser/chrome_content_browser_client.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/browser/content_settings/host_content_settings_map.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 3 chunks +4 lines, -16 lines 0 comments Download
M chrome/browser/content_settings/host_content_settings_map.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 3 chunks +3 lines, -3 lines 0 comments Download
M chrome/browser/content_settings/host_content_settings_map_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/content_settings/tab_specific_content_settings.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/browser/extensions/extension_special_storage_policy.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/notifications/desktop_notification_service.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 2 chunks +1 line, -3 lines 0 comments Download
M chrome/browser/notifications/desktop_notification_service.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 2 chunks +2 lines, -1 line 0 comments Download
M chrome/browser/notifications/desktop_notification_service_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 2 chunks +11 lines, -12 lines 0 comments Download
M chrome/browser/ui/webui/options/content_settings_handler.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 9 chunks +23 lines, -19 lines 0 comments Download
M chrome/common/content_settings.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 2 chunks +22 lines, -9 lines 0 comments Download
M chrome/common/content_settings.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 1 chunk +24 lines, -0 lines 0 comments Download
M chrome/common/extensions/api/extension_api.json View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 1 chunk +1 line, -1 line 0 comments Download
M chrome/common/extensions/docs/contentSettings.html View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 1 chunk +1 line, -1 line 0 comments Download
M chrome/common/render_messages.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 3 chunks +13 lines, -0 lines 0 comments Download
M chrome/renderer/chrome_content_renderer_client.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/renderer/chrome_render_process_observer.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 4 chunks +7 lines, -0 lines 0 comments Download
M chrome/renderer/chrome_render_process_observer.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 3 chunks +12 lines, -0 lines 0 comments Download
M chrome/renderer/content_settings_observer.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 2 chunks +16 lines, -5 lines 0 comments Download
M chrome/renderer/content_settings_observer.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 4 chunks +34 lines, -8 lines 0 comments Download
M chrome/renderer/content_settings_observer_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 2 chunks +86 lines, -1 line 0 comments Download

Messages

Total messages: 41 (0 generated)
marja
Hi Jochen, Is this a sane approach to delegating the "images allowed" decision to HostContentSettingsMap? ...
9 years, 3 months ago (2011-09-09 10:41:52 UTC) #1
marja
Hi again, Now transmitting the image settings to the renderer. Does this look like it's ...
9 years, 3 months ago (2011-09-13 14:01:48 UTC) #2
jochen (gone - plz use gerrit)
On 2011/09/13 14:01:48, marja wrote: > Hi again, > > Now transmitting the image settings ...
9 years, 3 months ago (2011-09-13 14:46:23 UTC) #3
marja
On 2011/09/13 14:46:23, jochen wrote: > - this code doesn't send updates if the content ...
9 years, 3 months ago (2011-09-13 15:09:51 UTC) #4
jochen (gone - plz use gerrit)
On 2011/09/13 15:09:51, marja wrote: > On 2011/09/13 14:46:23, jochen wrote: > > - this ...
9 years, 3 months ago (2011-09-13 15:16:12 UTC) #5
jochen (gone - plz use gerrit)
9 years, 3 months ago (2011-09-13 15:16:23 UTC) #6
Bernhard Bauer
On 2011/09/09 10:41:52, marja wrote: > Hi Jochen, > > Is this a sane approach ...
9 years, 3 months ago (2011-09-13 17:38:11 UTC) #7
marja
On 2011/09/13 15:16:12, jochen wrote: > then my comment would be that the initial set ...
9 years, 3 months ago (2011-09-14 14:34:24 UTC) #8
jochen (gone - plz use gerrit)
I think (2) is the way to go On Wed, Sep 14, 2011 at 4:34 ...
9 years, 3 months ago (2011-09-14 18:39:36 UTC) #9
marja
> > Ok. Should that be done by 1) having TabSpecificContentSettings > > send the ...
9 years, 3 months ago (2011-09-15 12:00:11 UTC) #10
marja
Thanks for the comments! http://codereview.chromium.org/7831075/diff/5001/chrome/browser/content_settings/host_content_settings_map.cc File chrome/browser/content_settings/host_content_settings_map.cc (right): http://codereview.chromium.org/7831075/diff/5001/chrome/browser/content_settings/host_content_settings_map.cc#newcode404 chrome/browser/content_settings/host_content_settings_map.cc:404: // ContentSettingPattern precedence relation. On ...
9 years, 3 months ago (2011-09-15 12:02:00 UTC) #11
Bernhard Bauer
http://codereview.chromium.org/7831075/diff/5001/chrome/browser/content_settings/host_content_settings_map.cc File chrome/browser/content_settings/host_content_settings_map.cc (right): http://codereview.chromium.org/7831075/diff/5001/chrome/browser/content_settings/host_content_settings_map.cc#newcode404 chrome/browser/content_settings/host_content_settings_map.cc:404: // ContentSettingPattern precedence relation. On 2011/09/15 12:02:00, marja wrote: ...
9 years, 3 months ago (2011-09-15 12:52:19 UTC) #12
marja
Hi, I did some refactoring according to bauerb's comments. I'm not at all sure I ...
9 years, 3 months ago (2011-09-15 16:00:03 UTC) #13
Bernhard Bauer
http://codereview.chromium.org/7831075/diff/11003/chrome/browser/content_settings/host_content_settings_map.cc File chrome/browser/content_settings/host_content_settings_map.cc (right): http://codereview.chromium.org/7831075/diff/11003/chrome/browser/content_settings/host_content_settings_map.cc#newcode352 chrome/browser/content_settings/host_content_settings_map.cc:352: ContentSettingsForOneType* settings) Nit: I think the |const| belongs on ...
9 years, 3 months ago (2011-09-16 09:16:48 UTC) #14
marja
I moved the "send initial image settings" code from TabSpecificContentSettings to ChromeContentBrowserClient. Does this approach ...
9 years, 3 months ago (2011-09-19 11:53:40 UTC) #15
marja
Hi, I added some tests (unit test for HostContentSettingMap, browser test for ContentSettingsObserver). Does the ...
9 years, 3 months ago (2011-09-20 13:40:12 UTC) #16
marja
Hi Jochen & Bernhard, I rebased this on top of current trunk. The refactoring I ...
9 years, 2 months ago (2011-10-17 12:38:28 UTC) #17
Bernhard Bauer
Woohoo! http://codereview.chromium.org/7831075/diff/67001/chrome/browser/content_settings/host_content_settings_map.h File chrome/browser/content_settings/host_content_settings_map.h (left): http://codereview.chromium.org/7831075/diff/67001/chrome/browser/content_settings/host_content_settings_map.h#oldcode125 chrome/browser/content_settings/host_content_settings_map.h:125: // to be specified, the |resource_identifier| must be ...
9 years, 2 months ago (2011-10-17 13:13:19 UTC) #18
marja
Thanks for comments, I'll do the fixes tomorrow... http://codereview.chromium.org/7831075/diff/67001/chrome/browser/content_settings/host_content_settings_map.h File chrome/browser/content_settings/host_content_settings_map.h (left): http://codereview.chromium.org/7831075/diff/67001/chrome/browser/content_settings/host_content_settings_map.h#oldcode125 chrome/browser/content_settings/host_content_settings_map.h:125: // ...
9 years, 2 months ago (2011-10-17 15:10:11 UTC) #19
Bernhard Bauer
http://codereview.chromium.org/7831075/diff/67001/chrome/browser/content_settings/host_content_settings_map.h File chrome/browser/content_settings/host_content_settings_map.h (left): http://codereview.chromium.org/7831075/diff/67001/chrome/browser/content_settings/host_content_settings_map.h#oldcode125 chrome/browser/content_settings/host_content_settings_map.h:125: // to be specified, the |resource_identifier| must be non-empty. ...
9 years, 2 months ago (2011-10-17 15:14:12 UTC) #20
marja
http://codereview.chromium.org/7831075/diff/67001/chrome/common/content_settings.h File chrome/common/content_settings.h (right): http://codereview.chromium.org/7831075/diff/67001/chrome/common/content_settings.h#newcode48 chrome/common/content_settings.h:48: // I really want my soul back, so I ...
9 years, 2 months ago (2011-10-18 12:23:02 UTC) #21
Bernhard Bauer
http://codereview.chromium.org/7831075/diff/67001/chrome/common/render_messages.h File chrome/common/render_messages.h (right): http://codereview.chromium.org/7831075/diff/67001/chrome/common/render_messages.h#newcode108 chrome/common/render_messages.h:108: struct ParamTraits<ContentSettingsPattern> { On 2011/10/18 12:23:02, marja wrote: > ...
9 years, 2 months ago (2011-10-18 13:14:31 UTC) #22
marja
This should be up to date with trunk again; could you have another look? http://codereview.chromium.org/7831075/diff/67001/chrome/common/render_messages.h ...
9 years, 2 months ago (2011-10-19 16:56:35 UTC) #23
marja
I also updated chrome/common/extensions/docs/contentSettings.html now.
9 years, 2 months ago (2011-10-20 08:46:29 UTC) #24
Bernhard Bauer
http://codereview.chromium.org/7831075/diff/84016/chrome/browser/content_settings/host_content_settings_map.h File chrome/browser/content_settings/host_content_settings_map.h (right): http://codereview.chromium.org/7831075/diff/84016/chrome/browser/content_settings/host_content_settings_map.h#newcode120 chrome/browser/content_settings/host_content_settings_map.h:120: // mapped to their actual settings, in the order ...
9 years, 2 months ago (2011-10-20 09:21:53 UTC) #25
marja
Thanks for comments again! http://codereview.chromium.org/7831075/diff/84016/chrome/browser/content_settings/host_content_settings_map.h File chrome/browser/content_settings/host_content_settings_map.h (right): http://codereview.chromium.org/7831075/diff/84016/chrome/browser/content_settings/host_content_settings_map.h#newcode120 chrome/browser/content_settings/host_content_settings_map.h:120: // mapped to their actual ...
9 years, 2 months ago (2011-10-20 11:44:22 UTC) #26
Bernhard Bauer
http://codereview.chromium.org/7831075/diff/84016/chrome/renderer/content_settings_observer.cc File chrome/renderer/content_settings_observer.cc (right): http://codereview.chromium.org/7831075/diff/84016/chrome/renderer/content_settings_observer.cc#newcode209 chrome/renderer/content_settings_observer.cc:209: bool allow = false; On 2011/10/20 11:44:22, marja wrote: ...
9 years, 2 months ago (2011-10-20 11:58:24 UTC) #27
marja
http://codereview.chromium.org/7831075/diff/84016/chrome/renderer/content_settings_observer.cc File chrome/renderer/content_settings_observer.cc (right): http://codereview.chromium.org/7831075/diff/84016/chrome/renderer/content_settings_observer.cc#newcode209 chrome/renderer/content_settings_observer.cc:209: bool allow = false; On 2011/10/20 11:58:24, Bernhard Bauer ...
9 years, 2 months ago (2011-10-20 14:41:15 UTC) #28
jochen (gone - plz use gerrit)
http://codereview.chromium.org/7831075/diff/84016/chrome/renderer/content_settings_observer.cc File chrome/renderer/content_settings_observer.cc (right): http://codereview.chromium.org/7831075/diff/84016/chrome/renderer/content_settings_observer.cc#newcode210 chrome/renderer/content_settings_observer.cc:210: GURL top_url(frame->top()->document().securityOrigin().toString()); On 2011/10/20 14:41:15, marja wrote: > On ...
9 years, 2 months ago (2011-10-20 15:32:15 UTC) #29
Bernhard Bauer
http://codereview.chromium.org/7831075/diff/84016/chrome/renderer/content_settings_observer.cc File chrome/renderer/content_settings_observer.cc (right): http://codereview.chromium.org/7831075/diff/84016/chrome/renderer/content_settings_observer.cc#newcode210 chrome/renderer/content_settings_observer.cc:210: GURL top_url(frame->top()->document().securityOrigin().toString()); On 2011/10/20 15:32:15, jochen wrote: > On ...
9 years, 2 months ago (2011-10-20 15:37:09 UTC) #30
jochen (gone - plz use gerrit)
http://codereview.chromium.org/7831075/diff/84016/chrome/renderer/content_settings_observer.cc File chrome/renderer/content_settings_observer.cc (right): http://codereview.chromium.org/7831075/diff/84016/chrome/renderer/content_settings_observer.cc#newcode210 chrome/renderer/content_settings_observer.cc:210: GURL top_url(frame->top()->document().securityOrigin().toString()); sorry for being unclear, I meant opening ...
9 years, 2 months ago (2011-10-20 19:01:21 UTC) #31
marja
http://codereview.chromium.org/7831075/diff/84016/chrome/renderer/content_settings_observer.cc File chrome/renderer/content_settings_observer.cc (right): http://codereview.chromium.org/7831075/diff/84016/chrome/renderer/content_settings_observer.cc#newcode210 chrome/renderer/content_settings_observer.cc:210: GURL top_url(frame->top()->document().securityOrigin().toString()); On 2011/10/20 15:32:15, jochen wrote: > What ...
9 years, 2 months ago (2011-10-21 09:52:57 UTC) #32
Bernhard Bauer
http://codereview.chromium.org/7831075/diff/90002/chrome/renderer/content_settings_observer.cc File chrome/renderer/content_settings_observer.cc (right): http://codereview.chromium.org/7831075/diff/90002/chrome/renderer/content_settings_observer.cc#newcode216 chrome/renderer/content_settings_observer.cc:216: if (top_origin == "null" && page_url.SchemeIsFile()) Are there other ...
9 years, 2 months ago (2011-10-21 10:10:10 UTC) #33
Bernhard Bauer
Oh, and LGTM.
9 years, 2 months ago (2011-10-21 10:10:28 UTC) #34
marja
http://codereview.chromium.org/7831075/diff/90002/chrome/renderer/content_settings_observer.cc File chrome/renderer/content_settings_observer.cc (right): http://codereview.chromium.org/7831075/diff/90002/chrome/renderer/content_settings_observer.cc#newcode216 chrome/renderer/content_settings_observer.cc:216: if (top_origin == "null" && page_url.SchemeIsFile()) On 2011/10/21 10:10:10, ...
9 years, 2 months ago (2011-10-21 10:25:05 UTC) #35
Bernhard Bauer
http://codereview.chromium.org/7831075/diff/90002/chrome/renderer/content_settings_observer.cc File chrome/renderer/content_settings_observer.cc (right): http://codereview.chromium.org/7831075/diff/90002/chrome/renderer/content_settings_observer.cc#newcode216 chrome/renderer/content_settings_observer.cc:216: if (top_origin == "null" && page_url.SchemeIsFile()) On 2011/10/21 10:25:05, ...
9 years, 2 months ago (2011-10-21 10:57:35 UTC) #36
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/marja@chromium.org/7831075/99001
9 years, 1 month ago (2011-10-27 12:01:17 UTC) #37
commit-bot: I haz the power
Presubmit check for 7831075-99001 failed and returned exit status 1. Running presubmit commit checks ...
9 years, 1 month ago (2011-10-27 12:01:56 UTC) #38
Finnur
extension_api.json LGTM. On 2011/10/27 12:01:56, I haz the power (commit-bot) wrote: > Presubmit check for ...
9 years, 1 month ago (2011-10-27 12:33:25 UTC) #39
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/marja@chromium.org/7831075/102003
9 years, 1 month ago (2011-10-27 12:34:45 UTC) #40
commit-bot: I haz the power
9 years, 1 month ago (2011-10-27 13:43:44 UTC) #41
Change committed as 107562

Powered by Google App Engine
This is Rietveld 408576698