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

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

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

Powered by Google App Engine
This is Rietveld 408576698