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

Issue 1901563002: Set site engagement timestamps to privacy-respectful values when history is cleared. (Closed)

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

Description

Set site engagement timestamps to privacy-respectful values when history is cleared. The site engagement service stores last updated and last shortcut launch timestamps per origin. When history is cleared, the former is set to the time of history clearing and the latter is not changed. This CL sets both timestamps to the time of the most recent remaining visit in history for that origin once history clearing is completed. The last shortcut launch time is only set if it was non-null prior to the history being cleared. A slight change to the history service query (adding the last visited date to the data returned) is necessary to enable this change. More comprehensive testing of the history expiry mechanism are added to ensure correctness. BUG=604284 Committed: https://crrev.com/3d900e9e2c2dc6cda11c94aea9848181a9b4ffd1 Cr-Commit-Position: refs/heads/master@{#388321}

Patch Set 1 #

Total comments: 16

Patch Set 2 : Addressing reviewer comments #

Patch Set 3 : Modify history service to return last visited time #

Patch Set 4 : Rebase #

Total comments: 8

Patch Set 5 : Addressing reviewer comments #

Patch Set 6 : scoped_ptr is now unique_ptr #

Unified diffs Side-by-side diffs Delta from patch set Stats (+255 lines, -97 lines) Patch
M chrome/browser/engagement/site_engagement_service.h View 1 2 3 4 3 chunks +24 lines, -4 lines 0 comments Download
M chrome/browser/engagement/site_engagement_service.cc View 1 2 3 4 6 chunks +80 lines, -32 lines 0 comments Download
M chrome/browser/engagement/site_engagement_service_unittest.cc View 1 2 3 4 5 5 chunks +79 lines, -16 lines 0 comments Download
M components/history/core/browser/history_backend.h View 1 2 3 4 2 chunks +6 lines, -5 lines 0 comments Download
M components/history/core/browser/history_backend.cc View 1 2 3 4 1 chunk +12 lines, -7 lines 0 comments Download
M components/history/core/browser/history_backend_unittest.cc View 1 2 1 chunk +35 lines, -19 lines 0 comments Download
M components/history/core/browser/history_service.h View 1 2 3 4 2 chunks +9 lines, -6 lines 0 comments Download
M components/history/core/browser/history_service.cc View 1 2 1 chunk +7 lines, -6 lines 0 comments Download
M components/history/core/browser/history_types.h View 1 2 3 4 1 chunk +3 lines, -2 lines 0 comments Download

Messages

Total messages: 26 (8 generated)
dominickn
PTAL, thanks!
4 years, 8 months ago (2016-04-18 06:00:41 UTC) #2
benwells
https://codereview.chromium.org/1901563002/diff/1/chrome/browser/engagement/site_engagement_service.cc File chrome/browser/engagement/site_engagement_service.cc (right): https://codereview.chromium.org/1901563002/diff/1/chrome/browser/engagement/site_engagement_service.cc#newcode275 chrome/browser/engagement/site_engagement_service.cc:275: if (updated_time == nullptr) { Nit: Can you rearrange ...
4 years, 8 months ago (2016-04-18 07:01:43 UTC) #3
benwells
4 years, 8 months ago (2016-04-18 07:01:44 UTC) #4
dominickn
This is going to get more complicated unfortunately. HistoryService:::GetLastVisitTimeForURL queries an in-memory database, not all ...
4 years, 8 months ago (2016-04-18 23:27:52 UTC) #5
dominickn
On 2016/04/18 23:27:52, dominickn wrote: > This is going to get more complicated unfortunately. > ...
4 years, 8 months ago (2016-04-18 23:37:29 UTC) #6
benwells
On 2016/04/18 23:37:29, dominickn wrote: > On 2016/04/18 23:27:52, dominickn wrote: > > This is ...
4 years, 8 months ago (2016-04-19 00:12:41 UTC) #7
benwells
On 2016/04/19 00:12:41, benwells wrote: > On 2016/04/18 23:37:29, dominickn wrote: > > On 2016/04/18 ...
4 years, 8 months ago (2016-04-19 00:15:54 UTC) #8
dominickn
On 2016/04/19 00:12:41, benwells wrote: > On 2016/04/18 23:37:29, dominickn wrote: > > On 2016/04/18 ...
4 years, 8 months ago (2016-04-19 00:17:20 UTC) #9
benwells
https://codereview.chromium.org/1901563002/diff/1/chrome/browser/engagement/site_engagement_service.cc File chrome/browser/engagement/site_engagement_service.cc (right): https://codereview.chromium.org/1901563002/diff/1/chrome/browser/engagement/site_engagement_service.cc#newcode751 chrome/browser/engagement/site_engagement_service.cc:751: updated_time = clock_->Now(); On 2016/04/18 23:27:52, dominickn wrote: > ...
4 years, 8 months ago (2016-04-19 00:18:53 UTC) #10
dominickn
@benwells: PTAL at site engagement. This should be much neater now. @sdefresne: PTAL at history, ...
4 years, 8 months ago (2016-04-19 07:01:58 UTC) #13
sdefresne
https://codereview.chromium.org/1901563002/diff/60001/components/history/core/browser/history_backend.cc File components/history/core/browser/history_backend.cc (right): https://codereview.chromium.org/1901563002/diff/60001/components/history/core/browser/history_backend.cc#newcode443 components/history/core/browser/history_backend.cc:443: if (ContainsValue(origins, origin)) { nit: I would change to ...
4 years, 8 months ago (2016-04-19 07:18:01 UTC) #14
benwells
overall lg, but i'm concerned about the dcheck. https://codereview.chromium.org/1901563002/diff/60001/chrome/browser/engagement/site_engagement_service.cc File chrome/browser/engagement/site_engagement_service.cc (right): https://codereview.chromium.org/1901563002/diff/60001/chrome/browser/engagement/site_engagement_service.cc#newcode783 chrome/browser/engagement/site_engagement_service.cc:783: static_cast<double>(remaining) ...
4 years, 8 months ago (2016-04-19 07:28:19 UTC) #15
dominickn
Thanks! https://codereview.chromium.org/1901563002/diff/60001/chrome/browser/engagement/site_engagement_service.cc File chrome/browser/engagement/site_engagement_service.cc (right): https://codereview.chromium.org/1901563002/diff/60001/chrome/browser/engagement/site_engagement_service.cc#newcode783 chrome/browser/engagement/site_engagement_service.cc:783: static_cast<double>(remaining) / (remaining + deleted); On 2016/04/19 07:28:19, ...
4 years, 8 months ago (2016-04-19 07:59:32 UTC) #16
benwells
lgtm
4 years, 8 months ago (2016-04-19 08:08:14 UTC) #17
sdefresne
components/history lgtm
4 years, 8 months ago (2016-04-19 15:29:53 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1901563002/120001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1901563002/120001
4 years, 8 months ago (2016-04-19 21:40:52 UTC) #22
commit-bot: I haz the power
Committed patchset #6 (id:120001)
4 years, 8 months ago (2016-04-19 21:46:34 UTC) #24
commit-bot: I haz the power
4 years, 8 months ago (2016-04-22 19:16:49 UTC) #26
Message was sent while issue was closed.
Patchset 6 (id:??) landed as
https://crrev.com/3d900e9e2c2dc6cda11c94aea9848181a9b4ffd1
Cr-Commit-Position: refs/heads/master@{#388321}

Powered by Google App Engine
This is Rietveld 408576698