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

Unified Diff: chrome/browser/ui/app_list/app_list_prefs_factory.cc

Issue 2430753002: Discard unused AppListPrefs code. (Closed)
Patch Set: update Created 4 years, 2 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/ui/app_list/app_list_prefs_factory.cc
diff --git a/chrome/browser/ui/app_list/app_list_prefs_factory.cc b/chrome/browser/ui/app_list/app_list_prefs_factory.cc
deleted file mode 100644
index 41e78bb980fc02df33cbc6078dcf826b29820959..0000000000000000000000000000000000000000
--- a/chrome/browser/ui/app_list/app_list_prefs_factory.cc
+++ /dev/null
@@ -1,56 +0,0 @@
-// Copyright 2014 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/ui/app_list/app_list_prefs_factory.h"
-
-#include <utility>
-
-#include "chrome/browser/profiles/profile.h"
-#include "chrome/browser/ui/app_list/app_list_prefs.h"
-#include "components/keyed_service/content/browser_context_dependency_manager.h"
-#include "components/prefs/pref_service.h"
-#include "content/public/browser/browser_context.h"
-#include "extensions/browser/extensions_browser_client.h"
-
-namespace app_list {
-
-// static
-AppListPrefs* AppListPrefsFactory::GetForBrowserContext(
- content::BrowserContext* context) {
- return static_cast<AppListPrefs*>(
- GetInstance()->GetServiceForBrowserContext(context, true));
-}
-
-// static
-AppListPrefsFactory* AppListPrefsFactory::GetInstance() {
- return base::Singleton<AppListPrefsFactory>::get();
-}
-
-void AppListPrefsFactory::SetInstanceForTesting(
- content::BrowserContext* context,
- std::unique_ptr<AppListPrefs> prefs) {
- Associate(context, std::move(prefs));
-}
-
-AppListPrefsFactory::AppListPrefsFactory()
- : BrowserContextKeyedServiceFactory(
- "AppListPrefs",
- BrowserContextDependencyManager::GetInstance()) {
-}
-
-AppListPrefsFactory::~AppListPrefsFactory() {
-}
-
-KeyedService* AppListPrefsFactory::BuildServiceInstanceFor(
- content::BrowserContext* context) const {
- return AppListPrefs::Create(Profile::FromBrowserContext(context)->GetPrefs());
-}
-
-content::BrowserContext* AppListPrefsFactory::GetBrowserContextToUse(
- content::BrowserContext* context) const {
- return extensions::ExtensionsBrowserClient::Get()->GetOriginalContext(
- context);
-}
-
-} // namespace app_list
« no previous file with comments | « chrome/browser/ui/app_list/app_list_prefs_factory.h ('k') | chrome/browser/ui/app_list/app_list_syncable_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698