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

Side by Side Diff: chrome/browser/managed_mode/managed_user_settings_service_factory.cc

Issue 335833003: Rename "managed (mode|user)" to "supervised user" (part 2) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review comments (+ a few other cleanups) Created 6 years, 6 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 | Annotate | Revision Log
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/managed_mode/managed_user_settings_service_factory.h"
6
7 #include "chrome/browser/managed_mode/managed_user_settings_service.h"
8 #include "chrome/browser/profiles/incognito_helpers.h"
9 #include "chrome/browser/profiles/profile.h"
10 #include "components/keyed_service/content/browser_context_dependency_manager.h"
11
12 // static
13 ManagedUserSettingsService*
14 ManagedUserSettingsServiceFactory::GetForProfile(Profile* profile) {
15 return static_cast<ManagedUserSettingsService*>(
16 GetInstance()->GetServiceForBrowserContext(profile, true));
17 }
18
19 // static
20 ManagedUserSettingsServiceFactory*
21 ManagedUserSettingsServiceFactory::GetInstance() {
22 return Singleton<ManagedUserSettingsServiceFactory>::get();
23 }
24
25 ManagedUserSettingsServiceFactory::ManagedUserSettingsServiceFactory()
26 : BrowserContextKeyedServiceFactory(
27 "ManagedUserSettingsService",
28 BrowserContextDependencyManager::GetInstance()) {
29 }
30
31 ManagedUserSettingsServiceFactory::
32 ~ManagedUserSettingsServiceFactory() {}
33
34 KeyedService* ManagedUserSettingsServiceFactory::BuildServiceInstanceFor(
35 content::BrowserContext* profile) const {
36 return new ManagedUserSettingsService();
37 }
38
39 content::BrowserContext*
40 ManagedUserSettingsServiceFactory::GetBrowserContextToUse(
41 content::BrowserContext* context) const {
42 return chrome::GetBrowserContextRedirectedInIncognito(context);
43 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698