Print Preview: Changing displayed error message when PDF Viewer is missing.
[chromium-blink-merge.git] / chrome / browser / background_contents_service_factory.cc
blob51712011045060b2d2e3df72105e0c18d24e50f4
1 // Copyright (c) 2011 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/background_contents_service_factory.h"
7 #include "base/command_line.h"
8 #include "chrome/browser/background_contents_service.h"
9 #include "chrome/browser/profiles/profile.h"
10 #include "chrome/browser/profiles/profile_dependency_manager.h"
12 // static
13 BackgroundContentsService* BackgroundContentsServiceFactory::GetForProfile(
14 Profile* profile) {
15 return static_cast<BackgroundContentsService*>(
16 GetInstance()->GetServiceForProfile(profile, true));
19 // static
20 BackgroundContentsServiceFactory* BackgroundContentsServiceFactory::
21 GetInstance() {
22 return Singleton<BackgroundContentsServiceFactory>::get();
25 BackgroundContentsServiceFactory::BackgroundContentsServiceFactory()
26 : ProfileKeyedServiceFactory(ProfileDependencyManager::GetInstance()) {
29 BackgroundContentsServiceFactory::~BackgroundContentsServiceFactory() {
32 ProfileKeyedService* BackgroundContentsServiceFactory::BuildServiceInstanceFor(
33 Profile* profile) const {
34 return new BackgroundContentsService(profile,
35 CommandLine::ForCurrentProcess());
38 bool BackgroundContentsServiceFactory::ServiceHasOwnInstanceInIncognito() {
39 return true;