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

Unified Diff: chrome/browser/budget_service/budget_database.cc

Issue 2934063002: Always use milliseconds in the Budget API implementation (Closed)
Patch Set: Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/budget_service/budget_database_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..49bf7af3ca29308bc66c3ad937950339ab2e0571 100644
--- a/chrome/browser/budget_service/budget_database.cc
+++ b/chrome/browser/budget_service/budget_database.cc
@@ -156,7 +156,7 @@ 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().ToJsTime();
predictions.push_back(std::move(prediction));
// Starting with the soonest expiring chunks, add entries for the
@@ -166,7 +166,7 @@ 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.ToJsTime();
predictions.push_back(std::move(prediction));
}
« no previous file with comments | « no previous file | chrome/browser/budget_service/budget_database_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698