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

Side by Side Diff: chrome/browser/budget_service/budget.proto

Issue 2255813002: AddEngagementBudget and SpendBudget added to BudgetDatabase. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added expiration check in SpendBudget Created 4 years, 4 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 syntax = "proto2"; 5 syntax = "proto2";
6 6
7 package budget_service; 7 package budget_service;
8 8
9 // Chrome requires this. 9 // Chrome requires this.
10 option optimize_for = LITE_RUNTIME; 10 option optimize_for = LITE_RUNTIME;
11 11
12 // Next available id: 2 12 // Next available id: 3
13 message Budget { 13 message Budget {
14 // The sequence of budget chunks and their expiration times. 14 // The sequence of budget chunks and their expiration times.
15 repeated BudgetChunk budget = 1; 15 repeated BudgetChunk budget = 1;
16
17 // The timestamp of the last time that new budget was awarded. This stores
18 // the internal value needed to construct a base::Time object.
19 optional int64 last_updated = 2;
johnme 2016/08/19 18:48:35 Nit: rename this to clarify that only engagement a
harkness 2016/08/22 13:46:25 Done.
16 } 20 }
17 21
18 // Next available id: 3 22 // Next available id: 3
19 message BudgetChunk { 23 message BudgetChunk {
20 // The amount of budget remaining in this chunk. 24 // The amount of budget remaining in this chunk.
21 optional double amount = 1; 25 optional double amount = 1;
22 26
23 // The timestamp when the budget expires. This stores the internal value 27 // The timestamp when the budget expires. This stores the internal value
24 // needed to construct a base::Time object. 28 // needed to construct a base::Time object.
25 optional int64 expiration = 2; 29 optional int64 expiration = 2;
johnme 2016/08/19 18:48:35 Optional: instead of storing expiration times for
harkness 2016/08/22 13:46:25 That wouldn't actually work, since even if a site
26 } 30 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/budget_service/budget_database.h » ('j') | chrome/browser/budget_service/budget_database.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698