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

Issue 1497623002: Plugin Power Saver: Improve Poster behavior for essential plugins. (Closed)

Created:
5 years ago by tommycli
Modified:
5 years ago
CC:
chromium-reviews, mkwst+moarreviews-renderer_chromium.org, darin-cc_chromium.org, jam, mlamouri+watch-content_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Plugin Power Saver: Improve Poster behavior for essential plugins. This patch does two things: 1) Early exit plugin placeholder if the poster-specified plugin is same-origin or whitelisted-origin. The placeholder is never created. 2) Fix bug that made the poster geometry recheck flaky. This fixes one bug, but there may be more. The geometry recheck logic is super janky. BUG=560590 Committed: https://crrev.com/fa5a32e29048ba0be1cbed8221fb74b7731dc55e Cr-Commit-Position: refs/heads/master@{#364781}

Patch Set 1 #

Total comments: 22

Patch Set 2 : #

Patch Set 3 : #

Patch Set 4 : #

Total comments: 12

Patch Set 5 : #

Total comments: 6

Patch Set 6 : #

Total comments: 4

Patch Set 7 : #

Total comments: 4

Patch Set 8 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+395 lines, -345 lines) Patch
M chrome/browser/plugins/plugin_power_saver_browsertest.cc View 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/chrome_renderer.gypi View 1 2 3 4 5 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/renderer/chrome_content_renderer_client.cc View 1 2 3 4 5 5 chunks +20 lines, -99 lines 0 comments Download
M chrome/renderer/plugins/chrome_plugin_placeholder.h View 1 2 3 4 2 chunks +2 lines, -18 lines 0 comments Download
M chrome/renderer/plugins/chrome_plugin_placeholder.cc View 1 2 3 4 3 chunks +14 lines, -8 lines 0 comments Download
M chrome/renderer/plugins/plugin_preroller.cc View 1 2 3 4 2 chunks +6 lines, -5 lines 0 comments Download
A chrome/renderer/plugins/power_saver_info.h View 1 2 3 4 1 chunk +50 lines, -0 lines 0 comments Download
A chrome/renderer/plugins/power_saver_info.cc View 1 2 3 4 5 6 7 1 chunk +124 lines, -0 lines 0 comments Download
M components/plugins/renderer/loadable_plugin_placeholder.cc View 1 2 3 4 2 chunks +12 lines, -5 lines 0 comments Download
M content/public/renderer/render_frame.h View 1 2 3 4 5 6 7 4 chunks +25 lines, -10 lines 0 comments Download
M content/renderer/pepper/plugin_instance_throttler_impl.cc View 1 2 1 chunk +6 lines, -7 lines 0 comments Download
M content/renderer/pepper/plugin_power_saver_helper.h View 1 2 3 chunks +9 lines, -5 lines 0 comments Download
M content/renderer/pepper/plugin_power_saver_helper.cc View 1 2 2 chunks +16 lines, -20 lines 0 comments Download
M content/renderer/pepper/plugin_power_saver_helper_browsertest.cc View 1 2 3 chunks +18 lines, -89 lines 0 comments Download
M content/renderer/peripheral_content_heuristic.h View 1 2 2 chunks +10 lines, -18 lines 0 comments Download
M content/renderer/peripheral_content_heuristic.cc View 1 2 2 chunks +20 lines, -14 lines 0 comments Download
M content/renderer/peripheral_content_heuristic_unittest.cc View 1 2 2 chunks +48 lines, -35 lines 0 comments Download
M content/renderer/render_frame_impl.h View 1 2 3 4 5 1 chunk +4 lines, -5 lines 0 comments Download
M content/renderer/render_frame_impl.cc View 1 2 3 4 5 1 chunk +5 lines, -7 lines 0 comments Download

Messages

Total messages: 28 (4 generated)
tommycli
groby: PTAL. This patch (purportedly) fixes the essential plugin poster issues uncovered by the jwplayer ...
5 years ago (2015-12-03 00:33:29 UTC) #2
tommycli
groby: ping, thanks!
5 years ago (2015-12-04 20:00:52 UTC) #3
groby-ooo-7-16
https://codereview.chromium.org/1497623002/diff/1/chrome/renderer/chrome_content_renderer_client.cc File chrome/renderer/chrome_content_renderer_client.cc (right): https://codereview.chromium.org/1497623002/diff/1/chrome/renderer/chrome_content_renderer_client.cc#newcode827 chrome/renderer/chrome_content_renderer_client.cc:827: power_saver_enabled && render_frame->IsHidden(); Don't we need to fix up ...
5 years ago (2015-12-04 22:06:56 UTC) #4
tommycli
groby: Hey - I refactored some stuff based on your feedback. Thanks! https://codereview.chromium.org/1497623002/diff/1/chrome/renderer/chrome_content_renderer_client.cc File chrome/renderer/chrome_content_renderer_client.cc ...
5 years ago (2015-12-07 22:06:18 UTC) #5
groby-ooo-7-16
https://codereview.chromium.org/1497623002/diff/1/chrome/renderer/chrome_content_renderer_client.cc File chrome/renderer/chrome_content_renderer_client.cc (right): https://codereview.chromium.org/1497623002/diff/1/chrome/renderer/chrome_content_renderer_client.cc#newcode827 chrome/renderer/chrome_content_renderer_client.cc:827: power_saver_enabled && render_frame->IsHidden(); On 2015/12/07 22:06:18, tommycli wrote: > ...
5 years ago (2015-12-07 22:16:04 UTC) #6
tommycli
groby: see below. thanks! https://codereview.chromium.org/1497623002/diff/1/chrome/renderer/chrome_content_renderer_client.cc File chrome/renderer/chrome_content_renderer_client.cc (right): https://codereview.chromium.org/1497623002/diff/1/chrome/renderer/chrome_content_renderer_client.cc#newcode827 chrome/renderer/chrome_content_renderer_client.cc:827: power_saver_enabled && render_frame->IsHidden(); On 2015/12/07 ...
5 years ago (2015-12-07 22:22:13 UTC) #7
tommycli
groby: ping thanks On 2015/12/07 22:22:13, tommycli wrote: > groby: see below. thanks! > > ...
5 years ago (2015-12-08 23:31:17 UTC) #8
groby-ooo-7-16
Outside of various yaks, this looks good to me - but you might want to ...
5 years ago (2015-12-09 02:17:15 UTC) #9
tommycli
groby: addressed your comments below, thanks! https://codereview.chromium.org/1497623002/diff/60001/chrome/renderer/chrome_content_renderer_client.cc File chrome/renderer/chrome_content_renderer_client.cc (right): https://codereview.chromium.org/1497623002/diff/60001/chrome/renderer/chrome_content_renderer_client.cc#newcode315 chrome/renderer/chrome_content_renderer_client.cc:315: PowerSaverInfo GetPowerSaverInfo( On ...
5 years ago (2015-12-09 23:25:45 UTC) #10
tommycli
piman: May I have a content/ review? thestig: May I have a chrome/ review? Thanks!
5 years ago (2015-12-09 23:27:15 UTC) #12
Lei Zhang
Just to confirm, the chrome/ sade is all refactoring, with no behavior changes, right? Did ...
5 years ago (2015-12-10 01:01:33 UTC) #13
tommycli
thestig: thanks! The behavior change is on line 104 here: https://codereview.chromium.org/1497623002/diff/100001/chrome/renderer/plugins/power_saver_info.cc If the content is ...
5 years ago (2015-12-10 23:11:16 UTC) #14
Lei Zhang
https://codereview.chromium.org/1497623002/diff/100001/content/public/renderer/render_frame.h File content/public/renderer/render_frame.h (right): https://codereview.chromium.org/1497623002/diff/100001/content/public/renderer/render_frame.h#newcode62 content/public/renderer/render_frame.h:62: CONTENT_STATUS_PERIPHERAL = 0, Add some comments to describe what ...
5 years ago (2015-12-10 23:22:56 UTC) #15
tommycli
thestig: thanks! https://codereview.chromium.org/1497623002/diff/100001/content/public/renderer/render_frame.h File content/public/renderer/render_frame.h (right): https://codereview.chromium.org/1497623002/diff/100001/content/public/renderer/render_frame.h#newcode62 content/public/renderer/render_frame.h:62: CONTENT_STATUS_PERIPHERAL = 0, On 2015/12/10 23:22:56, Lei ...
5 years ago (2015-12-10 23:30:32 UTC) #16
Lei Zhang
https://codereview.chromium.org/1497623002/diff/120001/chrome/renderer/plugins/power_saver_info.cc File chrome/renderer/plugins/power_saver_info.cc (right): https://codereview.chromium.org/1497623002/diff/120001/chrome/renderer/plugins/power_saver_info.cc#newcode104 chrome/renderer/plugins/power_saver_info.cc:104: if (status == content::RenderFrame::CONTENT_STATUS_ESSENTIAL_SAME_ORIGIN || So why only these ...
5 years ago (2015-12-11 00:07:34 UTC) #17
Lei Zhang
Channeling mark@ https://codereview.chromium.org/1497623002/diff/120001/content/public/renderer/render_frame.h File content/public/renderer/render_frame.h (right): https://codereview.chromium.org/1497623002/diff/120001/content/public/renderer/render_frame.h#newcode72 content/public/renderer/render_frame.h:72: // Content is essential because we can't ...
5 years ago (2015-12-11 00:11:42 UTC) #18
tommycli
thestig: See if these new comments float your boat a bit better. Thanks. https://codereview.chromium.org/1497623002/diff/120001/chrome/renderer/plugins/power_saver_info.cc File ...
5 years ago (2015-12-11 00:22:11 UTC) #19
Lei Zhang
lgtm
5 years ago (2015-12-11 01:38:38 UTC) #20
piman
lgtm
5 years ago (2015-12-11 06:57:58 UTC) #21
tommycli
thank you all!
5 years ago (2015-12-11 18:26:03 UTC) #22
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1497623002/140001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1497623002/140001
5 years ago (2015-12-11 18:33:57 UTC) #24
commit-bot: I haz the power
Committed patchset #8 (id:140001)
5 years ago (2015-12-11 20:06:42 UTC) #25
commit-bot: I haz the power
Patchset 8 (id:??) landed as https://crrev.com/fa5a32e29048ba0be1cbed8221fb74b7731dc55e Cr-Commit-Position: refs/heads/master@{#364781}
5 years ago (2015-12-11 20:08:15 UTC) #27
jam
5 years ago (2015-12-14 19:17:14 UTC) #28
Message was sent while issue was closed.
A revert of this CL (patchset #8 id:140001) has been created in
https://codereview.chromium.org/1528653002/ by jam@chromium.org.

The reason for reverting is: Causing lots of flakiness in
PrerenderBrowserTest.PrerenderContentSettingDetect

BUG=569198.

Powered by Google App Engine
This is Rietveld 408576698