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

Unified Diff: chrome/browser/budget_service/background_budget_service_factory.cc

Issue 2243813002: Rename BackgroundBudgetService to BudgetManager (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@budget_database
Patch Set: code review cleanup Created 4 years, 4 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/background_budget_service_factory.cc
diff --git a/chrome/browser/budget_service/background_budget_service_factory.cc b/chrome/browser/budget_service/background_budget_service_factory.cc
deleted file mode 100644
index 8010909b778ea7d6986d45c8db530f77722b30ca..0000000000000000000000000000000000000000
--- a/chrome/browser/budget_service/background_budget_service_factory.cc
+++ /dev/null
@@ -1,41 +0,0 @@
-// Copyright 2016 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "chrome/browser/budget_service/background_budget_service_factory.h"
-
-#include "base/memory/ptr_util.h"
-#include "base/time/default_clock.h"
-#include "chrome/browser/budget_service/background_budget_service.h"
-#include "chrome/browser/engagement/site_engagement_service_factory.h"
-#include "chrome/browser/profiles/profile.h"
-#include "components/keyed_service/content/browser_context_dependency_manager.h"
-#include "content/public/browser/browser_context.h"
-
-// static
-BackgroundBudgetService* BackgroundBudgetServiceFactory::GetForProfile(
- content::BrowserContext* profile) {
- // Budget tracking is not supported in incognito mode.
- if (profile->IsOffTheRecord())
- return nullptr;
-
- return static_cast<BackgroundBudgetService*>(
- GetInstance()->GetServiceForBrowserContext(profile, true));
-}
-
-// static
-BackgroundBudgetServiceFactory* BackgroundBudgetServiceFactory::GetInstance() {
- return base::Singleton<BackgroundBudgetServiceFactory>::get();
-}
-
-BackgroundBudgetServiceFactory::BackgroundBudgetServiceFactory()
- : BrowserContextKeyedServiceFactory(
- "BackgroundBudgetService",
- BrowserContextDependencyManager::GetInstance()) {
- DependsOn(SiteEngagementServiceFactory::GetInstance());
-}
-
-KeyedService* BackgroundBudgetServiceFactory::BuildServiceInstanceFor(
- content::BrowserContext* profile) const {
- return new BackgroundBudgetService(static_cast<Profile*>(profile));
-}

Powered by Google App Engine
This is Rietveld 408576698