summaryrefslogtreecommitdiffstats
path: root/chrome/browser/permissions/permission_context_factory_base.cc
blob: e9f6035653dbefed33f84a804fad398bccdab471 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// Copyright 2015 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "chrome/browser/permissions/permission_context_factory_base.h"

#include "chrome/browser/content_settings/host_content_settings_map_factory.h"
#include "chrome/browser/profiles/incognito_helpers.h"
#include "components/keyed_service/content/browser_context_dependency_manager.h"
#include "content/public/browser/browser_context.h"

PermissionContextFactoryBase::PermissionContextFactoryBase(
    const char* name,
    BrowserContextDependencyManager* manager)
    : BrowserContextKeyedServiceFactory(name, manager) {
  DependsOn(HostContentSettingsMapFactory::GetInstance());
}

PermissionContextFactoryBase::~PermissionContextFactoryBase() {
}

content::BrowserContext*
PermissionContextFactoryBase::GetBrowserContextToUse(
      content::BrowserContext* context) const {
  return chrome::GetBrowserContextOwnInstanceInIncognito(context);
}