Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(120)

Side by Side Diff: chrome/browser/media/protected_media_identifier_permission_context_factory.cc

Issue 1871343002: Remove PermissionContext factories (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2013 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.
4
5 #include "chrome/browser/media/protected_media_identifier_permission_context_fac tory.h"
6
7 #include "chrome/browser/media/protected_media_identifier_permission_context.h"
8 #include "chrome/browser/profiles/incognito_helpers.h"
9 #include "chrome/browser/profiles/profile.h"
10 #include "chrome/common/pref_names.h"
11 #include "components/keyed_service/content/browser_context_dependency_manager.h"
12 #include "components/pref_registry/pref_registry_syncable.h"
13
14 // static
15 ProtectedMediaIdentifierPermissionContext*
16 ProtectedMediaIdentifierPermissionContextFactory::GetForProfile(
17 Profile* profile) {
18 return static_cast<ProtectedMediaIdentifierPermissionContext*>(
19 GetInstance()->GetServiceForBrowserContext(profile, true));
20 }
21
22 // static
23 ProtectedMediaIdentifierPermissionContextFactory*
24 ProtectedMediaIdentifierPermissionContextFactory::GetInstance() {
25 return base::Singleton<
26 ProtectedMediaIdentifierPermissionContextFactory>::get();
27 }
28
29 ProtectedMediaIdentifierPermissionContextFactory::
30 ProtectedMediaIdentifierPermissionContextFactory()
31 : PermissionContextFactoryBase(
32 "ProtectedMediaIdentifierPermissionContext",
33 BrowserContextDependencyManager::GetInstance()) {
34 }
35
36 ProtectedMediaIdentifierPermissionContextFactory::
37 ~ProtectedMediaIdentifierPermissionContextFactory() {
38 }
39
40 KeyedService*
41 ProtectedMediaIdentifierPermissionContextFactory::BuildServiceInstanceFor(
42 content::BrowserContext* profile) const {
43 return new ProtectedMediaIdentifierPermissionContext(
44 static_cast<Profile*>(profile));
45 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698