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

Side by Side Diff: chrome/browser/push_messaging/background_budget_service_factory.cc

Issue 1887623002: Replace the 1 in 10 grace period with an accumulating budget based on SES. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Using Remove* instead of Set* Created 4 years, 7 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/push_messaging/background_budget_service_factory.h" 5 #include "chrome/browser/push_messaging/background_budget_service_factory.h"
6 6
7 #include "base/memory/ptr_util.h"
8 #include "base/time/default_clock.h"
7 #include "chrome/browser/engagement/site_engagement_service_factory.h" 9 #include "chrome/browser/engagement/site_engagement_service_factory.h"
8 #include "chrome/browser/profiles/profile.h" 10 #include "chrome/browser/profiles/profile.h"
9 #include "chrome/browser/push_messaging/background_budget_service.h" 11 #include "chrome/browser/push_messaging/background_budget_service.h"
10 #include "components/keyed_service/content/browser_context_dependency_manager.h" 12 #include "components/keyed_service/content/browser_context_dependency_manager.h"
11 #include "content/public/browser/browser_context.h" 13 #include "content/public/browser/browser_context.h"
12 14
13 // static 15 // static
14 BackgroundBudgetService* BackgroundBudgetServiceFactory::GetForProfile( 16 BackgroundBudgetService* BackgroundBudgetServiceFactory::GetForProfile(
15 content::BrowserContext* profile) { 17 content::BrowserContext* profile) {
16 // Budget tracking is not supported in incognito mode. 18 // Budget tracking is not supported in incognito mode.
(...skipping 13 matching lines...) Expand all
30 : BrowserContextKeyedServiceFactory( 32 : BrowserContextKeyedServiceFactory(
31 "BackgroundBudgetService", 33 "BackgroundBudgetService",
32 BrowserContextDependencyManager::GetInstance()) { 34 BrowserContextDependencyManager::GetInstance()) {
33 DependsOn(SiteEngagementServiceFactory::GetInstance()); 35 DependsOn(SiteEngagementServiceFactory::GetInstance());
34 } 36 }
35 37
36 KeyedService* BackgroundBudgetServiceFactory::BuildServiceInstanceFor( 38 KeyedService* BackgroundBudgetServiceFactory::BuildServiceInstanceFor(
37 content::BrowserContext* profile) const { 39 content::BrowserContext* profile) const {
38 return new BackgroundBudgetService(static_cast<Profile*>(profile)); 40 return new BackgroundBudgetService(static_cast<Profile*>(profile));
39 } 41 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698