Fix build break
[chromium-blink-merge.git] / chrome / browser / captive_portal / captive_portal_service_factory.cc
blob26f49b280920ca4df31ef7471679ff0bc298bff4
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/captive_portal/captive_portal_service_factory.h"
7 #include "chrome/browser/captive_portal/captive_portal_service.h"
8 #include "chrome/browser/profiles/profile.h"
9 #include "chrome/browser/profiles/profile_dependency_manager.h"
11 namespace captive_portal {
13 // static
14 CaptivePortalService* CaptivePortalServiceFactory::GetForProfile(
15 Profile* profile) {
16 return static_cast<CaptivePortalService*>(
17 GetInstance()->GetServiceForProfile(profile, true));
20 // static
21 CaptivePortalServiceFactory* CaptivePortalServiceFactory::GetInstance() {
22 return Singleton<CaptivePortalServiceFactory>::get();
25 CaptivePortalServiceFactory::CaptivePortalServiceFactory()
26 : ProfileKeyedServiceFactory("CaptivePortalService",
27 ProfileDependencyManager::GetInstance()) {
30 CaptivePortalServiceFactory::~CaptivePortalServiceFactory() {
33 ProfileKeyedService* CaptivePortalServiceFactory::BuildServiceInstanceFor(
34 Profile* profile) const {
35 return new CaptivePortalService(profile);
38 bool CaptivePortalServiceFactory::ServiceHasOwnInstanceInIncognito() const {
39 return true;
42 } // namespace captive_portal