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

Unified Diff: chrome/browser/budget_service/budget_manager.h

Issue 2326523003: Connect Mojo budget_service to BudgetManager implementation of Reserve. (Closed)
Patch Set: 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: chrome/browser/budget_service/budget_manager.h
diff --git a/chrome/browser/budget_service/budget_manager.h b/chrome/browser/budget_service/budget_manager.h
index 8f7250e1d4368c4f844dbbb64cbb25990d6bfa48..68fc8518291857bcb4a0023127e95916b59b0837 100644
--- a/chrome/browser/budget_service/budget_manager.h
+++ b/chrome/browser/budget_service/budget_manager.h
@@ -36,7 +36,7 @@ class BudgetManager : public KeyedService {
static double GetCost(blink::mojom::BudgetOperationType type);
using GetBudgetCallback = blink::mojom::BudgetService::GetBudgetCallback;
- using ReserveCallback = base::Callback<void(bool success)>;
+ using ReserveCallback = blink::mojom::BudgetService::ReserveCallback;
using ConsumeCallback = base::Callback<void(bool success)>;
// Get the budget associated with the origin. This is passed to the
@@ -60,11 +60,17 @@ class BudgetManager : public KeyedService {
private:
friend class BudgetManagerTest;
+ // Called as a callback from BudgetDatabase after it made a SpendBudget
+ // decision.
+ void DidConsume(const ConsumeCallback& callback,
+ blink::mojom::BudgetServiceErrorType error,
+ bool success);
+
// Called as a callback from BudgetDatabase after it has made a reserve
// decision.
void DidReserve(const GURL& origin,
- blink::mojom::BudgetOperationType type,
const ReserveCallback& callback,
+ blink::mojom::BudgetServiceErrorType error,
bool success);
Profile* profile_;

Powered by Google App Engine
This is Rietveld 408576698