Chromium Code Reviews| Index: chrome/browser/budget_service/budget_database.cc |
| diff --git a/chrome/browser/budget_service/budget_database.cc b/chrome/browser/budget_service/budget_database.cc |
| index 74a9892a816a199d465f1e29a4d44c77851856a8..dbfaa17ce36a530a760285781a2ecb9b7ebda745 100644 |
| --- a/chrome/browser/budget_service/budget_database.cc |
| +++ b/chrome/browser/budget_service/budget_database.cc |
| @@ -156,7 +156,8 @@ void BudgetDatabase::GetBudgetAfterSync(const url::Origin& origin, |
| // Always add one entry at the front of the list for the total budget now. |
| blink::mojom::BudgetStatePtr prediction(blink::mojom::BudgetState::New()); |
| prediction->budget_at = total; |
| - prediction->time = clock_->Now().ToDoubleT(); |
| + prediction->time = |
| + clock_->Now().ToDoubleT() * base::Time::kMillisecondsPerSecond; |
|
Miguel Garcia
2017/06/05 18:47:10
Why not simply clock_->Now().InMilliseconds() (or
Peter Beverloo
2017/06/05 19:01:24
Used ToJsTime() so that we get the epoch - thanks!
|
| predictions.push_back(std::move(prediction)); |
| // Starting with the soonest expiring chunks, add entries for the |
| @@ -166,7 +167,8 @@ void BudgetDatabase::GetBudgetAfterSync(const url::Origin& origin, |
| blink::mojom::BudgetStatePtr prediction(blink::mojom::BudgetState::New()); |
| total -= chunk.amount; |
| prediction->budget_at = total; |
| - prediction->time = chunk.expiration.ToDoubleT(); |
| + prediction->time = |
| + chunk.expiration.ToDoubleT() * base::Time::kMillisecondsPerSecond; |
| predictions.push_back(std::move(prediction)); |
| } |