New issue
Advanced search Search tips

Issue 889242 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner: ----
Closed: Oct 1
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Task

Blocking:
issue 634507



Sign in to add a comment

Remove use of base::Time::To/FromInternalValue() in storage/browser./quota

Project Member Reported by jsb...@chromium.org, Sep 25

Issue description

QuotaDatabase uses base::Time's ToInternalValue / FromInternalValue, which are banned.

Since this data is serialized to a database, we need to make sure the replacements have compatible serialization.

 
Blocking: 634507
I would like to work this issue if no one working on this.
Status: Available (was: Untriaged)
No-one is working on it.

From reviewing the dependent bug, it looks like replacing the calls to Time::From/ToInternalValue() with Time::From/ToDeltaSinceWindowsEpoch() will be sufficient and backwards compatible.

For example:
https://chromium-review.googlesource.com/c/chromium/src/+/913609

Status: Started (was: Available)
Project Member

Comment 5 by bugdroid1@chromium.org, Sep 29

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/037816fc01dc975a803305883ec7d34fe378c429

commit 037816fc01dc975a803305883ec7d34fe378c429
Author: Jdragon <jdragon.bae@gmail.com>
Date: Sat Sep 29 19:15:58 2018

Remove uses of deprecated Time::From/ToInternalValue()

The CL replaces the calls to Time::From/ToInternalValue() by the more
explicit Time::From/ToDeltaSinceWindowsEpoch(). This change is backwards
compatible.

Bug:  889242 
Change-Id: I4df4bab497465e975abc137052010ca2590a77a5
Reviewed-on: https://chromium-review.googlesource.com/1248328
Commit-Queue: Jaeyong Bae <jdragon.bae@gmail.com>
Reviewed-by: Joshua Bell <jsbell@chromium.org>
Reviewed-by: Yuri Wiitala <miu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#595319}
[modify] https://crrev.com/037816fc01dc975a803305883ec7d34fe378c429/storage/browser/quota/quota_database.cc
[modify] https://crrev.com/037816fc01dc975a803305883ec7d34fe378c429/storage/browser/quota/quota_database_unittest.cc

Status: Fixed (was: Started)
Thanks for the fix!

Project Member

Comment 7 by bugdroid1@chromium.org, Oct 1

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/514fa3f4da964886a3e7fa593bc6770932cfaf6e

commit 514fa3f4da964886a3e7fa593bc6770932cfaf6e
Author: Joshua Bell <jsbell@chromium.org>
Date: Mon Oct 01 22:23:09 2018

QuotaDatabase: Wrap int/Time conversions in helper methods

As a follow on to https://crrev.com/c/1248328, wrap conversions
between base::Time and the particular format used for persistence in
the quota database (int64_t) in methods, instead of inlining the
conversion steps at every point.

Bug:  889242 
Change-Id: I8d5b7b6a6e7bf9ccf507cd8c3ad750dae9e30206
Reviewed-on: https://chromium-review.googlesource.com/1254744
Commit-Queue: Joshua Bell <jsbell@chromium.org>
Reviewed-by: Victor Costan <pwnall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#595589}
[modify] https://crrev.com/514fa3f4da964886a3e7fa593bc6770932cfaf6e/storage/browser/quota/quota_database.cc
[modify] https://crrev.com/514fa3f4da964886a3e7fa593bc6770932cfaf6e/storage/browser/quota/quota_database.h
[modify] https://crrev.com/514fa3f4da964886a3e7fa593bc6770932cfaf6e/storage/browser/quota/quota_database_unittest.cc

Sign in to add a comment