MD Downloads: UI review feedback
[chromium-blink-merge.git] / chrome / browser / permissions / permission_context_factory_base.cc
blobe9f6035653dbefed33f84a804fad398bccdab471
1 // Copyright 2015 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/permissions/permission_context_factory_base.h"
7 #include "chrome/browser/content_settings/host_content_settings_map_factory.h"
8 #include "chrome/browser/profiles/incognito_helpers.h"
9 #include "components/keyed_service/content/browser_context_dependency_manager.h"
10 #include "content/public/browser/browser_context.h"
12 PermissionContextFactoryBase::PermissionContextFactoryBase(
13 const char* name,
14 BrowserContextDependencyManager* manager)
15 : BrowserContextKeyedServiceFactory(name, manager) {
16 DependsOn(HostContentSettingsMapFactory::GetInstance());
19 PermissionContextFactoryBase::~PermissionContextFactoryBase() {
22 content::BrowserContext*
23 PermissionContextFactoryBase::GetBrowserContextToUse(
24 content::BrowserContext* context) const {
25 return chrome::GetBrowserContextOwnInstanceInIncognito(context);