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/policy/profile_policy_connector_factory.cc

Issue 6979011: Move user cloud policy to BrowserProcess. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed comments by mnissler. Created 9 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 (c) 2011 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/policy/profile_policy_connector_factory.h"
6
7 #include "chrome/browser/policy/profile_policy_connector.h"
8 #include "chrome/browser/profiles/profile.h"
9 #include "chrome/browser/profiles/profile_dependency_manager.h"
10
11 namespace policy {
12
13 // static
14 ProfilePolicyConnector* ProfilePolicyConnectorFactory::GetForProfile(
15 Profile* profile) {
16 return static_cast<ProfilePolicyConnector*>(
17 GetInstance()->GetServiceForProfile(profile, true));
18 }
19
20 // static
21 ProfilePolicyConnectorFactory* ProfilePolicyConnectorFactory::GetInstance() {
22 return Singleton<ProfilePolicyConnectorFactory>::get();
23 }
24
25 ProfilePolicyConnectorFactory::ProfilePolicyConnectorFactory()
26 : ProfileKeyedServiceFactory(ProfileDependencyManager::GetInstance()) {
27 // TODO(jknotten):
28 // DependsOn(URLRequestContextGetterFactory::GetInstance());
29 // DependsOn(PrefServiceFactory::GetInstance());
30 // See comment in profile_policy_connector.h w.r.t. Shutdown()
31 }
32
33 ProfilePolicyConnectorFactory::~ProfilePolicyConnectorFactory() {
34 }
35
36 ProfileKeyedService* ProfilePolicyConnectorFactory::BuildServiceInstanceFor(
37 Profile* profile) const {
38 return new ProfilePolicyConnector(profile);
39 }
40
41 } // namespace policy
OLDNEW
« no previous file with comments | « chrome/browser/policy/profile_policy_connector_factory.h ('k') | chrome/browser/policy/profile_policy_connector_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698