 Chromium Code Reviews
 Chromium Code Reviews Issue 2107173002:
  Add the future storage framework for the BudgetDatabase.  (Closed) 
  Base URL: https://chromium.googlesource.com/chromium/src.git@master
    
  
    Issue 2107173002:
  Add the future storage framework for the BudgetDatabase.  (Closed) 
  Base URL: https://chromium.googlesource.com/chromium/src.git@master| Index: chrome/browser/budget_service/budget.proto | 
| diff --git a/chrome/browser/budget_service/budget.proto b/chrome/browser/budget_service/budget.proto | 
| new file mode 100644 | 
| index 0000000000000000000000000000000000000000..7f7bf1522108d3c374730c85feb3122239f3ec11 | 
| --- /dev/null | 
| +++ b/chrome/browser/budget_service/budget.proto | 
| @@ -0,0 +1,28 @@ | 
| +// Copyright 2016 The Chromium Authors. All rights reserved. | 
| +// Use of this source code is governed by a BSD-style license that can be | 
| +// found in the LICENSE file. | 
| + | 
| +syntax = "proto2"; | 
| + | 
| +package chrome_browser_budget_service; | 
| 
Peter Beverloo
2016/06/29 13:37:27
package budget_service;
 
harkness
2016/06/30 10:41:57
I much prefer that, but it's not the pattern I see
 | 
| + | 
| +// Chrome requires this. | 
| 
Peter Beverloo
2016/06/29 13:37:27
What is the added value of this comment?
 
harkness
2016/06/30 10:41:57
The first proto I looked at didn't have the commen
 | 
| +option optimize_for = LITE_RUNTIME; | 
| + | 
| +// Description of budget chuks. | 
| 
Peter Beverloo
2016/06/29 13:37:27
Please annotate messages with the next available I
 
Peter Beverloo
2016/06/29 13:37:27
What is the added value of this comment?
 
harkness
2016/06/30 10:41:57
Done.
 
harkness
2016/06/30 10:41:57
That was commenting v1, deprecated by v2, but I fo
 | 
| +message Budget { | 
| + // How much budget the origin needs to accumulate before it will be allowed to | 
| + // perform another budget action. | 
| + optional double debt = 1; | 
| + | 
| + // The sequence of budget chunks and their expiration times. | 
| + repeated BudgetChunk budget = 2; | 
| +} | 
| + | 
| +message BudgetChunk { | 
| + // The amount of budget remaining in this chunk. | 
| + optional double budget_amount = 1; | 
| + | 
| + // The timestamp when the budget expires. | 
| 
Peter Beverloo
2016/06/29 13:37:27
It would be good to document what format the times
 
harkness
2016/06/30 10:41:57
Added a comment. I think I'm going to want to chan
 | 
| + optional double expiration_timestamp = 2; | 
| +} |