Issue metadata
Sign in to add a comment
|
Migrate use cases to SetDeltaTime/GetDeltaTime |
||||||||||||||||||||
Issue descriptionOnce https://chromium-review.googlesource.com/c/chromium/src/+/1103147 lands and PrefService::SetDeltaTime and PrefService::GetDeltaTime exist, we should replace any code that saves DeltaTime into prefs with these new convinience method, and ideally remove the time serialization code they were using. Not that this really only works if they were previously using microseconds resolution (which is also the internal resolution of DeltaTime). Currently known candidate for migration is * https://cs.chromium.org/chromium/src/components/ntp_snippets/remote/remote_suggestions_scheduler_impl.cc?l=484
,
Jun 18 2018
Ooh interesting. Okay, doesn't look like anyone is actively migrating anything, but looking through history, I'm starting to get an idea. We basically check to see if the old pref is set, and new pref is not set, and then convert/migrate the value, and clear the old pref regardless of other logic. And then ~1 year later we remove the whole section. The pref that can be migrated is https://cs.chromium.org/chromium/src/components/sync/base/sync_prefs.cc?l=53 , as we'll want to convert from seconds resolution to microseconds resolution.
,
Jun 19 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/0ef461ea242fc7b073d9c8acba75738ccffa0066 commit 0ef461ea242fc7b073d9c8acba75738ccffa0066 Author: Sky Malice <skym@google.com> Date: Tue Jun 19 01:28:21 2018 [NTP Snippets] Switch RemoteSuggestionsSchedulerImpl to Time and TimeDelta pref methods. Because time_serialization.cc stored Time and DeltaTime in microseconds, and Time since the windows epoch, which is the exact same way that PrefService is storing these time fields, this change should be fully backwards compatible. Bug: 853755 Change-Id: I22d734d030ca550a654319e37abf6653890c1bdb Reviewed-on: https://chromium-review.googlesource.com/1104581 Reviewed-by: Filip Gorski <fgorski@chromium.org> Commit-Queue: Sky Malice <skym@chromium.org> Cr-Commit-Position: refs/heads/master@{#568282} [modify] https://crrev.com/0ef461ea242fc7b073d9c8acba75738ccffa0066/components/ntp_snippets/remote/remote_suggestions_scheduler_impl.cc [modify] https://crrev.com/0ef461ea242fc7b073d9c8acba75738ccffa0066/components/ntp_snippets/time_serialization.cc [modify] https://crrev.com/0ef461ea242fc7b073d9c8acba75738ccffa0066/components/ntp_snippets/time_serialization.h [modify] https://crrev.com/0ef461ea242fc7b073d9c8acba75738ccffa0066/components/ntp_snippets/time_serialization_unittest.cc
,
Jun 19 2018
|
|||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||
Comment 1 by gab@chromium.org
, Jun 18 2018