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

Issue 3717005: This adds a plugin selection policy for selecting allowed plugins (Closed)

Created:
10 years, 2 months ago by Greg Spencer (Chromium)
Modified:
9 years, 7 months ago
CC:
chromium-reviews, ben+cc_chromium.org, darin-cc_chromium.org, brettw-cc_chromium.org, stuartmorgan+watch_chromium.org, Paweł Hajdan Jr., davemoore+watch_chromium.org, jam
Visibility:
Public.

Description

This adds a plugin selection policy for selecting which plugin is allowed for a particular domain. It is only used on ChromeOS. It reads from a file that is installed in a known location on ChromeOS, and uses that as it's policy. When there are multiple plugins supporting the same mime-type, the appropriate plugin file to load is now selected based on policy. BUG=http://crosbug.com/7403 TEST=ran new unit test, tested on device. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=62679

Patch Set 1 #

Total comments: 8

Patch Set 2 : Test changes #

Patch Set 3 : changed ASSERT_TRUE to ASSERT_GT #

Patch Set 4 : Reworked so policy is only in browser, etc. #

Patch Set 5 : merging to TOT, reverting gypi sorts #

Patch Set 6 : some cleanup #

Patch Set 7 : Fixing tasks #

Total comments: 18

Patch Set 8 : finally ready, I hope. #

Patch Set 9 : uploading after merge to TOT #

Total comments: 1

Patch Set 10 : fix win build #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+750 lines, -140 lines) Patch
A chrome/browser/chromeos/plugin_selection_policy.h View 4 5 6 7 1 chunk +79 lines, -0 lines 0 comments Download
A chrome/browser/chromeos/plugin_selection_policy.cc View 4 5 6 7 1 chunk +163 lines, -0 lines 0 comments Download
A chrome/browser/chromeos/plugin_selection_policy_unittest.cc View 4 5 6 7 1 chunk +270 lines, -0 lines 1 comment Download
M chrome/browser/plugin_service.h View 1 2 3 4 5 6 7 8 9 6 chunks +36 lines, -2 lines 0 comments Download
M chrome/browser/plugin_service.cc View 1 2 3 4 5 6 7 4 chunks +73 lines, -7 lines 0 comments Download
M chrome/browser/renderer_host/resource_message_filter.h View 4 5 6 7 1 chunk +9 lines, -10 lines 0 comments Download
M chrome/browser/renderer_host/resource_message_filter.cc View 4 5 6 7 8 6 chunks +37 lines, -39 lines 0 comments Download
M chrome/chrome_browser.gypi View 4 5 6 7 8 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/chrome_tests.gypi View 1 2 3 4 5 6 7 8 2 chunks +2 lines, -1 line 0 comments Download
M chrome/common/render_messages_internal.h View 4 5 6 7 2 chunks +26 lines, -24 lines 0 comments Download
M chrome/renderer/render_view.cc View 1 2 3 4 5 6 7 8 14 chunks +52 lines, -55 lines 0 comments Download
M chrome/renderer/webplugin_delegate_proxy.cc View 8 1 chunk +1 line, -2 lines 0 comments Download

Messages

Total messages: 29 (0 generated)
Greg Spencer (Chromium)
10 years, 2 months ago (2010-10-12 22:41:56 UTC) #1
jam
file on both the browser IO thread is really frowned upon for performance reason. this ...
10 years, 2 months ago (2010-10-12 22:55:06 UTC) #2
piman
http://codereview.chromium.org/3717005/diff/1/2 File chrome/browser/plugin_service.cc (right): http://codereview.chromium.org/3717005/diff/1/2#newcode63 chrome/browser/plugin_service.cc:63: // reads from a policy file. Shouldn't this be ...
10 years, 2 months ago (2010-10-12 23:05:29 UTC) #3
Greg Spencer (Chromium)
On 2010/10/12 22:55:06, John Abd-El-Malek wrote: > file on both the browser IO thread is ...
10 years, 2 months ago (2010-10-12 23:10:54 UTC) #4
jam
On Tue, Oct 12, 2010 at 4:10 PM, <gspencer@chromium.org> wrote: > On 2010/10/12 22:55:06, John ...
10 years, 2 months ago (2010-10-12 23:36:50 UTC) #5
Greg Spencer (Chromium)
http://codereview.chromium.org/3717005/diff/1/2 File chrome/browser/plugin_service.cc (right): http://codereview.chromium.org/3717005/diff/1/2#newcode63 chrome/browser/plugin_service.cc:63: // reads from a policy file. On 2010/10/12 23:05:29, ...
10 years, 2 months ago (2010-10-13 00:03:17 UTC) #6
piman
On Tue, Oct 12, 2010 at 5:03 PM, <gspencer@chromium.org> wrote: > > http://codereview.chromium.org/3717005/diff/1/2 > File ...
10 years, 2 months ago (2010-10-13 00:10:49 UTC) #7
jam
On Tue, Oct 12, 2010 at 5:03 PM, <gspencer@chromium.org> wrote: > > http://codereview.chromium.org/3717005/diff/1/2 > File ...
10 years, 2 months ago (2010-10-13 00:20:56 UTC) #8
piman
On Tue, Oct 12, 2010 at 5:20 PM, John Abd-El-Malek <jam@chromium.org> wrote: > > > ...
10 years, 2 months ago (2010-10-13 00:33:19 UTC) #9
Greg Spencer (Chromium)
On Tue, Oct 12, 2010 at 5:09 PM, Antoine Labour <piman@chromium.org> wrote: > I don't ...
10 years, 2 months ago (2010-10-13 01:04:52 UTC) #10
jam
On Tue, Oct 12, 2010 at 5:32 PM, Antoine Labour <piman@chromium.org> wrote: > > > ...
10 years, 2 months ago (2010-10-13 01:14:30 UTC) #11
Paweł Hajdan Jr.
Drive-by with a test comment. http://codereview.chromium.org/3717005/diff/1/8 File chrome/common/plugin_selection_policy_unittest.cc (right): http://codereview.chromium.org/3717005/diff/1/8#newcode34 chrome/common/plugin_selection_policy_unittest.cc:34: file_util::WriteFile(policy_file, contents.c_str(), contents.size()); Check ...
10 years, 2 months ago (2010-10-13 07:59:04 UTC) #12
jam
btw, the more i think about this, the more I'm against having both the browser ...
10 years, 2 months ago (2010-10-13 17:36:40 UTC) #13
jam
On Wed, Oct 13, 2010 at 10:34 AM, John Abd-El-Malek <jam@chromium.org>wrote: > btw, the more ...
10 years, 2 months ago (2010-10-13 17:38:08 UTC) #14
Greg Spencer (Chromium)
On 2010/10/13 17:36:40, John Abd-El-Malek wrote: > btw, the more i think about this, the ...
10 years, 2 months ago (2010-10-13 18:13:15 UTC) #15
Greg Spencer (Chromium)
http://codereview.chromium.org/3717005/diff/1/8 File chrome/common/plugin_selection_policy_unittest.cc (right): http://codereview.chromium.org/3717005/diff/1/8#newcode34 chrome/common/plugin_selection_policy_unittest.cc:34: file_util::WriteFile(policy_file, contents.c_str(), contents.size()); On 2010/10/13 07:59:04, Paweł Hajdan Jr. ...
10 years, 2 months ago (2010-10-13 18:51:18 UTC) #16
jam
On Wed, Oct 13, 2010 at 11:13 AM, <gspencer@chromium.org> wrote: > On 2010/10/13 17:36:40, John ...
10 years, 2 months ago (2010-10-13 19:15:49 UTC) #17
Greg Spencer (Chromium)
On 2010/10/13 19:15:49, John Abd-El-Malek wrote: > Why not just change ViewHostMsg_GetPluginInfoArray back to > ...
10 years, 2 months ago (2010-10-13 20:31:05 UTC) #18
Greg Spencer (Chromium)
OK, I think I've got this reworked now, so please take another look. It moves ...
10 years, 2 months ago (2010-10-14 02:24:24 UTC) #19
piman
Mostly LGTM with one thing. http://codereview.chromium.org/3717005/diff/31001/32001 File chrome/browser/chromeos/plugin_selection_policy.cc (right): http://codereview.chromium.org/3717005/diff/31001/32001#newcode65 chrome/browser/chromeos/plugin_selection_policy.cc:65: AutoLock lock(lock_); So, in ...
10 years, 2 months ago (2010-10-14 02:43:25 UTC) #20
jam
http://codereview.chromium.org/3717005/diff/31001/32001 File chrome/browser/chromeos/plugin_selection_policy.cc (right): http://codereview.chromium.org/3717005/diff/31001/32001#newcode59 chrome/browser/chromeos/plugin_selection_policy.cc:59: return InitFromFile(FilePath(kPluginSelectionPolicyFile)); We don't want to do any file ...
10 years, 2 months ago (2010-10-14 17:36:52 UTC) #21
Greg Spencer (Chromium)
http://codereview.chromium.org/3717005/diff/31001/32001 File chrome/browser/chromeos/plugin_selection_policy.cc (right): http://codereview.chromium.org/3717005/diff/31001/32001#newcode65 chrome/browser/chromeos/plugin_selection_policy.cc:65: AutoLock lock(lock_); On 2010/10/14 02:43:26, piman wrote: > So, ...
10 years, 2 months ago (2010-10-14 17:59:06 UTC) #22
jam
http://codereview.chromium.org/3717005/diff/31001/32001 File chrome/browser/chromeos/plugin_selection_policy.cc (right): http://codereview.chromium.org/3717005/diff/31001/32001#newcode65 chrome/browser/chromeos/plugin_selection_policy.cc:65: AutoLock lock(lock_); On 2010/10/14 17:59:07, Greg Spencer (Chromium) wrote: ...
10 years, 2 months ago (2010-10-14 18:13:03 UTC) #23
Greg Spencer (Chromium)
On Thu, Oct 14, 2010 at 11:13 AM, <jam@chromium.org> wrote: > Man, I could have ...
10 years, 2 months ago (2010-10-14 18:18:48 UTC) #24
Greg Spencer (Chromium)
OK, I've done the following: - Removed the call to Init from IsAllowed - Removed ...
10 years, 2 months ago (2010-10-14 21:32:53 UTC) #25
jam
lgtm!
10 years, 2 months ago (2010-10-14 22:00:28 UTC) #26
piman
LGTM with the one fix for MSVC http://codereview.chromium.org/3717005/diff/39001/10008 File chrome/browser/plugin_service.h (right): http://codereview.chromium.org/3717005/diff/39001/10008#newcode44 chrome/browser/plugin_service.h:44: class WebPluginInfo; ...
10 years, 2 months ago (2010-10-14 22:44:21 UTC) #27
Paweł Hajdan Jr.
Could you do a follow-up CL? http://codereview.chromium.org/3717005/diff/48001/30014 File chrome/browser/chromeos/plugin_selection_policy_unittest.cc (right): http://codereview.chromium.org/3717005/diff/48001/30014#newcode89 chrome/browser/chromeos/plugin_selection_policy_unittest.cc:89: return bytes_written >= ...
10 years, 2 months ago (2010-10-15 07:17:40 UTC) #28
Greg Spencer (Chromium)
10 years, 2 months ago (2010-10-15 15:37:28 UTC) #29
Yep, I can do that.

-Greg.

On Fri, Oct 15, 2010 at 12:17 AM, <phajdan.jr@chromium.org> wrote:

> Could you do a follow-up CL?
>
>
> http://codereview.chromium.org/3717005/diff/48001/30014
> File chrome/browser/chromeos/plugin_selection_policy_unittest.cc
> (right):
>
> http://codereview.chromium.org/3717005/diff/48001/30014#newcode89
> chrome/browser/chromeos/plugin_selection_policy_unittest.cc:89: return
> bytes_written >= 0;
> This should be bytes_written == contents.size().
>
>
> http://codereview.chromium.org/3717005/show
>

Powered by Google App Engine
This is Rietveld 408576698