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

Issue 702893005: Use higher precision to store the login database's date_created field. (Closed)

Created:
6 years, 1 month ago by erikchen
Modified:
6 years, 1 month ago
CC:
chromium-reviews, gcasto+watchlist_chromium.org, mkwst+watchlist-passwords_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

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 Committed: https://crrev.com/5408e45b57a5bbd2c60a863f11b35ad3fe6b97fa Cr-Commit-Position: refs/heads/master@{#303783}

Patch Set 1 #

Total comments: 2

Patch Set 2 : #

Total comments: 12

Patch Set 3 : Comments #

Patch Set 4 : Rebase against top of tree. Add an include. #

Patch Set 5 : Clear statement before closing db in unittest. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+120 lines, -15 lines) Patch
M base/time/time.h View 1 2 chunks +4 lines, -4 lines 0 comments Download
M components/components_tests.gyp View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M components/password_manager/core/browser/login_database.cc View 1 7 chunks +22 lines, -9 lines 0 comments Download
M components/password_manager/core/browser/login_database_unittest.cc View 1 2 3 4 3 chunks +82 lines, -2 lines 0 comments Download
A components/test/data/password_manager/login_db_v8.sql View 1 2 1 chunk +11 lines, -0 lines 0 comments Download

Messages

Total messages: 23 (7 generated)
erikchen
gcasto: Please review.
6 years, 1 month ago (2014-11-05 20:41:22 UTC) #2
Garrett Casto
It would be great if you could add a test for this. Perhaps saving a ...
6 years, 1 month ago (2014-11-05 22:15:00 UTC) #3
erikchen
gcasto: PTAL. I did as you suggested and saved a golden version of the current ...
6 years, 1 month ago (2014-11-06 01:35:01 UTC) #4
Garrett Casto
https://codereview.chromium.org/702893005/diff/20001/components/password_manager/core/browser/login_database.cc File components/password_manager/core/browser/login_database.cc (right): https://codereview.chromium.org/702893005/diff/20001/components/password_manager/core/browser/login_database.cc#newcode265 components/password_manager/core/browser/login_database.cc:265: "(date_created * ?) + ?")); It would be nicer ...
6 years, 1 month ago (2014-11-06 23:17:16 UTC) #5
erikchen
PTAL https://codereview.chromium.org/702893005/diff/20001/components/password_manager/core/browser/login_database.cc File components/password_manager/core/browser/login_database.cc (right): https://codereview.chromium.org/702893005/diff/20001/components/password_manager/core/browser/login_database.cc#newcode265 components/password_manager/core/browser/login_database.cc:265: "(date_created * ?) + ?")); On 2014/11/06 23:17:15, ...
6 years, 1 month ago (2014-11-07 03:24:04 UTC) #6
Garrett Casto
LGTM Thanks! https://codereview.chromium.org/702893005/diff/20001/components/password_manager/core/browser/login_database.cc File components/password_manager/core/browser/login_database.cc (right): https://codereview.chromium.org/702893005/diff/20001/components/password_manager/core/browser/login_database.cc#newcode265 components/password_manager/core/browser/login_database.cc:265: "(date_created * ?) + ?")); On 2014/11/07 ...
6 years, 1 month ago (2014-11-09 09:15:23 UTC) #7
erikchen
thestig: Looking for an OWNER review of base/* blundell: Looking for an OWNER review of ...
6 years, 1 month ago (2014-11-10 18:32:10 UTC) #9
Lei Zhang
base/ lgtm
6 years, 1 month ago (2014-11-10 20:59:52 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/702893005/40001
6 years, 1 month ago (2014-11-11 19:45:14 UTC) #12
commit-bot: I haz the power
Try jobs failed on following builders: android_dbg_tests_recipe on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/android_dbg_tests_recipe/builds/27288)
6 years, 1 month ago (2014-11-11 20:21:40 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/702893005/60001
6 years, 1 month ago (2014-11-11 21:23:30 UTC) #16
commit-bot: I haz the power
Try jobs failed on following builders: ios_dbg_simulator on tryserver.chromium.mac (http://build.chromium.org/p/tryserver.chromium.mac/builders/ios_dbg_simulator/builds/32439)
6 years, 1 month ago (2014-11-11 22:10:31 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/702893005/80001
6 years, 1 month ago (2014-11-12 01:30:04 UTC) #20
commit-bot: I haz the power
Committed patchset #5 (id:80001)
6 years, 1 month ago (2014-11-12 02:58:09 UTC) #21
commit-bot: I haz the power
Patchset 5 (id:??) landed as https://crrev.com/5408e45b57a5bbd2c60a863f11b35ad3fe6b97fa Cr-Commit-Position: refs/heads/master@{#303783}
6 years, 1 month ago (2014-11-12 02:58:47 UTC) #22
blundell
6 years, 1 month ago (2014-11-12 10:04:00 UTC) #23
Message was sent while issue was closed.
lgtm

components_tests.gyp actually has per-file OWNERS of *

Powered by Google App Engine
This is Rietveld 408576698