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

Unified Diff: third_party/WebKit/public/platform/modules/budget_service/budget_service.mojom

Issue 2309863002: Plumb reserve method of the BudgetAPI (Closed)
Patch Set: Updated with code review comments Created 4 years, 3 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
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..ef5245f4d0a408e821ad503170e0166e3ede279f 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,7 +7,16 @@ module blink.mojom;
import "url/mojo/origin.mojom";
enum BudgetOperationType {
- SILENT_PUSH
+ SILENT_PUSH,
+ INVALID_OPERATION
+};
+
+enum BudgetServiceErrorType {
+ NO_ERROR,
+ // Returned if there is an issue reading or writing the budget database.
+ DATABASE_ERROR,
+ // Returned if functionality is called which is not yet implemented.
+ NOT_SUPPORTED
};
// Structure representing the budget at points in time in the future.
@@ -25,6 +34,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);
Peter Beverloo 2016/09/06 15:54:10 errorType -> error_type (you use hacker_style on l
harkness 2016/09/06 16:17:26 Done.
};

Powered by Google App Engine
This is Rietveld 408576698