OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_BROWSER_POLICY_USER_POLICY_SIGNIN_SERVICE_FACTORY_H_ | 5 #ifndef CHROME_BROWSER_POLICY_USER_POLICY_SIGNIN_SERVICE_FACTORY_H_ |
6 #define CHROME_BROWSER_POLICY_USER_POLICY_SIGNIN_SERVICE_FACTORY_H_ | 6 #define CHROME_BROWSER_POLICY_USER_POLICY_SIGNIN_SERVICE_FACTORY_H_ |
7 | 7 |
8 #include "base/memory/singleton.h" | 8 #include "base/memory/singleton.h" |
9 #include "chrome/browser/profiles/profile_keyed_service_factory.h" | 9 #include "chrome/browser/profiles/profile_keyed_service_factory.h" |
10 | 10 |
(...skipping 11 matching lines...) Expand all Loading... |
22 // Returns the instance of UserPolicySigninService for the passed |profile|. | 22 // Returns the instance of UserPolicySigninService for the passed |profile|. |
23 // Used primarily for testing. | 23 // Used primarily for testing. |
24 static UserPolicySigninService* GetForProfile(Profile* profile); | 24 static UserPolicySigninService* GetForProfile(Profile* profile); |
25 | 25 |
26 protected: | 26 protected: |
27 // ProfileKeyedServiceFactory implementation. | 27 // ProfileKeyedServiceFactory implementation. |
28 virtual ProfileKeyedService* BuildServiceInstanceFor( | 28 virtual ProfileKeyedService* BuildServiceInstanceFor( |
29 Profile* profile) const OVERRIDE; | 29 Profile* profile) const OVERRIDE; |
30 | 30 |
31 // Overridden to cause this object to be created when the profile is created. | 31 // Overridden to cause this object to be created when the profile is created. |
32 virtual bool ServiceIsCreatedWithProfile() OVERRIDE; | 32 virtual bool ServiceIsCreatedWithProfile() const OVERRIDE; |
33 | 33 |
34 // Register the preferences related to cloud-based user policy. | 34 // Register the preferences related to cloud-based user policy. |
35 virtual void RegisterUserPrefs(PrefService* user_prefs) OVERRIDE; | 35 virtual void RegisterUserPrefs(PrefService* user_prefs) OVERRIDE; |
36 | 36 |
37 private: | 37 private: |
38 friend struct DefaultSingletonTraits<UserPolicySigninServiceFactory>; | 38 friend struct DefaultSingletonTraits<UserPolicySigninServiceFactory>; |
39 | 39 |
40 UserPolicySigninServiceFactory(); | 40 UserPolicySigninServiceFactory(); |
41 virtual ~UserPolicySigninServiceFactory(); | 41 virtual ~UserPolicySigninServiceFactory(); |
42 | 42 |
43 DISALLOW_COPY_AND_ASSIGN(UserPolicySigninServiceFactory); | 43 DISALLOW_COPY_AND_ASSIGN(UserPolicySigninServiceFactory); |
44 }; | 44 }; |
45 | 45 |
46 } // namespace policy | 46 } // namespace policy |
47 | 47 |
48 #endif // CHROME_BROWSER_POLICY_USER_POLICY_SIGNIN_SERVICE_FACTORY_H_ | 48 #endif // CHROME_BROWSER_POLICY_USER_POLICY_SIGNIN_SERVICE_FACTORY_H_ |
OLD | NEW |