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

Side by Side Diff: chrome/browser/background_sync/background_sync_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 2016 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/background_sync/background_sync_permission_context_fact ory.h"
6
7 #include "chrome/browser/background_sync/background_sync_permission_context.h"
8 #include "chrome/browser/profiles/profile.h"
9 #include "components/keyed_service/content/browser_context_dependency_manager.h"
10
11 // static
12 BackgroundSyncPermissionContext*
13 BackgroundSyncPermissionContextFactory::GetForProfile(Profile* profile) {
14 return static_cast<BackgroundSyncPermissionContext*>(
15 GetInstance()->GetServiceForBrowserContext(profile, true /* create */));
16 }
17
18 // static
19 BackgroundSyncPermissionContextFactory*
20 BackgroundSyncPermissionContextFactory::GetInstance() {
21 return base::Singleton<BackgroundSyncPermissionContextFactory>::get();
22 }
23
24 BackgroundSyncPermissionContextFactory::BackgroundSyncPermissionContextFactory()
25 : PermissionContextFactoryBase(
26 "BackgroundSyncPermissionContext",
27 BrowserContextDependencyManager::GetInstance()) {}
28
29 KeyedService* BackgroundSyncPermissionContextFactory::BuildServiceInstanceFor(
30 content::BrowserContext* profile) const {
31 return new BackgroundSyncPermissionContext(static_cast<Profile*>(profile));
32 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698