Chromium Code Reviews
[email protected] (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(124)

Issue 11316316: Implement an IsAllowed function in the pepper PPB_Broker_Trusted API (Closed)

Created:
8 years ago by raymes
Modified:
8 years ago
Reviewers:
jschuh, brettw, yzshen1
CC:
chromium-reviews, yusukes+watch_chromium.org, jam, yzshen+watch_chromium.org, joi+watch-content_chromium.org, darin-cc_chromium.org, raymes+watch_chromium.org, piman+watch_chromium.org, ihf+watch_chromium.org
Visibility:
Public.

Description

Implement an IsAllowed function in the pepper PPB_Broker_Trusted API Flash sometimes needs to synchronously know if it can launch the broker, otherwise it will try to launch the broker when it shouldn't, and end up popping an infobar. This adds an IsAllowed function to synchronously test whether the broker is allowed to launch without popping the infobar. Note that the document URL of the plugin instance is needed in order to check the broker permissions in the browser process. This is only available in the renderer process. In order to avoid an extra hop to the renderer process just to get this URL, it is sent to the browser (with the render view ID) upon initialization of the instance when the instance is registered with the browser process. BUG=163248 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=172104

Patch Set 1 #

Patch Set 2 : . #

Patch Set 3 : . #

Patch Set 4 : . #

Total comments: 26

Patch Set 5 : . #

Patch Set 6 : . #

Patch Set 7 : . #

Patch Set 8 : . #

Patch Set 9 : . #

Patch Set 10 : . #

Unified diffs Side-by-side diffs Delta from patch set Stats (+609 lines, -99 lines) Patch
M chrome/browser/renderer_host/pepper/chrome_browser_pepper_host_factory.cc View 2 chunks +4 lines, -0 lines 0 comments Download
A chrome/browser/renderer_host/pepper/pepper_broker_host.h View 1 2 3 4 1 chunk +29 lines, -0 lines 0 comments Download
A chrome/browser/renderer_host/pepper/pepper_broker_host.cc View 1 2 3 4 1 chunk +118 lines, -0 lines 0 comments Download
M chrome/chrome_browser.gypi View 1 2 3 4 5 6 7 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/test/ppapi/ppapi_browsertest.cc View 1 2 3 4 5 6 7 4 chunks +14 lines, -4 lines 0 comments Download
M chrome/test/ppapi/ppapi_test.h View 1 chunk +1 line, -1 line 0 comments Download
M content/browser/ppapi_plugin_process_host.h View 1 2 3 4 5 6 7 1 chunk +9 lines, -8 lines 0 comments Download
M content/browser/ppapi_plugin_process_host.cc View 1 2 3 4 5 6 7 2 chunks +3 lines, -5 lines 0 comments Download
M content/browser/renderer_host/pepper/browser_ppapi_host_impl.h View 1 2 3 4 5 6 7 4 chunks +13 lines, -15 lines 0 comments Download
M content/browser/renderer_host/pepper/browser_ppapi_host_impl.cc View 1 2 3 4 5 6 7 3 chunks +28 lines, -17 lines 0 comments Download
M content/browser/renderer_host/render_message_filter.h View 1 2 3 4 2 chunks +6 lines, -4 lines 0 comments Download
M content/browser/renderer_host/render_message_filter.cc View 1 2 3 4 3 chunks +6 lines, -4 lines 0 comments Download
A content/common/pepper_renderer_instance_data.h View 1 2 3 4 5 1 chunk +31 lines, -0 lines 0 comments Download
A content/common/pepper_renderer_instance_data.cc View 1 2 3 4 1 chunk +28 lines, -0 lines 0 comments Download
M content/common/view_messages.h View 1 2 3 4 5 6 7 3 chunks +21 lines, -9 lines 0 comments Download
M content/content_common.gypi View 1 2 3 4 5 6 7 1 chunk +2 lines, -0 lines 0 comments Download
M content/public/browser/browser_ppapi_host.h View 1 2 3 4 5 6 7 8 2 chunks +6 lines, -0 lines 0 comments Download
M content/renderer/pepper/pepper_plugin_delegate_impl.cc View 1 2 3 4 5 6 7 2 chunks +8 lines, -1 line 0 comments Download
M ppapi/api/trusted/ppb_broker_trusted.idl View 2 chunks +13 lines, -1 line 0 comments Download
M ppapi/c/trusted/ppb_broker_trusted.h View 4 chunks +22 lines, -4 lines 0 comments Download
M ppapi/native_client/src/untrusted/pnacl_irt_shim/pnacl_shim.c View 1 2 3 4 5 6 7 5 chunks +50 lines, -0 lines 0 comments Download
M ppapi/ppapi_proxy.gypi View 1 2 3 4 5 6 7 1 chunk +2 lines, -0 lines 0 comments Download
A ppapi/proxy/broker_resource.h View 1 chunk +35 lines, -0 lines 0 comments Download
A ppapi/proxy/broker_resource.cc View 1 2 3 4 1 chunk +32 lines, -0 lines 0 comments Download
M ppapi/proxy/ppapi_messages.h View 1 2 3 4 5 6 7 1 chunk +8 lines, -0 lines 0 comments Download
M ppapi/proxy/ppb_instance_proxy.cc View 1 2 3 4 5 6 7 2 chunks +4 lines, -0 lines 0 comments Download
M ppapi/shared_impl/resource.h View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
M ppapi/shared_impl/singleton_resource_id.h View 1 2 3 4 5 6 7 1 chunk +4 lines, -0 lines 0 comments Download
M ppapi/tests/test_broker.h View 1 chunk +2 lines, -0 lines 0 comments Download
M ppapi/tests/test_broker.cc View 1 2 3 4 5 2 chunks +21 lines, -0 lines 0 comments Download
M ppapi/thunk/interfaces_ppb_private.h View 1 chunk +2 lines, -0 lines 0 comments Download
M ppapi/thunk/ppb_broker_api.h View 1 2 2 chunks +15 lines, -0 lines 0 comments Download
M ppapi/thunk/ppb_broker_thunk.cc View 1 2 1 chunk +29 lines, -2 lines 0 comments Download
M webkit/plugins/ppapi/host_var_tracker_unittest.cc View 1 chunk +1 line, -1 line 0 comments Download
M webkit/plugins/ppapi/plugin_module.h View 2 chunks +7 lines, -1 line 0 comments Download
M webkit/plugins/ppapi/plugin_module.cc View 1 chunk +6 lines, -2 lines 0 comments Download
M webkit/plugins/ppapi/ppapi_plugin_instance.h View 3 chunks +8 lines, -5 lines 0 comments Download
M webkit/plugins/ppapi/ppapi_plugin_instance.cc View 1 2 3 4 5 6 7 4 chunks +13 lines, -10 lines 0 comments Download
M webkit/plugins/ppapi/ppapi_unittest.cc View 1 chunk +1 line, -1 line 0 comments Download
M webkit/plugins/ppapi/ppapi_webplugin_impl.cc View 1 chunk +4 lines, -4 lines 0 comments Download

Messages

Total messages: 12 (0 generated)
raymes
There are 2 small plumbing related changes to allow the Document/Plugin URLs to be accessed ...
8 years ago (2012-12-04 17:57:44 UTC) #1
jschuh
lgtm in terms of exposing the correct functionality to the broker.
8 years ago (2012-12-05 00:14:10 UTC) #2
brettw
lgtm https://codereview.chromium.org/11316316/diff/7004/chrome/browser/renderer_host/pepper/pepper_broker_host.cc File chrome/browser/renderer_host/pepper/pepper_broker_host.cc (right): https://codereview.chromium.org/11316316/diff/7004/chrome/browser/renderer_host/pepper/pepper_broker_host.cc#newcode82 chrome/browser/renderer_host/pepper/pepper_broker_host.cc:82: if (!document_url_.is_valid()) Can you add a DCHECK on ...
8 years ago (2012-12-05 23:00:26 UTC) #3
yzshen1
mostly nits. Thanks! https://chromiumcodereview.appspot.com/11316316/diff/7004/chrome/browser/renderer_host/pepper/pepper_broker_host.cc File chrome/browser/renderer_host/pepper/pepper_broker_host.cc (right): https://chromiumcodereview.appspot.com/11316316/diff/7004/chrome/browser/renderer_host/pepper/pepper_broker_host.cc#newcode46 chrome/browser/renderer_host/pepper/pepper_broker_host.cc:46: ~BrokerMessageFilter(); add 'virtual' please. (I understand ...
8 years ago (2012-12-06 19:59:46 UTC) #4
raymes
https://codereview.chromium.org/11316316/diff/7004/chrome/browser/renderer_host/pepper/pepper_broker_host.cc File chrome/browser/renderer_host/pepper/pepper_broker_host.cc (right): https://codereview.chromium.org/11316316/diff/7004/chrome/browser/renderer_host/pepper/pepper_broker_host.cc#newcode46 chrome/browser/renderer_host/pepper/pepper_broker_host.cc:46: ~BrokerMessageFilter(); On 2012/12/06 19:59:46, yzshen1 wrote: > add 'virtual' ...
8 years ago (2012-12-07 21:32:19 UTC) #5
yzshen1
lgtm https://codereview.chromium.org/11316316/diff/7004/content/browser/renderer_host/render_message_filter.h File content/browser/renderer_host/render_message_filter.h (right): https://codereview.chromium.org/11316316/diff/7004/content/browser/renderer_host/render_message_filter.h#newcode173 content/browser/renderer_host/render_message_filter.h:173: PepperRendererInstanceData instance_data, I didn't notice that. Then never ...
8 years ago (2012-12-07 21:54:34 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/[email protected]/11316316/24018
8 years ago (2012-12-10 17:12:01 UTC) #7
commit-bot: I haz the power
Failed to apply patch for content/browser/renderer_host/pepper/browser_ppapi_host_impl.cc: While running patch -p1 --forward --force --no-backup-if-mismatch; patching file ...
8 years ago (2012-12-10 17:12:14 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/[email protected]/11316316/25052
8 years ago (2012-12-10 17:23:11 UTC) #9
commit-bot: I haz the power
Presubmit check for 11316316-25052 failed and returned exit status 1. Running presubmit commit checks ...
8 years ago (2012-12-10 17:23:36 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/[email protected]/11316316/45001
8 years ago (2012-12-10 17:36:56 UTC) #11
commit-bot: I haz the power
8 years ago (2012-12-10 19:28:49 UTC) #12
Message was sent while issue was closed.
Change committed as 172104

Powered by Google App Engine
This is Rietveld 408576698