Chromium Code Reviews

Issue 6773006: Add enableReferrers and enableHyperlinkAuditing to contentSettings.misc API. (Closed)

Created:
9 years, 9 months ago by Bernhard Bauer
Modified:
9 years, 7 months ago
Reviewers:
jam, jochen (gone - plz use gerrit), willchan no longer on Chromium, Mattias Nissler (ping if slow)
CC:
chromium-reviews, Erik does not do reviews, brettw-cc_chromium.org, Aaron Boodman, pam+watch_chromium.org, rdsmith+dwatch_chromium.org, Paweł Hajdan Jr., darin-cc_chromium.org
Visibility:
Public.

Description

Add enableReferrers and enableHyperlinkAuditing to contentSettings.misc extension API. BUG=71067 TEST=ExtensionApiTest.* Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=81420

Patch Set 1 #

Patch Set 2 : fix #

Total comments: 6

Patch Set 3 : update #

Patch Set 4 : cleanup #

Patch Set 5 : observe pref changes in tabcontents #

Patch Set 6 : git try #

Total comments: 9

Patch Set 7 : review #

Total comments: 2

Patch Set 8 : fix grammar #

Total comments: 13

Patch Set 9 : remove comment #

Patch Set 10 : observe referrersEnabled in system network delegate #

Patch Set 11 : update comment #

Patch Set 12 : check for torn-down prefmember #

Patch Set 13 : undo #

Patch Set 14 : fix #

Patch Set 15 : add comment #

Total comments: 1

Patch Set 16 : add shutdown methods #

Patch Set 17 : comments #

Patch Set 18 : check for null network_delegate_ #

Patch Set 19 : remove unnecessary include #

Total comments: 5

Patch Set 20 : next try #

Patch Set 21 : use protected accessor #

Patch Set 22 : clean up #

Patch Set 23 : forward-declare booleanprefmember #

Total comments: 12

Patch Set 24 : review #

Patch Set 25 : review #

Total comments: 4

Patch Set 26 : review #

Unified diffs Side-by-side diffs Stats (+308 lines, -30 lines)
M chrome/browser/extensions/extension_content_settings_apitest.cc View 2 chunks +2 lines, -0 lines 0 comments
M chrome/browser/extensions/extension_preference_api.cc View 1 chunk +8 lines, -0 lines 0 comments
M chrome/browser/io_thread.h View 2 chunks +3 lines, -0 lines 0 comments
M chrome/browser/io_thread.cc View 3 chunks +7 lines, -1 line 0 comments
M chrome/browser/net/chrome_network_delegate.h View 2 chunks +15 lines, -1 line 0 comments
M chrome/browser/net/chrome_network_delegate.cc View 2 chunks +17 lines, -0 lines 0 comments
M chrome/browser/prefs/command_line_pref_store.cc View 1 chunk +2 lines, -0 lines 0 comments
M chrome/browser/prefs/pref_member.h View 2 chunks +4 lines, -6 lines 0 comments
M chrome/browser/prefs/pref_member.cc View 4 chunks +8 lines, -7 lines 0 comments
M chrome/browser/profiles/off_the_record_profile_io_data.cc View 3 chunks +5 lines, -0 lines 0 comments
M chrome/browser/profiles/profile_impl.h View 1 chunk +4 lines, -3 lines 0 comments
M chrome/browser/profiles/profile_impl_io_data.cc View 3 chunks +5 lines, -0 lines 0 comments
M chrome/browser/profiles/profile_io_data.h View 3 chunks +10 lines, -0 lines 0 comments
M chrome/browser/profiles/profile_io_data.cc View 2 chunks +6 lines, -0 lines 0 comments
M chrome/browser/renderer_preferences_util.cc View 2 chunks +5 lines, -0 lines 0 comments
M chrome/browser/tab_contents/render_view_host_delegate_helper.cc View 2 chunks +2 lines, -2 lines 0 comments
M chrome/browser/ui/browser.cc View 1 chunk +4 lines, -1 line 0 comments
M chrome/common/extensions/api/extension_api.json View 1 chunk +10 lines, -0 lines 0 comments
M chrome/common/extensions/docs/experimental.contentSettings.misc.html View 2 chunks +152 lines, -0 lines 0 comments
M chrome/common/pref_names.h View 3 chunks +6 lines, -4 lines 0 comments
M chrome/common/pref_names.cc View 1 chunk +6 lines, -0 lines 0 comments
M chrome/test/data/extensions/api_test/content_settings/standard/test.html View 1 chunk +12 lines, -0 lines 0 comments
M content/browser/tab_contents/tab_contents.cc View 2 chunks +6 lines, -1 line 0 comments
M content/common/renderer_preferences.h View 2 chunks +4 lines, -1 line 0 comments
M content/common/renderer_preferences.cc View 2 chunks +3 lines, -2 lines 0 comments
M content/common/view_messages.h View 1 chunk +1 line, -0 lines 0 comments
M content/renderer/render_view.cc View 1 chunk +1 line, -1 line 0 comments

Messages

Total messages: 38 (0 generated)
Bernhard Bauer
Please review (jochen: extension stuff, john: content stuff).
9 years, 9 months ago (2011-03-29 16:29:07 UTC) #1
jam
http://codereview.chromium.org/6773006/diff/2001/chrome/browser/renderer_host/browser_render_process_host.h File chrome/browser/renderer_host/browser_render_process_host.h (right): http://codereview.chromium.org/6773006/diff/2001/chrome/browser/renderer_host/browser_render_process_host.h#newcode217 chrome/browser/renderer_host/browser_render_process_host.h:217: // Weak, owned by |channel_|. what happens if OnChannelError() ...
9 years, 9 months ago (2011-03-29 18:17:16 UTC) #2
Bernhard Bauer
http://codereview.chromium.org/6773006/diff/2001/chrome/browser/renderer_host/browser_render_process_host.h File chrome/browser/renderer_host/browser_render_process_host.h (right): http://codereview.chromium.org/6773006/diff/2001/chrome/browser/renderer_host/browser_render_process_host.h#newcode217 chrome/browser/renderer_host/browser_render_process_host.h:217: // Weak, owned by |channel_|. On 2011/03/29 18:17:16, John ...
9 years, 9 months ago (2011-03-29 19:26:57 UTC) #3
jam
On 2011/03/29 19:26:57, Bernhard Bauer wrote: > http://codereview.chromium.org/6773006/diff/2001/chrome/browser/renderer_host/browser_render_process_host.h > File chrome/browser/renderer_host/browser_render_process_host.h (right): > > http://codereview.chromium.org/6773006/diff/2001/chrome/browser/renderer_host/browser_render_process_host.h#newcode217 ...
9 years, 9 months ago (2011-03-29 21:04:22 UTC) #4
jochen (gone - plz use gerrit)
will you add some extension api tests for this? will it be possible to e.g. ...
9 years, 9 months ago (2011-03-30 08:29:10 UTC) #5
Bernhard Bauer
On Wed, Mar 30, 2011 at 10:29, <jochen@chromium.org> wrote: > will you add some extension ...
9 years, 8 months ago (2011-03-30 10:00:03 UTC) #6
Bernhard Bauer
On Tue, Mar 29, 2011 at 23:04, <jam@chromium.org> wrote: > On 2011/03/29 19:26:57, Bernhard Bauer ...
9 years, 8 months ago (2011-03-30 18:41:39 UTC) #7
Bernhard Bauer
OK, I now strip referrers in the renderer in RenderView (for WebKit) and in the ...
9 years, 8 months ago (2011-04-04 17:51:58 UTC) #8
jam
lgtm but i'm not familiar with the browser/prefs code, so please have someone more familiar ...
9 years, 8 months ago (2011-04-04 23:36:32 UTC) #9
Bernhard Bauer
On 2011/04/04 23:36:32, John Abd-El-Malek wrote: > lgtm but i'm not familiar with the browser/prefs ...
9 years, 8 months ago (2011-04-05 07:26:14 UTC) #10
jochen (gone - plz use gerrit)
extension bits LGTM for the network delegate, I'd propose to add willchan
9 years, 8 months ago (2011-04-05 07:47:30 UTC) #11
Mattias Nissler (ping if slow)
LG, just some nits I found while looking at chrome/browser/prefs/* and friends. http://codereview.chromium.org/6773006/diff/12025/chrome/browser/prefs/pref_member.cc File chrome/browser/prefs/pref_member.cc ...
9 years, 8 months ago (2011-04-05 08:48:27 UTC) #12
Bernhard Bauer
http://codereview.chromium.org/6773006/diff/12025/chrome/browser/prefs/pref_member.cc File chrome/browser/prefs/pref_member.cc (right): http://codereview.chromium.org/6773006/diff/12025/chrome/browser/prefs/pref_member.cc#newcode77 chrome/browser/prefs/pref_member.cc:77: } On 2011/04/05 08:48:27, Mattias Nissler wrote: > No ...
9 years, 8 months ago (2011-04-05 10:48:34 UTC) #13
Mattias Nissler (ping if slow)
Pref stuff LGTM (with a nit). http://codereview.chromium.org/6773006/diff/12025/chrome/common/pref_names.h File chrome/common/pref_names.h (right): http://codereview.chromium.org/6773006/diff/12025/chrome/common/pref_names.h#newcode475 chrome/common/pref_names.h:475: extern const char ...
9 years, 8 months ago (2011-04-05 10:57:46 UTC) #14
Mattias Nissler (ping if slow)
Pref stuff LGTM (with a nit). http://codereview.chromium.org/6773006/diff/12025/chrome/common/pref_names.h File chrome/common/pref_names.h (right): http://codereview.chromium.org/6773006/diff/12025/chrome/common/pref_names.h#newcode475 chrome/common/pref_names.h:475: extern const char ...
9 years, 8 months ago (2011-04-05 10:57:47 UTC) #15
Bernhard Bauer
On 2011/04/05 07:47:30, jochen wrote: > extension bits LGTM > > for the network delegate, ...
9 years, 8 months ago (2011-04-05 11:34:31 UTC) #16
willchan no longer on Chromium
http://codereview.chromium.org/6773006/diff/12028/chrome/browser/net/chrome_network_delegate.h File chrome/browser/net/chrome_network_delegate.h (right): http://codereview.chromium.org/6773006/diff/12028/chrome/browser/net/chrome_network_delegate.h#newcode26 chrome/browser/net/chrome_network_delegate.h:26: // PrefService and moved to the IO thread. It ...
9 years, 8 months ago (2011-04-05 13:10:40 UTC) #17
Bernhard Bauer
Thanks for the review! http://codereview.chromium.org/6773006/diff/12028/chrome/browser/net/chrome_network_delegate.h File chrome/browser/net/chrome_network_delegate.h (right): http://codereview.chromium.org/6773006/diff/12028/chrome/browser/net/chrome_network_delegate.h#newcode26 chrome/browser/net/chrome_network_delegate.h:26: // PrefService and moved to ...
9 years, 8 months ago (2011-04-05 14:49:02 UTC) #18
willchan no longer on Chromium
http://codereview.chromium.org/6773006/diff/12028/chrome/browser/net/chrome_network_delegate.h File chrome/browser/net/chrome_network_delegate.h (right): http://codereview.chromium.org/6773006/diff/12028/chrome/browser/net/chrome_network_delegate.h#newcode26 chrome/browser/net/chrome_network_delegate.h:26: // PrefService and moved to the IO thread. It ...
9 years, 8 months ago (2011-04-05 15:06:18 UTC) #19
Bernhard Bauer
http://codereview.chromium.org/6773006/diff/12028/chrome/browser/net/chrome_network_delegate.h File chrome/browser/net/chrome_network_delegate.h (right): http://codereview.chromium.org/6773006/diff/12028/chrome/browser/net/chrome_network_delegate.h#newcode26 chrome/browser/net/chrome_network_delegate.h:26: // PrefService and moved to the IO thread. It ...
9 years, 8 months ago (2011-04-05 16:12:58 UTC) #20
willchan no longer on Chromium
http://codereview.chromium.org/6773006/diff/12028/chrome/browser/profiles/profile_io_data.cc File chrome/browser/profiles/profile_io_data.cc (right): http://codereview.chromium.org/6773006/diff/12028/chrome/browser/profiles/profile_io_data.cc#newcode137 chrome/browser/profiles/profile_io_data.cc:137: params->enable_referrers->ObserveProfileDestruction(profile); On 2011/04/05 16:12:59, Bernhard Bauer wrote: > On ...
9 years, 8 months ago (2011-04-05 17:12:51 UTC) #21
Bernhard Bauer
http://codereview.chromium.org/6773006/diff/12028/chrome/browser/profiles/profile_io_data.cc File chrome/browser/profiles/profile_io_data.cc (right): http://codereview.chromium.org/6773006/diff/12028/chrome/browser/profiles/profile_io_data.cc#newcode137 chrome/browser/profiles/profile_io_data.cc:137: params->enable_referrers->ObserveProfileDestruction(profile); On 2011/04/05 17:12:51, willchan wrote: > On 2011/04/05 ...
9 years, 8 months ago (2011-04-05 18:24:47 UTC) #22
Bernhard Bauer
On Tue, Apr 5, 2011 at 20:24, <bauerb@chromium.org> wrote: > > http://codereview.chromium.org/6773006/diff/12028/chrome/browser/profiles/profile_io_data.cc > File chrome/browser/profiles/profile_io_data.cc ...
9 years, 8 months ago (2011-04-08 12:54:05 UTC) #23
willchan no longer on Chromium
http://codereview.chromium.org/6773006/diff/12028/chrome/browser/profiles/profile_io_data.cc File chrome/browser/profiles/profile_io_data.cc (right): http://codereview.chromium.org/6773006/diff/12028/chrome/browser/profiles/profile_io_data.cc#newcode137 chrome/browser/profiles/profile_io_data.cc:137: params->enable_referrers->ObserveProfileDestruction(profile); On 2011/04/05 18:24:47, Bernhard Bauer wrote: > On ...
9 years, 8 months ago (2011-04-08 19:10:36 UTC) #24
Bernhard Bauer
On Fri, Apr 8, 2011 at 21:10, <willchan@chromium.org> wrote: > > http://codereview.chromium.org/6773006/diff/12028/chrome/browser/profiles/profile_io_data.cc > File chrome/browser/profiles/profile_io_data.cc ...
9 years, 8 months ago (2011-04-11 14:16:15 UTC) #25
willchan no longer on Chromium
http://codereview.chromium.org/6773006/diff/28030/chrome/browser/profiles/off_the_record_profile_io_data.cc File chrome/browser/profiles/off_the_record_profile_io_data.cc (right): http://codereview.chromium.org/6773006/diff/28030/chrome/browser/profiles/off_the_record_profile_io_data.cc#newcode104 chrome/browser/profiles/off_the_record_profile_io_data.cc:104: if (network_delegate_.get()) This is called on the UI thread, ...
9 years, 8 months ago (2011-04-11 15:21:41 UTC) #26
Bernhard Bauer
http://codereview.chromium.org/6773006/diff/28030/chrome/browser/profiles/off_the_record_profile_io_data.cc File chrome/browser/profiles/off_the_record_profile_io_data.cc (right): http://codereview.chromium.org/6773006/diff/28030/chrome/browser/profiles/off_the_record_profile_io_data.cc#newcode104 chrome/browser/profiles/off_the_record_profile_io_data.cc:104: if (network_delegate_.get()) On 2011/04/11 15:21:41, willchan wrote: > This ...
9 years, 8 months ago (2011-04-11 15:56:02 UTC) #27
willchan no longer on Chromium
http://codereview.chromium.org/6773006/diff/28030/chrome/browser/profiles/off_the_record_profile_io_data.cc File chrome/browser/profiles/off_the_record_profile_io_data.cc (right): http://codereview.chromium.org/6773006/diff/28030/chrome/browser/profiles/off_the_record_profile_io_data.cc#newcode104 chrome/browser/profiles/off_the_record_profile_io_data.cc:104: if (network_delegate_.get()) On 2011/04/11 15:56:02, Bernhard Bauer wrote: > ...
9 years, 8 months ago (2011-04-11 16:00:20 UTC) #28
Bernhard Bauer
http://codereview.chromium.org/6773006/diff/28030/chrome/browser/profiles/off_the_record_profile_io_data.cc File chrome/browser/profiles/off_the_record_profile_io_data.cc (right): http://codereview.chromium.org/6773006/diff/28030/chrome/browser/profiles/off_the_record_profile_io_data.cc#newcode104 chrome/browser/profiles/off_the_record_profile_io_data.cc:104: if (network_delegate_.get()) On 2011/04/11 16:00:20, willchan wrote: > On ...
9 years, 8 months ago (2011-04-11 16:19:25 UTC) #29
willchan no longer on Chromium
http://codereview.chromium.org/6773006/diff/28030/chrome/browser/profiles/off_the_record_profile_io_data.cc File chrome/browser/profiles/off_the_record_profile_io_data.cc (right): http://codereview.chromium.org/6773006/diff/28030/chrome/browser/profiles/off_the_record_profile_io_data.cc#newcode104 chrome/browser/profiles/off_the_record_profile_io_data.cc:104: if (network_delegate_.get()) On 2011/04/11 16:00:20, willchan wrote: > On ...
9 years, 8 months ago (2011-04-11 16:24:37 UTC) #30
Bernhard Bauer
On Mon, Apr 11, 2011 at 18:24, <willchan@chromium.org> wrote: > > http://codereview.chromium.org/6773006/diff/28030/chrome/browser/profiles/off_the_record_profile_io_data.cc > File chrome/browser/profiles/off_the_record_profile_io_data.cc ...
9 years, 8 months ago (2011-04-12 15:11:16 UTC) #31
willchan no longer on Chromium
http://codereview.chromium.org/6773006/diff/33031/chrome/browser/profiles/profile_io_data.cc File chrome/browser/profiles/profile_io_data.cc (right): http://codereview.chromium.org/6773006/diff/33031/chrome/browser/profiles/profile_io_data.cc#newcode284 chrome/browser/profiles/profile_io_data.cc:284: void ProfileIOData::Shutdown() { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); http://codereview.chromium.org/6773006/diff/33031/chrome/browser/profiles/profile_io_data.h File chrome/browser/profiles/profile_io_data.h (right): http://codereview.chromium.org/6773006/diff/33031/chrome/browser/profiles/profile_io_data.h#newcode122 ...
9 years, 8 months ago (2011-04-12 16:34:17 UTC) #32
Bernhard Bauer
(I'll work on the other comments tomorrow, when I'm back at the office) http://codereview.chromium.org/6773006/diff/33031/chrome/browser/profiles/profile_io_data.h File ...
9 years, 8 months ago (2011-04-12 20:26:04 UTC) #33
willchan no longer on Chromium
http://codereview.chromium.org/6773006/diff/33031/chrome/browser/profiles/profile_io_data.h File chrome/browser/profiles/profile_io_data.h (right): http://codereview.chromium.org/6773006/diff/33031/chrome/browser/profiles/profile_io_data.h#newcode122 chrome/browser/profiles/profile_io_data.h:122: explicit ProfileIOData(Profile* profile, bool is_incognito); On 2011/04/12 20:26:05, Bernhard ...
9 years, 8 months ago (2011-04-12 22:43:07 UTC) #34
Bernhard Bauer
http://codereview.chromium.org/6773006/diff/33031/chrome/browser/profiles/profile_io_data.cc File chrome/browser/profiles/profile_io_data.cc (right): http://codereview.chromium.org/6773006/diff/33031/chrome/browser/profiles/profile_io_data.cc#newcode284 chrome/browser/profiles/profile_io_data.cc:284: void ProfileIOData::Shutdown() { On 2011/04/12 16:34:18, willchan wrote: > ...
9 years, 8 months ago (2011-04-13 11:17:19 UTC) #35
willchan no longer on Chromium
LGTM! http://codereview.chromium.org/6773006/diff/38001/chrome/browser/io_thread.h File chrome/browser/io_thread.h (right): http://codereview.chromium.org/6773006/diff/38001/chrome/browser/io_thread.h#newcode185 chrome/browser/io_thread.h:185: BooleanPrefMember enable_referrers_; Nit: maybe we should call this ...
9 years, 8 months ago (2011-04-13 14:59:00 UTC) #36
Bernhard Bauer
Committing now. Thanks for your patience with this CL! http://codereview.chromium.org/6773006/diff/38001/chrome/browser/io_thread.h File chrome/browser/io_thread.h (right): http://codereview.chromium.org/6773006/diff/38001/chrome/browser/io_thread.h#newcode185 chrome/browser/io_thread.h:185: ...
9 years, 8 months ago (2011-04-13 15:14:50 UTC) #37
willchan no longer on Chromium
9 years, 8 months ago (2011-04-13 15:18:06 UTC) #38
Hah, thanks for your patience in putting up with my
nittipickiness/strictness :)

On Wed, Apr 13, 2011 at 5:14 PM, <bauerb@chromium.org> wrote:

> Committing now. Thanks for your patience with this CL!
>
>
>
>
> http://codereview.chromium.org/6773006/diff/38001/chrome/browser/io_thread.h
> File chrome/browser/io_thread.h (right):
>
>
>
http://codereview.chromium.org/6773006/diff/38001/chrome/browser/io_thread.h#...
> chrome/browser/io_thread.h:185: BooleanPrefMember enable_referrers_;
> On 2011/04/13 14:59:00, willchan wrote:
>
>> Nit: maybe we should call this system_enable_referrers_, to indicate
>>
> that this
>
>> is Profile agnostic. Up to you!
>>
>
> Sounds good.
>
>
>
>
http://codereview.chromium.org/6773006/diff/38001/chrome/browser/net/chrome_n...
> File chrome/browser/net/chrome_network_delegate.cc (right):
>
>
>
http://codereview.chromium.org/6773006/diff/38001/chrome/browser/net/chrome_n...
> chrome/browser/net/chrome_network_delegate.cc:57:
> DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
> On 2011/04/13 14:59:00, willchan wrote:
>
>> Please include browser_thread.h for this.
>>
>
> Done.
>
>
> http://codereview.chromium.org/6773006/
>

Powered by Google App Engine