Chromium Code Reviews| Index: third_party/WebKit/public/platform/modules/budget_service/budget_service.mojom |
| diff --git a/third_party/WebKit/public/platform/modules/budget_service/budget_service.mojom b/third_party/WebKit/public/platform/modules/budget_service/budget_service.mojom |
| index aee3d7589b3e609f7583e99049725a4769800616..13c9d8d958ab5fe5ed46c634c197c5a3c8fa7c21 100644 |
| --- a/third_party/WebKit/public/platform/modules/budget_service/budget_service.mojom |
| +++ b/third_party/WebKit/public/platform/modules/budget_service/budget_service.mojom |
| @@ -7,9 +7,17 @@ module blink.mojom; |
| import "url/mojo/origin.mojom"; |
| enum BudgetOperationType { |
| - SILENT_PUSH |
| + SILENT_PUSH, |
| + INVALID_OPERATION |
| }; |
| +enum BudgetServiceErrorType { |
| + NO_ERROR, |
| + DATABASE_ERROR, |
| + NOT_SUPPORTED |
| +}; |
|
Peter Beverloo
2016/09/05 17:06:16
nit: mind documenting what these all mean? Being s
harkness
2016/09/06 15:45:01
Done.
|
| + |
|
Peter Beverloo
2016/09/05 17:06:16
nit: no double blank lines
harkness
2016/09/06 15:45:01
Done.
|
| + |
| // Structure representing the budget at points in time in the future. |
| struct BudgetState { |
| // Amount of budget that will be available. This should be the lower bound of |
| @@ -25,6 +33,7 @@ struct BudgetState { |
| // for the budget available for an origin. |
| interface BudgetService { |
| GetCost(BudgetOperationType operation) => (double cost); |
| - GetBudget(url.mojom.Origin origin) => (array<BudgetState> budget); |
| + GetBudget(url.mojom.Origin origin) => (BudgetServiceErrorType errorType, array<BudgetState> budget); |
| + Reserve(url.mojom.Origin origin, BudgetOperationType operation) => (BudgetServiceErrorType errorType, bool success); |
| }; |