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

Issue 1434433002: Pass distillability updates from renderer to browser (Closed)

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

Description

Pass distillability updates from renderer to browser The current distillability test does the following: - In WebContentsObserver, wait for didFinishLoad and didFailLoad events. (Was didFinishLoad and documentLoadedInFrame earlier. Read more on http://crbug.com/510254.) - In these events, send feature extraction JavaScript code to renderer. The problems are: - Mobile-friendliness detection might not be accurate because layout might not have been done in these WebContentsObserver events. - Executing JavaScript in an isolated world costs extra 8MB of memory. With the new mechanism added in this CL, the problems can be solved. - DidMeaningfulLayout guarantees layout is done, so mobile-friendliness hint would be accurate. - Features are extracted in native code (in http://crrev.com/1419033004/). The reader mode switch kReaderModeHeuristics is passed to the renderer process for it to use GetDistillerHeuristicsType(). BUG=509869, 525797 Committed: https://crrev.com/e556873497657ad7ce407109fa3a406fad6f61bf Cr-Commit-Position: refs/heads/master@{#359607}

Patch Set 1 #

Patch Set 2 : merge depend, and update interface #

Patch Set 3 : merge depend, and update interface again #

Total comments: 6

Patch Set 4 : address nyquist's comments #

Patch Set 5 : pass reader mode switches to the render process #

Patch Set 6 : merge master #

Patch Set 7 : fix merging #

Patch Set 8 : fix gn deps #

Total comments: 2

Patch Set 9 : address tsepez's comment #

Unified diffs Side-by-side diffs Delta from patch set Stats (+330 lines, -6 lines) Patch
M chrome/browser/chrome_content_browser_client.cc View 1 2 3 4 5 2 chunks +2 lines, -0 lines 0 comments Download
M components/dom_distiller.gypi View 5 chunks +28 lines, -0 lines 0 comments Download
M components/dom_distiller/content/BUILD.gn View 1 2 3 4 5 6 7 5 chunks +25 lines, -0 lines 0 comments Download
M components/dom_distiller/content/DEPS View 1 chunk +1 line, -0 lines 0 comments Download
A components/dom_distiller/content/browser/distillability_driver.h View 1 2 3 1 chunk +44 lines, -0 lines 0 comments Download
A components/dom_distiller/content/browser/distillability_driver.cc View 1 2 3 1 chunk +58 lines, -0 lines 0 comments Download
A components/dom_distiller/content/common/distiller_messages.h View 1 2 3 4 5 6 7 8 1 chunk +21 lines, -0 lines 0 comments Download
A + components/dom_distiller/content/common/distiller_messages.cc View 1 chunk +6 lines, -6 lines 0 comments Download
A components/dom_distiller/content/renderer/distillability_agent.h View 1 chunk +24 lines, -0 lines 0 comments Download
A components/dom_distiller/content/renderer/distillability_agent.cc View 1 2 3 4 5 6 1 chunk +120 lines, -0 lines 0 comments Download
M ipc/ipc_message_start.h View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 51 (25 generated)
wychen
PTAL
5 years, 1 month ago (2015-11-04 09:25:08 UTC) #2
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1434433002/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1434433002/1
5 years, 1 month ago (2015-11-04 19:18:53 UTC) #4
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: chromium_presubmit on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/115582)
5 years, 1 month ago (2015-11-04 19:44:25 UTC) #6
wychen
+palmer@. Could you take a look at the IPC file? Thanks!
5 years, 1 month ago (2015-11-05 02:22:23 UTC) #9
blundell
https://codereview.chromium.org/1434433002/diff/60001/components/dom_distiller/content/browser/distillability_driver.h File components/dom_distiller/content/browser/distillability_driver.h (right): https://codereview.chromium.org/1434433002/diff/60001/components/dom_distiller/content/browser/distillability_driver.h#newcode15 components/dom_distiller/content/browser/distillability_driver.h:15: class WebContentsDistillabilityDriver drive-by nit: this should be named web_contents_dom_distillability_driver.
5 years, 1 month ago (2015-11-05 09:42:41 UTC) #11
mdjones
lgtm with name issue resolved.
5 years, 1 month ago (2015-11-10 16:53:42 UTC) #12
palmer
lgtm
5 years, 1 month ago (2015-11-10 19:49:48 UTC) #13
wychen
Tommy, could you also take a look? Thanks!
5 years, 1 month ago (2015-11-11 21:34:43 UTC) #15
nyquist
lgtm https://codereview.chromium.org/1434433002/diff/60001/components/dom_distiller/content/renderer/distillability_agent.cc File components/dom_distiller/content/renderer/distillability_agent.cc (right): https://codereview.chromium.org/1434433002/diff/60001/components/dom_distiller/content/renderer/distillability_agent.cc#newcode31 components/dom_distiller/content/renderer/distillability_agent.cc:31: bool needToUpdate(bool is_loaded) { Nit: NeedToUpdate (and IsLast ...
5 years, 1 month ago (2015-11-11 21:53:45 UTC) #16
nyquist
Also; could you expand the CL description? Maybe try to answer these questions: - How ...
5 years, 1 month ago (2015-11-11 22:24:26 UTC) #17
wychen
https://codereview.chromium.org/1434433002/diff/60001/components/dom_distiller/content/browser/distillability_driver.h File components/dom_distiller/content/browser/distillability_driver.h (right): https://codereview.chromium.org/1434433002/diff/60001/components/dom_distiller/content/browser/distillability_driver.h#newcode15 components/dom_distiller/content/browser/distillability_driver.h:15: class WebContentsDistillabilityDriver On 2015/11/05 09:42:41, blundell wrote: > drive-by ...
5 years, 1 month ago (2015-11-12 04:59:45 UTC) #19
Lei Zhang
chrome/ lgtm nit: In the CL desc, "render process" -> "renderer process"
5 years, 1 month ago (2015-11-12 23:10:50 UTC) #22
wychen
On 2015/11/12 23:10:50, Lei Zhang wrote: > chrome/ lgtm > > nit: In the CL ...
5 years, 1 month ago (2015-11-12 23:20:38 UTC) #24
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1434433002/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1434433002/100001
5 years, 1 month ago (2015-11-13 08:06:53 UTC) #28
commit-bot: I haz the power
Try jobs failed on following builders: ios_dbg_simulator_ninja on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios_dbg_simulator_ninja/builds/94005) mac_chromium_compile_dbg_ng on tryserver.chromium.mac (JOB_FAILED, ...
5 years, 1 month ago (2015-11-13 08:08:29 UTC) #30
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1434433002/180001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1434433002/180001
5 years, 1 month ago (2015-11-13 09:18:50 UTC) #35
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/118262)
5 years, 1 month ago (2015-11-13 09:26:27 UTC) #37
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1434433002/200001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1434433002/200001
5 years, 1 month ago (2015-11-13 09:42:35 UTC) #39
wychen
+tsepez@, could you take a look at components/dom_distiller/content/DEPS for adding +ipc? Thanks!
5 years, 1 month ago (2015-11-13 09:48:37 UTC) #41
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: chromium_presubmit on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/118270)
5 years, 1 month ago (2015-11-13 09:50:03 UTC) #43
Tom Sepez
DEPS lgtm.
5 years, 1 month ago (2015-11-13 16:59:41 UTC) #44
Tom Sepez
https://codereview.chromium.org/1434433002/diff/200001/components/dom_distiller/content/common/distiller_messages.h File components/dom_distiller/content/common/distiller_messages.h (right): https://codereview.chromium.org/1434433002/diff/200001/components/dom_distiller/content/common/distiller_messages.h#newcode19 components/dom_distiller/content/common/distiller_messages.h:19: IPC_MESSAGE_ROUTED2(FrameHostMsg_Distillability, bool, bool) nit: add comment explaining what each ...
5 years, 1 month ago (2015-11-13 17:00:44 UTC) #45
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1434433002/220001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1434433002/220001
5 years, 1 month ago (2015-11-13 18:04:04 UTC) #48
wychen
https://codereview.chromium.org/1434433002/diff/200001/components/dom_distiller/content/common/distiller_messages.h File components/dom_distiller/content/common/distiller_messages.h (right): https://codereview.chromium.org/1434433002/diff/200001/components/dom_distiller/content/common/distiller_messages.h#newcode19 components/dom_distiller/content/common/distiller_messages.h:19: IPC_MESSAGE_ROUTED2(FrameHostMsg_Distillability, bool, bool) On 2015/11/13 17:00:44, Tom Sepez wrote: ...
5 years, 1 month ago (2015-11-13 18:04:56 UTC) #49
commit-bot: I haz the power
Committed patchset #9 (id:220001)
5 years, 1 month ago (2015-11-13 20:17:11 UTC) #50
commit-bot: I haz the power
5 years, 1 month ago (2015-11-13 20:18:26 UTC) #51
Message was sent while issue was closed.
Patchset 9 (id:??) landed as
https://crrev.com/e556873497657ad7ce407109fa3a406fad6f61bf
Cr-Commit-Position: refs/heads/master@{#359607}

Powered by Google App Engine
This is Rietveld 408576698