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

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

Issue 2682073002: Removing old prefs storage for BudgetManager (Closed)
Patch Set: Created 3 years, 10 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
« no previous file with comments | « chrome/browser/budget_service/budget_manager.h ('k') | chrome/browser/prefs/browser_prefs.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/budget_service/budget_manager.cc
diff --git a/chrome/browser/budget_service/budget_manager.cc b/chrome/browser/budget_service/budget_manager.cc
index 7e07480342e5da6dbe94d16863a9dc0249b60599..a60053e15cd8f44eea2ce31a9c37313080972a8e 100644
--- a/chrome/browser/budget_service/budget_manager.cc
+++ b/chrome/browser/budget_service/budget_manager.cc
@@ -13,9 +13,6 @@
#include "base/time/time.h"
#include "chrome/browser/engagement/site_engagement_score.h"
#include "chrome/browser/profiles/profile.h"
-#include "chrome/common/pref_names.h"
-#include "components/pref_registry/pref_registry_syncable.h"
-#include "components/prefs/pref_service.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/common/origin_util.h"
#include "third_party/WebKit/public/platform/modules/budget_service/budget_service.mojom.h"
@@ -23,17 +20,6 @@
using content::BrowserThread;
-namespace {
-
-// Previously, budget information was stored in the prefs. If there is any old
-// information still there, clear it.
-// TODO(harkness): Remove once Chrome 56 has branched.
-void ClearBudgetDataFromPrefs(Profile* profile) {
- profile->GetPrefs()->ClearPref(prefs::kBackgroundBudgetMap);
-}
-
-} // namespace
-
BudgetManager::BudgetManager(Profile* profile)
: profile_(profile),
db_(profile,
@@ -43,18 +29,11 @@ BudgetManager::BudgetManager(Profile* profile)
base::SequencedWorkerPool::GetSequenceToken(),
base::SequencedWorkerPool::CONTINUE_ON_SHUTDOWN)),
weak_ptr_factory_(this) {
- ClearBudgetDataFromPrefs(profile);
}
BudgetManager::~BudgetManager() {}
// static
-void BudgetManager::RegisterProfilePrefs(
- user_prefs::PrefRegistrySyncable* registry) {
- registry->RegisterDictionaryPref(prefs::kBackgroundBudgetMap);
-}
-
-// static
double BudgetManager::GetCost(blink::mojom::BudgetOperationType type) {
switch (type) {
case blink::mojom::BudgetOperationType::SILENT_PUSH:
« no previous file with comments | « chrome/browser/budget_service/budget_manager.h ('k') | chrome/browser/prefs/browser_prefs.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698