This source file includes following definitions.
- GetForBrowserContext
- GetInstance
- BuildServiceInstanceFor
#include "components/precache/content/precache_manager_factory.h"
#include "components/keyed_service/content/browser_context_dependency_manager.h"
#include "components/precache/content/precache_manager.h"
#include "content/public/browser/browser_context.h"
namespace precache {
PrecacheManager* PrecacheManagerFactory::GetForBrowserContext(
content::BrowserContext* browser_context) {
return static_cast<PrecacheManager*>(
GetInstance()->GetServiceForBrowserContext(browser_context, true));
}
PrecacheManagerFactory* PrecacheManagerFactory::GetInstance() {
return Singleton<PrecacheManagerFactory>::get();
}
PrecacheManagerFactory::PrecacheManagerFactory()
: BrowserContextKeyedServiceFactory(
"PrecacheManager", BrowserContextDependencyManager::GetInstance()) {}
PrecacheManagerFactory::~PrecacheManagerFactory() {}
KeyedService* PrecacheManagerFactory::BuildServiceInstanceFor(
content::BrowserContext* browser_context) const {
return new PrecacheManager(browser_context);
}
}