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

Issue 1338603002: Implement a site engagement score based on time-on-site. (Closed)

Created:
5 years, 3 months ago by dominickn
Modified:
5 years, 2 months ago
CC:
chromium-reviews, chrome-apps-syd-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Implement a site engagement score based on time-on-site. Time spent on site is an important indicator of how important an origin is to a user. This CL detects time on site by registering callbacks to handle user input, using any mouse or keypress events as a proxy for a user spending time on the site. Input events are checked for at regular intervals, with site engagement updated if input has been present in each interval. BUG=464234 Committed: https://crrev.com/f3226a4f280b20eb00024d724b9e70ec1edc2e33 Cr-Commit-Position: refs/heads/master@{#351465} Committed: https://crrev.com/5eceefb54758e691c7857c4feff111f7db33ef6d Cr-Commit-Position: refs/heads/master@{#351704}

Patch Set 1 #

Patch Set 2 : Compile unit tests #

Total comments: 16

Patch Set 3 : Remove outdated test #

Patch Set 4 : Addressing reviewer feedback #

Patch Set 5 : Removing references to navigation #

Patch Set 6 : More web contents validity checking #

Total comments: 10

Patch Set 7 : Addressing reviewer feedback #

Patch Set 8 : Adding browser test. Refactoring to use double scores #

Patch Set 9 : Factoring input checking into a new class #

Patch Set 10 : Fix partial staging issue #

Patch Set 11 : Restore unit tests to test navigations #

Total comments: 29

Patch Set 12 : Moving tests to interactive ui, adding user input tests #

Patch Set 13 : Fixing rebase issue #

Patch Set 14 : Update types used in browser test #

Total comments: 17

Patch Set 15 : Addressing reviewer feedback #

Total comments: 4

Patch Set 16 : Checking callbacks added, reducing mouse events listened for #

Patch Set 17 : Adding tracing, fixing indentation #

Total comments: 12

Patch Set 18 : Rebase #

Patch Set 19 : Adding a TestSiteEngagementHelper #

Total comments: 2

Patch Set 20 : Removing observer interface #

Total comments: 2

Patch Set 21 : Remove flaky input simulation tests and combine callback and timer testing #

Unified diffs Side-by-side diffs Delta from patch set Stats (+628 lines, -97 lines) Patch
M chrome/browser/engagement/site_engagement_eviction_policy_unittest.cc View 1 2 3 4 5 6 7 1 chunk +7 lines, -5 lines 0 comments Download
M chrome/browser/engagement/site_engagement_helper.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 2 chunks +72 lines, -4 lines 0 comments Download
M chrome/browser/engagement/site_engagement_helper.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 2 chunks +161 lines, -16 lines 0 comments Download
M chrome/browser/engagement/site_engagement_service.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 4 chunks +20 lines, -8 lines 0 comments Download
M chrome/browser/engagement/site_engagement_service.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 5 chunks +33 lines, -23 lines 0 comments Download
A chrome/browser/engagement/site_engagement_service_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 +261 lines, -0 lines 0 comments Download
M chrome/browser/engagement/site_engagement_service_unittest.cc View 1 2 3 4 5 6 7 8 9 10 14 chunks +73 lines, -41 lines 0 comments Download
M chrome/chrome_tests.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +1 line, -0 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 71 (17 generated)
dominickn
PTAL, thanks!
5 years, 3 months ago (2015-09-11 03:19:26 UTC) #2
dominickn
On 2015/09/11 03:19:26, dominickn wrote: > PTAL, thanks! FYI: if you're okay with this design, ...
5 years, 3 months ago (2015-09-11 03:54:18 UTC) #3
calamity
Also, all references to navigation should be changed (particularly in the test file). https://codereview.chromium.org/1338603002/diff/20001/chrome/browser/engagement/site_engagement_helper.cc File ...
5 years, 3 months ago (2015-09-11 07:19:56 UTC) #4
dominickn
Thanks! https://codereview.chromium.org/1338603002/diff/20001/chrome/browser/engagement/site_engagement_helper.cc File chrome/browser/engagement/site_engagement_helper.cc (right): https://codereview.chromium.org/1338603002/diff/20001/chrome/browser/engagement/site_engagement_helper.cc#newcode41 chrome/browser/engagement/site_engagement_helper.cc:41: base::Unretained(this)); On 2015/09/11 07:19:56, calamity wrote: > Probably ...
5 years, 3 months ago (2015-09-11 08:03:38 UTC) #5
calamity
https://codereview.chromium.org/1338603002/diff/20001/chrome/browser/engagement/site_engagement_helper.cc File chrome/browser/engagement/site_engagement_helper.cc (right): https://codereview.chromium.org/1338603002/diff/20001/chrome/browser/engagement/site_engagement_helper.cc#newcode41 chrome/browser/engagement/site_engagement_helper.cc:41: base::Unretained(this)); On 2015/09/11 08:03:37, dominickn wrote: > On 2015/09/11 ...
5 years, 3 months ago (2015-09-14 02:08:34 UTC) #6
dominickn
As discussed offline, this complicates the callbacks a bit, and it's probably sufficient to check ...
5 years, 3 months ago (2015-09-14 06:56:01 UTC) #7
calamity
lgtm
5 years, 3 months ago (2015-09-14 06:58:24 UTC) #9
dominickn
Thanks! @benwells: PTAL. Still to work out are how many engagement points should be awarded ...
5 years, 3 months ago (2015-09-14 07:03:58 UTC) #10
benwells
https://codereview.chromium.org/1338603002/diff/100001/chrome/browser/engagement/site_engagement_helper.cc File chrome/browser/engagement/site_engagement_helper.cc (left): https://codereview.chromium.org/1338603002/diff/100001/chrome/browser/engagement/site_engagement_helper.cc#oldcode45 chrome/browser/engagement/site_engagement_helper.cc:45: service->HandleNavigation(url); Why is this now removed? I am guessing ...
5 years, 3 months ago (2015-09-16 00:23:32 UTC) #11
benwells
https://codereview.chromium.org/1338603002/diff/100001/chrome/browser/engagement/site_engagement_helper.cc File chrome/browser/engagement/site_engagement_helper.cc (left): https://codereview.chromium.org/1338603002/diff/100001/chrome/browser/engagement/site_engagement_helper.cc#oldcode45 chrome/browser/engagement/site_engagement_helper.cc:45: service->HandleNavigation(url); Why is this now removed? I am guessing ...
5 years, 3 months ago (2015-09-16 00:23:32 UTC) #12
dominickn
PTAL. Still working on a full test for this - the timing aspect of it ...
5 years, 3 months ago (2015-09-18 06:05:28 UTC) #13
dominickn
PTAL - now with a browser test. Instead of testing the timing aspect, I'm manually ...
5 years, 3 months ago (2015-09-21 03:04:19 UTC) #14
dominickn
Input tracking is now factored out into a separate inner class in site engagement helper.
5 years, 3 months ago (2015-09-22 01:30:53 UTC) #15
calamity
https://codereview.chromium.org/1338603002/diff/200001/chrome/browser/engagement/site_engagement_helper.cc File chrome/browser/engagement/site_engagement_helper.cc (right): https://codereview.chromium.org/1338603002/diff/200001/chrome/browser/engagement/site_engagement_helper.cc#newcode17 chrome/browser/engagement/site_engagement_helper.cc:17: double gSecondsBetweenUserInputCheck = 10; The more common style seems ...
5 years, 3 months ago (2015-09-22 02:57:21 UTC) #16
dominickn
PTAL - now with additional interactive ui test checking user input and timer triggering. https://codereview.chromium.org/1338603002/diff/200001/chrome/browser/engagement/site_engagement_helper.cc ...
5 years, 3 months ago (2015-09-23 00:06:44 UTC) #17
benwells
I haven't done a full review yet, but fwiw I like the new structure.
5 years, 3 months ago (2015-09-23 04:01:40 UTC) #18
calamity
https://codereview.chromium.org/1338603002/diff/200001/chrome/browser/engagement/site_engagement_helper.cc File chrome/browser/engagement/site_engagement_helper.cc (right): https://codereview.chromium.org/1338603002/diff/200001/chrome/browser/engagement/site_engagement_helper.cc#newcode46 chrome/browser/engagement/site_engagement_helper.cc:46: helper_->RecordUserInput(); On 2015/09/23 00:06:44, dominickn wrote: > On 2015/09/22 ...
5 years, 3 months ago (2015-09-24 03:50:53 UTC) #19
dominickn
https://codereview.chromium.org/1338603002/diff/260001/chrome/browser/engagement/site_engagement_helper.h File chrome/browser/engagement/site_engagement_helper.h (right): https://codereview.chromium.org/1338603002/diff/260001/chrome/browser/engagement/site_engagement_helper.h#newcode71 chrome/browser/engagement/site_engagement_helper.h:71: // gSecondsBetweenUserInputCheck seconds. On 2015/09/24 03:50:53, calamity wrote: > ...
5 years, 3 months ago (2015-09-24 06:52:07 UTC) #20
calamity
https://codereview.chromium.org/1338603002/diff/260001/chrome/browser/engagement/site_engagement_service_browsertest.cc File chrome/browser/engagement/site_engagement_service_browsertest.cc (right): https://codereview.chromium.org/1338603002/diff/260001/chrome/browser/engagement/site_engagement_service_browsertest.cc#newcode330 chrome/browser/engagement/site_engagement_service_browsertest.cc:330: timer->Fire(); On 2015/09/24 06:52:07, dominickn wrote: > On 2015/09/24 ...
5 years, 3 months ago (2015-09-24 07:36:22 UTC) #21
calamity
lgtm
5 years, 3 months ago (2015-09-24 07:37:29 UTC) #22
jdduke (slow)
https://codereview.chromium.org/1338603002/diff/280001/chrome/browser/engagement/site_engagement_helper.cc File chrome/browser/engagement/site_engagement_helper.cc (right): https://codereview.chromium.org/1338603002/diff/280001/chrome/browser/engagement/site_engagement_helper.cc#newcode61 chrome/browser/engagement/site_engagement_helper.cc:61: event.type == blink::WebInputEvent::MouseMove || I'm not sure MouseMove's without ...
5 years, 3 months ago (2015-09-24 15:13:26 UTC) #24
jdduke (slow)
(Sorry for the late drive-by, just trying to understand the system better :) https://codereview.chromium.org/1338603002/diff/280001/chrome/browser/engagement/site_engagement_helper.cc File ...
5 years, 3 months ago (2015-09-24 15:17:35 UTC) #25
benwells
On 2015/09/24 15:13:26, jdduke wrote: > https://codereview.chromium.org/1338603002/diff/280001/chrome/browser/engagement/site_engagement_helper.cc > File chrome/browser/engagement/site_engagement_helper.cc (right): > > https://codereview.chromium.org/1338603002/diff/280001/chrome/browser/engagement/site_engagement_helper.cc#newcode61 > ...
5 years, 2 months ago (2015-09-24 22:56:07 UTC) #26
jdduke (slow)
On 2015/09/24 22:56:07, benwells wrote: > On 2015/09/24 15:13:26, jdduke wrote: > > > https://codereview.chromium.org/1338603002/diff/280001/chrome/browser/engagement/site_engagement_helper.cc ...
5 years, 2 months ago (2015-09-24 23:01:08 UTC) #27
dominickn
RE the aura presence monitor: do you of someone I can contact to talk to ...
5 years, 2 months ago (2015-09-25 00:08:57 UTC) #28
jdduke (slow)
On 2015/09/25 00:08:57, dominickn wrote: > RE the aura presence monitor: do you of someone ...
5 years, 2 months ago (2015-09-25 00:19:44 UTC) #29
dominickn
On 2015/09/25 00:19:44, jdduke wrote: > On 2015/09/25 00:08:57, dominickn wrote: > > RE the ...
5 years, 2 months ago (2015-09-25 01:17:28 UTC) #30
dominickn
On 2015/09/25 00:19:44, jdduke wrote: > On 2015/09/25 00:08:57, dominickn wrote: > > RE the ...
5 years, 2 months ago (2015-09-25 01:17:30 UTC) #31
benwells
https://codereview.chromium.org/1338603002/diff/320001/chrome/browser/engagement/site_engagement_helper.h File chrome/browser/engagement/site_engagement_helper.h (right): https://codereview.chromium.org/1338603002/diff/320001/chrome/browser/engagement/site_engagement_helper.h#newcode22 chrome/browser/engagement/site_engagement_helper.h:22: // origins based on the time spent on site. ...
5 years, 2 months ago (2015-09-29 00:24:12 UTC) #32
dominickn
https://codereview.chromium.org/1338603002/diff/320001/chrome/browser/engagement/site_engagement_helper.h File chrome/browser/engagement/site_engagement_helper.h (right): https://codereview.chromium.org/1338603002/diff/320001/chrome/browser/engagement/site_engagement_helper.h#newcode22 chrome/browser/engagement/site_engagement_helper.h:22: // origins based on the time spent on site. ...
5 years, 2 months ago (2015-09-29 01:40:37 UTC) #34
benwells
https://codereview.chromium.org/1338603002/diff/380001/chrome/browser/engagement/site_engagement_service_browsertest.cc File chrome/browser/engagement/site_engagement_service_browsertest.cc (right): https://codereview.chromium.org/1338603002/diff/380001/chrome/browser/engagement/site_engagement_service_browsertest.cc#newcode31 chrome/browser/engagement/site_engagement_service_browsertest.cc:31: class Observer { Why do you need all this ...
5 years, 2 months ago (2015-09-29 01:48:39 UTC) #35
dominickn
Thanks for the feedback. I've now sacrificed the observer and moved the quit closure directly ...
5 years, 2 months ago (2015-09-29 03:19:48 UTC) #36
benwells
lgtm
5 years, 2 months ago (2015-09-29 04:27:12 UTC) #37
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1338603002/400001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1338603002/400001
5 years, 2 months ago (2015-09-29 04:34:32 UTC) #40
commit-bot: I haz the power
Try jobs failed on following builders: android_clang_dbg_recipe on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/android_clang_dbg_recipe/builds/126718)
5 years, 2 months ago (2015-09-29 05:08:26 UTC) #42
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1338603002/400001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1338603002/400001
5 years, 2 months ago (2015-09-29 05:36:46 UTC) #44
commit-bot: I haz the power
Try jobs failed on following builders: android_clang_dbg_recipe on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/android_clang_dbg_recipe/builds/126741)
5 years, 2 months ago (2015-09-29 05:59:44 UTC) #46
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1338603002/400001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1338603002/400001
5 years, 2 months ago (2015-09-29 06:40:47 UTC) #48
commit-bot: I haz the power
Try jobs failed on following builders: android_clang_dbg_recipe on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/android_clang_dbg_recipe/builds/126768)
5 years, 2 months ago (2015-09-29 06:59:33 UTC) #50
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1338603002/400001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1338603002/400001
5 years, 2 months ago (2015-09-29 08:10:00 UTC) #52
dominickn
On 2015/09/29 08:10:00, commit-bot: I haz the power wrote: > CQ is trying da patch. ...
5 years, 2 months ago (2015-09-29 08:20:06 UTC) #53
commit-bot: I haz the power
Try jobs failed on following builders: android_clang_dbg_recipe on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/android_clang_dbg_recipe/builds/126807)
5 years, 2 months ago (2015-09-29 08:29:27 UTC) #55
jdduke (slow)
https://codereview.chromium.org/1338603002/diff/320001/chrome/browser/engagement/site_engagement_service.cc File chrome/browser/engagement/site_engagement_service.cc (right): https://codereview.chromium.org/1338603002/diff/320001/chrome/browser/engagement/site_engagement_service.cc#newcode38 chrome/browser/engagement/site_engagement_service.cc:38: if (!settings) Can settings legitimately be null? None of ...
5 years, 2 months ago (2015-09-29 15:20:36 UTC) #56
dominickn
https://codereview.chromium.org/1338603002/diff/320001/chrome/browser/engagement/site_engagement_service.cc File chrome/browser/engagement/site_engagement_service.cc (right): https://codereview.chromium.org/1338603002/diff/320001/chrome/browser/engagement/site_engagement_service.cc#newcode38 chrome/browser/engagement/site_engagement_service.cc:38: if (!settings) On 2015/09/29 15:20:36, jdduke wrote: > Can ...
5 years, 2 months ago (2015-09-30 00:22:52 UTC) #57
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1338603002/400001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1338603002/400001
5 years, 2 months ago (2015-09-30 01:10:19 UTC) #59
commit-bot: I haz the power
Committed patchset #20 (id:400001)
5 years, 2 months ago (2015-09-30 01:31:01 UTC) #60
commit-bot: I haz the power
Patchset 20 (id:??) landed as https://crrev.com/f3226a4f280b20eb00024d724b9e70ec1edc2e33 Cr-Commit-Position: refs/heads/master@{#351465}
5 years, 2 months ago (2015-09-30 01:31:45 UTC) #61
jdduke (slow)
On 2015/09/30 00:22:52, dominickn wrote: > https://codereview.chromium.org/1338603002/diff/320001/chrome/browser/engagement/site_engagement_service.cc > File chrome/browser/engagement/site_engagement_service.cc (right): > > https://codereview.chromium.org/1338603002/diff/320001/chrome/browser/engagement/site_engagement_service.cc#newcode38 > ...
5 years, 2 months ago (2015-09-30 04:16:22 UTC) #62
dominickn
This feature is disabled by default, and this CL is blocking others which will let ...
5 years, 2 months ago (2015-09-30 05:32:43 UTC) #63
phoglund_chromium
A revert of this CL (patchset #20 id:400001) has been created in https://codereview.chromium.org/1376143003/ by phoglund@chromium.org. ...
5 years, 2 months ago (2015-09-30 07:43:31 UTC) #64
dominickn
On 2015/09/30 07:43:31, phoglund_chrome wrote: > A revert of this CL (patchset #20 id:400001) has ...
5 years, 2 months ago (2015-09-30 07:54:05 UTC) #65
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1338603002/440001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1338603002/440001
5 years, 2 months ago (2015-10-01 02:03:00 UTC) #69
commit-bot: I haz the power
Committed patchset #21 (id:440001)
5 years, 2 months ago (2015-10-01 02:09:45 UTC) #70
commit-bot: I haz the power
5 years, 2 months ago (2015-10-01 02:10:47 UTC) #71
Message was sent while issue was closed.
Patchset 21 (id:??) landed as
https://crrev.com/5eceefb54758e691c7857c4feff111f7db33ef6d
Cr-Commit-Position: refs/heads/master@{#351704}

Powered by Google App Engine
This is Rietveld 408576698