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

Side by Side Diff: chrome/browser/policy/user_policy_signin_service_factory.h

Issue 12189011: Split up chrome/browser/policy subdirectory (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase, add chrome/browser/chromeos/policy/OWNERS Created 7 years, 9 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) 2012 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 #ifndef CHROME_BROWSER_POLICY_USER_POLICY_SIGNIN_SERVICE_FACTORY_H_
6 #define CHROME_BROWSER_POLICY_USER_POLICY_SIGNIN_SERVICE_FACTORY_H_
7
8 #include "base/memory/singleton.h"
9 #include "chrome/browser/profiles/profile_keyed_service_factory.h"
10
11 class PrefRegistrySyncable;
12
13 namespace policy {
14
15 class UserPolicySigninService;
16
17 // Singleton that owns all UserPolicySigninServices and creates/deletes them as
18 // new Profiles are created/shutdown.
19 class UserPolicySigninServiceFactory : public ProfileKeyedServiceFactory {
20 public:
21 // Returns an instance of the UserPolicySigninServiceFactory singleton.
22 static UserPolicySigninServiceFactory* GetInstance();
23
24 // Returns the instance of UserPolicySigninService for the passed |profile|.
25 // Used primarily for testing.
26 static UserPolicySigninService* GetForProfile(Profile* profile);
27
28 protected:
29 // ProfileKeyedServiceFactory implementation.
30 virtual ProfileKeyedService* BuildServiceInstanceFor(
31 Profile* profile) const OVERRIDE;
32
33 // Overridden to cause this object to be created when the profile is created.
34 virtual bool ServiceIsCreatedWithProfile() const OVERRIDE;
35
36 // Register the preferences related to cloud-based user policy.
37 virtual void RegisterUserPrefs(PrefRegistrySyncable* registry) OVERRIDE;
38
39 private:
40 friend struct DefaultSingletonTraits<UserPolicySigninServiceFactory>;
41
42 UserPolicySigninServiceFactory();
43 virtual ~UserPolicySigninServiceFactory();
44
45 DISALLOW_COPY_AND_ASSIGN(UserPolicySigninServiceFactory);
46 };
47
48 } // namespace policy
49
50 #endif // CHROME_BROWSER_POLICY_USER_POLICY_SIGNIN_SERVICE_FACTORY_H_
OLDNEW
« no previous file with comments | « chrome/browser/policy/user_policy_signin_service.cc ('k') | chrome/browser/policy/user_policy_signin_service_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698