This source file includes following definitions.
- GetForProfile
- GetInstance
- BuildServiceInstanceFor
- ServiceIsNULLWhileTesting
#include "chrome/browser/printing/cloud_print/cloud_print_proxy_service_factory.h"
#include "chrome/browser/printing/cloud_print/cloud_print_proxy_service.h"
#include "chrome/browser/profiles/profile.h"
#include "components/keyed_service/content/browser_context_dependency_manager.h"
CloudPrintProxyService* CloudPrintProxyServiceFactory::GetForProfile(
Profile* profile) {
return static_cast<CloudPrintProxyService*>(
GetInstance()->GetServiceForBrowserContext(profile, true));
}
CloudPrintProxyServiceFactory* CloudPrintProxyServiceFactory::GetInstance() {
return Singleton<CloudPrintProxyServiceFactory>::get();
}
CloudPrintProxyServiceFactory::CloudPrintProxyServiceFactory()
: BrowserContextKeyedServiceFactory(
"CloudPrintProxyService",
BrowserContextDependencyManager::GetInstance()) {
}
CloudPrintProxyServiceFactory::~CloudPrintProxyServiceFactory() {
}
KeyedService* CloudPrintProxyServiceFactory::BuildServiceInstanceFor(
content::BrowserContext* profile) const {
CloudPrintProxyService* service =
new CloudPrintProxyService(static_cast<Profile*>(profile));
service->Initialize();
return service;
}
bool CloudPrintProxyServiceFactory::ServiceIsNULLWhileTesting() const {
return true;
}