| Index: chrome/browser/push_messaging/push_messaging_notification_manager.cc
|
| diff --git a/chrome/browser/push_messaging/push_messaging_notification_manager.cc b/chrome/browser/push_messaging/push_messaging_notification_manager.cc
|
| index c772c163121357bb8a89d4252a38a6392ee64e9e..11509a98c3ea6c11b859e8606d95ab01bff05598 100644
|
| --- a/chrome/browser/push_messaging/push_messaging_notification_manager.cc
|
| +++ b/chrome/browser/push_messaging/push_messaging_notification_manager.cc
|
| @@ -14,6 +14,7 @@
|
| #include "chrome/browser/notifications/platform_notification_service_impl.h"
|
| #include "chrome/browser/profiles/profile.h"
|
| #include "chrome/browser/push_messaging/background_budget_service.h"
|
| +#include "chrome/browser/push_messaging/background_budget_service_factory.h"
|
| #include "chrome/browser/push_messaging/push_messaging_constants.h"
|
| #include "chrome/common/features.h"
|
| #include "chrome/grit/generated_resources.h"
|
| @@ -189,7 +190,9 @@ void PushMessagingNotificationManager::DidGetNotificationsFromDatabase(
|
| // Only track budget for messages that needed to show a notification but
|
| // did not.
|
| double budget = 0;
|
| - BackgroundBudgetService::GetBudget(profile_, origin, budget);
|
| + BackgroundBudgetService* service =
|
| + BackgroundBudgetServiceFactory::GetForProfile(profile_);
|
| + service->GetBudget(origin, budget);
|
| DidGetBudget(origin, service_worker_registration_id,
|
| message_handled_closure, budget);
|
| return;
|
| @@ -255,7 +258,9 @@ void PushMessagingNotificationManager::DidGetBudget(
|
| double cost = 1.0;
|
| if (budget >= cost) {
|
| // Update the stored budget.
|
| - BackgroundBudgetService::StoreBudget(profile_, origin, budget - cost);
|
| + BackgroundBudgetService* service =
|
| + BackgroundBudgetServiceFactory::GetForProfile(profile_);
|
| + service->StoreBudget(origin, budget - cost);
|
|
|
| RecordUserVisibleStatus(
|
| content::PUSH_USER_VISIBLE_STATUS_REQUIRED_BUT_NOT_SHOWN_USED_GRACE);
|
|
|