Use higher precision to store the login database's date_created field.

When a password is created or updated, its creation_date is saved in the login
database with precision seconds. The same data is stored in the password sync
server with precision microseconds. As a result, the two passwords always
appear to differ.

I've changed the code so that the creation_date is stored in the login database
with precision microseconds, and I've created a migration to update the
existing login database entries. Prior to the migration, creation_date was a
time_t, which has precision seconds and counts from the UTC epoch. After the
migration, creation_date has precision microseconds, and counts from Chrome's
platform independent epoch.

Note that the very first time passwords are all synced, they will still appear
to differ since the login database lost 6 decimal places of precision. This CL
makes it so that on the second sync (and subsequent syncs), the passwords will
no longer differ.

BUG=408800

Review URL: https://codereview.chromium.org/702893005

Cr-Commit-Position: refs/heads/master@{#303783}


CrOS-Libchrome-Original-Commit: 5408e45b57a5bbd2c60a863f11b35ad3fe6b97fa
1 file changed
tree: 8c44a0f36399bed26a0fe712218083fd27a4b672
  1. base/
  2. build/
  3. components/
  4. dbus/
  5. device/
  6. ipc/
  7. mojo/
  8. testing/
  9. third_party/
  10. ui/