This source file includes following definitions.
- GetInstance
- GetForBrowserContext
- BuildServiceInstanceFor
#include "chrome/browser/ui/app_list/search/history_factory.h"
#include "base/memory/singleton.h"
#include "chrome/browser/ui/app_list/search/history.h"
#include "components/keyed_service/content/browser_context_dependency_manager.h"
namespace app_list {
HistoryFactory* HistoryFactory::GetInstance() {
return Singleton<HistoryFactory>::get();
}
History* HistoryFactory::GetForBrowserContext(
content::BrowserContext* context) {
return static_cast<History*>(
GetInstance()->GetServiceForBrowserContext(context, true));
}
HistoryFactory::HistoryFactory()
: BrowserContextKeyedServiceFactory(
"app_list::History",
BrowserContextDependencyManager::GetInstance()) {}
HistoryFactory::~HistoryFactory() {}
KeyedService* HistoryFactory::BuildServiceInstanceFor(
content::BrowserContext* context) const {
return new History(context);
}
}