NaCl: Update revision in DEPS, r12770 -> r12773
[chromium-blink-merge.git] / chrome / browser / printing / cloud_print / cloud_print_proxy_service_factory.cc
blob0e79f61caba40f31907ed80a4b118635651bc99e
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "chrome/browser/printing/cloud_print/cloud_print_proxy_service_factory.h"
7 #include "chrome/browser/printing/cloud_print/cloud_print_proxy_service.h"
8 #include "chrome/browser/profiles/profile.h"
9 #include "components/browser_context_keyed_service/browser_context_dependency_manager.h"
11 // static
12 CloudPrintProxyService* CloudPrintProxyServiceFactory::GetForProfile(
13 Profile* profile) {
14 return static_cast<CloudPrintProxyService*>(
15 GetInstance()->GetServiceForBrowserContext(profile, true));
18 CloudPrintProxyServiceFactory* CloudPrintProxyServiceFactory::GetInstance() {
19 return Singleton<CloudPrintProxyServiceFactory>::get();
22 CloudPrintProxyServiceFactory::CloudPrintProxyServiceFactory()
23 : BrowserContextKeyedServiceFactory(
24 "CloudPrintProxyService",
25 BrowserContextDependencyManager::GetInstance()) {
28 CloudPrintProxyServiceFactory::~CloudPrintProxyServiceFactory() {
31 BrowserContextKeyedService*
32 CloudPrintProxyServiceFactory::BuildServiceInstanceFor(
33 content::BrowserContext* profile) const {
34 CloudPrintProxyService* service =
35 new CloudPrintProxyService(static_cast<Profile*>(profile));
36 service->Initialize();
38 return service;
41 bool CloudPrintProxyServiceFactory::ServiceIsNULLWhileTesting() const {
42 return true;