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

Issue 680193002: Plugin Power Saver: Implement size-based heuristic for peripheral content. (Closed)

Created:
6 years, 1 month ago by tommycli
Modified:
6 years, 1 month ago
CC:
chromium-reviews, mkwst+moarreviews-renderer_chromium.org, darin-cc_chromium.org, nasko+codewatch_chromium.org, jam, creis+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

Plugin Power Saver: Implement size-based heuristic for peripheral content. Restricts Plugin Power Saver to small content that's cross-origin. Also handles the temporary whitelist for cross-origin as described by thestig@ in the design doc. Design doc: http://goo.gl/iDix3p BUG=403800 Committed: https://crrev.com/eb25b2a88b6bb848a3ebfe07d3737511ebf8685f Cr-Commit-Position: refs/heads/master@{#302466}

Patch Set 1 #

Patch Set 2 : #

Total comments: 22

Patch Set 3 : #

Patch Set 4 : #

Patch Set 5 : fix shutdown crash #

Total comments: 26

Patch Set 6 : address thestig comments. #

Patch Set 7 : one more thing to address comment. #

Patch Set 8 : run git cl format #

Patch Set 9 : change mechanism to look at top level navigation instead of renderframe lifecycle #

Total comments: 2

Patch Set 10 : make ifdefs a bit more consistent #

Patch Set 11 : #

Patch Set 12 : #

Patch Set 13 : #

Patch Set 14 : #

Patch Set 15 : #

Patch Set 16 : #

Patch Set 17 : #

Patch Set 18 : reformat and add test #

Patch Set 19 : bypass power saver for unittests #

Patch Set 20 : spinoff ifdef changes into separate cl #

Total comments: 14

Patch Set 21 : #

Patch Set 22 : make into a webcontentsobserver #

Patch Set 23 : reorder msgs #

Patch Set 24 : #

Total comments: 6

Patch Set 25 : #

Patch Set 26 : rebase #

Patch Set 27 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+517 lines, -34 lines) Patch
A content/browser/plugin_content_origin_whitelist.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 1 chunk +51 lines, -0 lines 0 comments Download
A content/browser/plugin_content_origin_whitelist.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 1 chunk +61 lines, -0 lines 0 comments Download
M content/browser/web_contents/web_contents_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 2 chunks +6 lines, -0 lines 0 comments Download
M content/browser/web_contents/web_contents_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 2 chunks +6 lines, -0 lines 0 comments Download
M content/common/frame_messages.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 2 chunks +13 lines, -0 lines 0 comments Download
M content/content_browser.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 1 chunk +2 lines, -0 lines 0 comments Download
M content/content_renderer.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 1 chunk +2 lines, -0 lines 0 comments Download
M content/content_tests.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +1 line, -0 lines 0 comments Download
M content/renderer/pepper/pepper_plugin_instance_impl.h View 1 2 1 chunk +1 line, -3 lines 0 comments Download
M content/renderer/pepper/pepper_plugin_instance_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 6 chunks +34 lines, -31 lines 0 comments Download
A content/renderer/pepper/plugin_power_saver_helper.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +77 lines, -0 lines 0 comments Download
A content/renderer/pepper/plugin_power_saver_helper.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 1 chunk +128 lines, -0 lines 0 comments Download
A content/renderer/pepper/plugin_power_saver_helper_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +116 lines, -0 lines 0 comments Download
M content/renderer/render_frame_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 3 chunks +5 lines, -0 lines 0 comments Download
M content/renderer/render_frame_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 4 chunks +14 lines, -0 lines 0 comments Download

Messages

Total messages: 26 (4 generated)
tommycli
groby, thestig: Let me know what you think https://codereview.chromium.org/680193002/diff/20001/content/renderer/pepper/pepper_plugin_instance_impl.cc File content/renderer/pepper/pepper_plugin_instance_impl.cc (right): https://codereview.chromium.org/680193002/diff/20001/content/renderer/pepper/pepper_plugin_instance_impl.cc#newcode2064 content/renderer/pepper/pepper_plugin_instance_impl.cc:2064: bool ...
6 years, 1 month ago (2014-10-27 23:35:53 UTC) #2
groby-ooo-7-16
Implementation detail feedback inline, but: It bugs me that we round-trip to the browser process ...
6 years, 1 month ago (2014-10-28 00:39:12 UTC) #3
Lei Zhang
https://codereview.chromium.org/680193002/diff/20001/content/browser/web_contents/web_contents_impl.cc File content/browser/web_contents/web_contents_impl.cc (right): https://codereview.chromium.org/680193002/diff/20001/content/browser/web_contents/web_contents_impl.cc#newcode2910 content/browser/web_contents/web_contents_impl.cc:2910: plugin_content_origin_whitelist_[render_frame_message_source_].insert( On 2014/10/28 00:39:12, groby wrote: > Why is ...
6 years, 1 month ago (2014-10-28 02:16:23 UTC) #4
tommycli
thestig / groby: addressed your comments below. I've revamped the system per Rachel's suggestions of ...
6 years, 1 month ago (2014-10-28 22:18:08 UTC) #5
Lei Zhang
https://codereview.chromium.org/680193002/diff/80001/content/browser/web_contents/web_contents_impl.cc File content/browser/web_contents/web_contents_impl.cc (right): https://codereview.chromium.org/680193002/diff/80001/content/browser/web_contents/web_contents_impl.cc#newcode3357 content/browser/web_contents/web_contents_impl.cc:3357: ClearPowerSaveBlockers(render_frame_host); This was fine before. Leave it alone? https://codereview.chromium.org/680193002/diff/80001/content/browser/web_contents/web_contents_impl.cc#newcode3361 ...
6 years, 1 month ago (2014-10-29 09:26:48 UTC) #6
tommycli
thestig: Addressed your comments. I think this handles the same-origin navigation correctly now. https://codereview.chromium.org/680193002/diff/80001/content/browser/web_contents/web_contents_impl.cc File ...
6 years, 1 month ago (2014-10-29 19:59:23 UTC) #7
tommycli
creis: Mind taking a look? Esp. at the RenderFrame and WebContents parts. The tricky part ...
6 years, 1 month ago (2014-10-29 20:53:11 UTC) #9
Lei Zhang
Looking good. You need to find a content reviewer though. I would add some tests ...
6 years, 1 month ago (2014-10-29 22:31:23 UTC) #10
tommycli
thestig: sounds good. I'll work on a browsertest. Also: Seems like once you put one ...
6 years, 1 month ago (2014-10-29 22:53:23 UTC) #11
tommycli
thestig: Added browsertest and spunoff the ENABLE_PLUGINS changes to a separate CL.
6 years, 1 month ago (2014-10-30 21:14:24 UTC) #12
Lei Zhang
https://codereview.chromium.org/680193002/diff/350001/content/renderer/pepper/plugin_power_saver_helper_browsertest.cc File content/renderer/pepper/plugin_power_saver_helper_browsertest.cc (right): https://codereview.chromium.org/680193002/diff/350001/content/renderer/pepper/plugin_power_saver_helper_browsertest.cc#newcode31 content/renderer/pepper/plugin_power_saver_helper_browsertest.cc:31: virtual void SetUp() { no virtual, override at the ...
6 years, 1 month ago (2014-10-30 21:41:58 UTC) #13
tommycli
https://codereview.chromium.org/680193002/diff/350001/content/renderer/pepper/plugin_power_saver_helper_browsertest.cc File content/renderer/pepper/plugin_power_saver_helper_browsertest.cc (right): https://codereview.chromium.org/680193002/diff/350001/content/renderer/pepper/plugin_power_saver_helper_browsertest.cc#newcode31 content/renderer/pepper/plugin_power_saver_helper_browsertest.cc:31: virtual void SetUp() { On 2014/10/30 21:41:58, Lei Zhang ...
6 years, 1 month ago (2014-10-30 21:46:22 UTC) #14
Charlie Reis
Nice-- I like the use of tab-level browser state, frame-level renderer state, and SendToAllFrames. That ...
6 years, 1 month ago (2014-10-30 22:13:16 UTC) #15
tommycli
creis: I split it off into a WebContentsObserver. Not sure if I put it in ...
6 years, 1 month ago (2014-10-31 00:01:22 UTC) #16
Charlie Reis
https://codereview.chromium.org/680193002/diff/430001/content/browser/browser_plugin/browser_plugin_content_origin_whitelist.h File content/browser/browser_plugin/browser_plugin_content_origin_whitelist.h (right): https://codereview.chromium.org/680193002/diff/430001/content/browser/browser_plugin/browser_plugin_content_origin_whitelist.h#newcode5 content/browser/browser_plugin/browser_plugin_content_origin_whitelist.h:5: #ifndef CONTENT_BROWSER_BROWSER_PLUGIN_BROWSER_PLUGIN_CONTENT_ORIGIN_WHITELIST_H_ BrowserPlugin isn't what you're looking for-- that's ...
6 years, 1 month ago (2014-10-31 16:33:40 UTC) #17
tommycli
creis: Thanks. I moved the file. tsepez: May i have a security review for frame_messages.h? ...
6 years, 1 month ago (2014-10-31 18:32:29 UTC) #19
Charlie Reis
Thanks, LGTM.
6 years, 1 month ago (2014-10-31 18:58:31 UTC) #20
Tom Sepez
lgtm
6 years, 1 month ago (2014-11-03 19:02:36 UTC) #21
tommycli
all: thank you!
6 years, 1 month ago (2014-11-03 19:09:20 UTC) #22
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/680193002/490001
6 years, 1 month ago (2014-11-03 19:10:18 UTC) #24
commit-bot: I haz the power
Committed patchset #27 (id:490001)
6 years, 1 month ago (2014-11-03 19:45:22 UTC) #25
commit-bot: I haz the power
6 years, 1 month ago (2014-11-03 19:46:06 UTC) #26
Message was sent while issue was closed.
Patchset 27 (id:??) landed as
https://crrev.com/eb25b2a88b6bb848a3ebfe07d3737511ebf8685f
Cr-Commit-Position: refs/heads/master@{#302466}

Powered by Google App Engine
This is Rietveld 408576698