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

Issue 24576003: <webview>: Change how plugin load works inside guests. (Closed)

Created:
7 years, 2 months ago by sadrul
Modified:
7 years, 2 months ago
CC:
chromium-reviews, stuartmorgan+watch_chromium.org, jam
Visibility:
Public.

Description

<webview>: Change how plugin load works inside guests. The changes include: * Always disallow loading NPAPI plugins inside guests. * Do not allow installing a plugin from inside guests. * Mark all plugins inside guests as needing authorization. This triggers a javascript 'permissionrequest' event on the <webview> inside the embedder. The embedder can chose to allow() or deny() the plugin from being loaded. If the embedder callback doesn't preventDefault() the event, and does not call either allow() or deny(), then the plugin is allowed. BUG=156120 R=bauerb@chromium.org, fsamuel@chromium.org, jam@chromium.org Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=225800

Patch Set 1 #

Patch Set 2 : . #

Patch Set 3 : . #

Total comments: 11

Patch Set 4 : . #

Patch Set 5 : . #

Patch Set 6 : . #

Total comments: 2

Patch Set 7 : . #

Patch Set 8 : missing-file #

Total comments: 2

Patch Set 9 : . #

Total comments: 2

Patch Set 10 : . #

Patch Set 11 : . #

Total comments: 2

Patch Set 12 : . #

Unified diffs Side-by-side diffs Delta from patch set Stats (+341 lines, -7 lines) Patch
M chrome/browser/apps/web_view_browsertest.cc View 1 2 3 3 chunks +39 lines, -0 lines 0 comments Download
A chrome/browser/guestview/webview/plugin_permission_helper.h View 1 2 3 4 5 1 chunk +48 lines, -0 lines 0 comments Download
A chrome/browser/guestview/webview/plugin_permission_helper.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +113 lines, -0 lines 0 comments Download
M chrome/browser/guestview/webview/webview_constants.h View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/guestview/webview/webview_constants.cc View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/guestview/webview/webview_guest.h View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/guestview/webview/webview_guest.cc View 1 2 3 4 5 6 7 8 5 chunks +22 lines, -1 line 0 comments Download
A chrome/browser/guestview/webview/webview_permission_types.h View 1 2 3 4 5 6 7 1 chunk +15 lines, -0 lines 0 comments Download
M chrome/browser/plugins/plugin_info_message_filter.cc View 1 2 3 3 chunks +25 lines, -0 lines 0 comments Download
M chrome/chrome_browser.gypi View 1 2 3 4 5 6 7 2 chunks +4 lines, -0 lines 0 comments Download
M chrome/renderer/resources/extensions/web_view.js View 1 2 3 4 5 chunks +33 lines, -5 lines 0 comments Download
M chrome/renderer/resources/extensions/web_view_experimental.js View 1 2 3 4 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/test/data/extensions/platform_apps/web_view/shim/main.js View 1 2 2 chunks +26 lines, -0 lines 0 comments Download
M content/public/common/browser_plugin_permission_type.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +3 lines, -1 line 0 comments Download
M tools/metrics/actions/chromeactions.txt View 1 2 3 4 5 6 7 8 9 3 chunks +6 lines, -0 lines 0 comments Download

Messages

Total messages: 19 (0 generated)
sadrul
jam@ Please review the enum addition in content/public/ bauerb@ Please review the change in plugin_info_message_filter ...
7 years, 2 months ago (2013-09-25 23:39:59 UTC) #1
sadrul
Added a test.
7 years, 2 months ago (2013-09-26 02:27:13 UTC) #2
Bernhard Bauer
https://codereview.chromium.org/24576003/diff/16001/chrome/browser/plugins/plugin_info_message_filter.cc File chrome/browser/plugins/plugin_info_message_filter.cc (right): https://codereview.chromium.org/24576003/diff/16001/chrome/browser/plugins/plugin_info_message_filter.cc#newcode210 chrome/browser/plugins/plugin_info_message_filter.cc:210: ChromeViewHostMsg_GetPluginInfo_Status::kNPAPINotSupported; On Windows in Metro mode (see above) this ...
7 years, 2 months ago (2013-09-26 06:19:38 UTC) #3
sadrul
https://codereview.chromium.org/24576003/diff/16001/chrome/browser/plugins/plugin_info_message_filter.cc File chrome/browser/plugins/plugin_info_message_filter.cc (right): https://codereview.chromium.org/24576003/diff/16001/chrome/browser/plugins/plugin_info_message_filter.cc#newcode210 chrome/browser/plugins/plugin_info_message_filter.cc:210: ChromeViewHostMsg_GetPluginInfo_Status::kNPAPINotSupported; On 2013/09/26 06:19:39, Bernhard Bauer wrote: > On ...
7 years, 2 months ago (2013-09-26 06:43:23 UTC) #4
Bernhard Bauer
LGTM https://codereview.chromium.org/24576003/diff/16001/chrome/browser/plugins/plugin_info_message_filter.cc File chrome/browser/plugins/plugin_info_message_filter.cc (right): https://codereview.chromium.org/24576003/diff/16001/chrome/browser/plugins/plugin_info_message_filter.cc#newcode210 chrome/browser/plugins/plugin_info_message_filter.cc:210: ChromeViewHostMsg_GetPluginInfo_Status::kNPAPINotSupported; On 2013/09/26 06:43:23, sadrul wrote: > On ...
7 years, 2 months ago (2013-09-26 06:56:33 UTC) #5
sadrul
Thanks for the quick review! https://codereview.chromium.org/24576003/diff/16001/chrome/browser/plugins/plugin_info_message_filter.cc File chrome/browser/plugins/plugin_info_message_filter.cc (right): https://codereview.chromium.org/24576003/diff/16001/chrome/browser/plugins/plugin_info_message_filter.cc#newcode210 chrome/browser/plugins/plugin_info_message_filter.cc:210: ChromeViewHostMsg_GetPluginInfo_Status::kNPAPINotSupported; On 2013/09/26 06:56:33, ...
7 years, 2 months ago (2013-09-26 06:59:52 UTC) #6
Bernhard Bauer
https://codereview.chromium.org/24576003/diff/16001/chrome/browser/plugins/plugin_info_message_filter.cc File chrome/browser/plugins/plugin_info_message_filter.cc (right): https://codereview.chromium.org/24576003/diff/16001/chrome/browser/plugins/plugin_info_message_filter.cc#newcode210 chrome/browser/plugins/plugin_info_message_filter.cc:210: ChromeViewHostMsg_GetPluginInfo_Status::kNPAPINotSupported; On 2013/09/26 06:59:52, sadrul wrote: > On 2013/09/26 ...
7 years, 2 months ago (2013-09-26 08:39:09 UTC) #7
Fady Samuel
This looks really good. Just a couple of small things to address then I'm happy ...
7 years, 2 months ago (2013-09-26 12:53:31 UTC) #8
sadrul
https://codereview.chromium.org/24576003/diff/16001/chrome/browser/guestview/webview/plugin_permission_helper.cc File chrome/browser/guestview/webview/plugin_permission_helper.cc (right): https://codereview.chromium.org/24576003/diff/16001/chrome/browser/guestview/webview/plugin_permission_helper.cc#newcode48 chrome/browser/guestview/webview/plugin_permission_helper.cc:48: if (!webview) On 2013/09/26 12:53:32, Fady Samuel wrote: > ...
7 years, 2 months ago (2013-09-26 15:28:10 UTC) #9
sadrul
https://codereview.chromium.org/24576003/diff/16001/chrome/browser/plugins/plugin_info_message_filter.cc File chrome/browser/plugins/plugin_info_message_filter.cc (right): https://codereview.chromium.org/24576003/diff/16001/chrome/browser/plugins/plugin_info_message_filter.cc#newcode210 chrome/browser/plugins/plugin_info_message_filter.cc:210: ChromeViewHostMsg_GetPluginInfo_Status::kNPAPINotSupported; On 2013/09/26 08:39:09, Bernhard Bauer wrote: > On ...
7 years, 2 months ago (2013-09-26 15:35:25 UTC) #10
jam
https://codereview.chromium.org/24576003/diff/2/content/public/common/browser_plugin_permission_type.h File content/public/common/browser_plugin_permission_type.h (right): https://codereview.chromium.org/24576003/diff/2/content/public/common/browser_plugin_permission_type.h#newcode33 content/public/common/browser_plugin_permission_type.h:33: BROWSER_PLUGIN_PERMISSION_TYPE_LOAD_PLUGIN, if this isn't used in content, it shouldn't ...
7 years, 2 months ago (2013-09-26 18:20:05 UTC) #11
sadrul
https://codereview.chromium.org/24576003/diff/2/content/public/common/browser_plugin_permission_type.h File content/public/common/browser_plugin_permission_type.h (right): https://codereview.chromium.org/24576003/diff/2/content/public/common/browser_plugin_permission_type.h#newcode33 content/public/common/browser_plugin_permission_type.h:33: BROWSER_PLUGIN_PERMISSION_TYPE_LOAD_PLUGIN, On 2013/09/26 18:20:06, jam wrote: > if this ...
7 years, 2 months ago (2013-09-26 21:12:15 UTC) #12
Fady Samuel
LGTM once my comment is addressed. https://codereview.chromium.org/24576003/diff/60001/chrome/renderer/resources/extensions/web_view.js File chrome/renderer/resources/extensions/web_view.js (right): https://codereview.chromium.org/24576003/diff/60001/chrome/renderer/resources/extensions/web_view.js#newcode996 chrome/renderer/resources/extensions/web_view.js:996: var PERMISSIONS_DEFAULT_ALLOWED = ...
7 years, 2 months ago (2013-09-26 21:27:11 UTC) #13
sadrul
https://codereview.chromium.org/24576003/diff/60001/chrome/renderer/resources/extensions/web_view.js File chrome/renderer/resources/extensions/web_view.js (right): https://codereview.chromium.org/24576003/diff/60001/chrome/renderer/resources/extensions/web_view.js#newcode996 chrome/renderer/resources/extensions/web_view.js:996: var PERMISSIONS_DEFAULT_ALLOWED = ['loadplugin']; On 2013/09/26 21:27:12, Fady Samuel ...
7 years, 2 months ago (2013-09-26 21:51:33 UTC) #14
Fady Samuel
https://codereview.chromium.org/24576003/diff/65001/chrome/browser/guestview/webview/plugin_permission_helper.cc File chrome/browser/guestview/webview/plugin_permission_helper.cc (right): https://codereview.chromium.org/24576003/diff/65001/chrome/browser/guestview/webview/plugin_permission_helper.cc#newcode61 chrome/browser/guestview/webview/plugin_permission_helper.cc:61: base::DictionaryValue info; It would be nice to have an ...
7 years, 2 months ago (2013-09-27 13:04:08 UTC) #15
sadrul
https://codereview.chromium.org/24576003/diff/65001/chrome/browser/guestview/webview/plugin_permission_helper.cc File chrome/browser/guestview/webview/plugin_permission_helper.cc (right): https://codereview.chromium.org/24576003/diff/65001/chrome/browser/guestview/webview/plugin_permission_helper.cc#newcode61 chrome/browser/guestview/webview/plugin_permission_helper.cc:61: base::DictionaryValue info; On 2013/09/27 13:04:08, Fady Samuel wrote: > ...
7 years, 2 months ago (2013-09-27 14:17:39 UTC) #16
jam
lgtm with removing max https://codereview.chromium.org/24576003/diff/82001/content/public/common/browser_plugin_permission_type.h File content/public/common/browser_plugin_permission_type.h (right): https://codereview.chromium.org/24576003/diff/82001/content/public/common/browser_plugin_permission_type.h#newcode34 content/public/common/browser_plugin_permission_type.h:34: BROWSER_PLUGIN_PERMISSION_TYPE_MAX = you don't need ...
7 years, 2 months ago (2013-09-27 18:18:45 UTC) #17
sadrul
https://codereview.chromium.org/24576003/diff/82001/content/public/common/browser_plugin_permission_type.h File content/public/common/browser_plugin_permission_type.h (right): https://codereview.chromium.org/24576003/diff/82001/content/public/common/browser_plugin_permission_type.h#newcode34 content/public/common/browser_plugin_permission_type.h:34: BROWSER_PLUGIN_PERMISSION_TYPE_MAX = On 2013/09/27 18:18:45, jam wrote: > you ...
7 years, 2 months ago (2013-09-27 22:13:04 UTC) #18
sadrul
7 years, 2 months ago (2013-09-27 22:27:44 UTC) #19
Message was sent while issue was closed.
Committed patchset #12 manually as r225800 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698