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

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

Issue 7233006: Store/Retrieve CrOS user policy in session_manager. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 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 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_PROFILE_POLICY_CONNECTOR_H_ 5 #ifndef CHROME_BROWSER_POLICY_PROFILE_POLICY_CONNECTOR_H_
6 #define CHROME_BROWSER_POLICY_PROFILE_POLICY_CONNECTOR_H_ 6 #define CHROME_BROWSER_POLICY_PROFILE_POLICY_CONNECTOR_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
11 #include "base/observer_list.h" 11 #include "base/observer_list.h"
12 #include "chrome/browser/policy/configuration_policy_provider.h" 12 #include "chrome/browser/policy/configuration_policy_provider.h"
13 #include "chrome/browser/prefs/pref_change_registrar.h" 13 #include "chrome/browser/prefs/pref_change_registrar.h"
14 #include "chrome/browser/profiles/profile_keyed_service.h" 14 #include "chrome/browser/profiles/profile_keyed_service.h"
15 15
16 class Profile; 16 class Profile;
17 17
18 namespace policy { 18 namespace policy {
19 19
20 class CloudPolicyIdentityStrategy;
20 class CloudPolicySubsystem; 21 class CloudPolicySubsystem;
21 class UserPolicyIdentityStrategy;
22 22
23 // This class is a container for the profile-specific policy bits located in the 23 // This class is a container for the profile-specific policy bits located in the
24 // profile. Since the subsystem owns the policy provider, it's vital that it 24 // profile. Since the subsystem owns the policy provider, it's vital that it
25 // gets initialized before the profile's prefs and destroyed after the prefs 25 // gets initialized before the profile's prefs and destroyed after the prefs
26 // are gone. 26 // are gone.
27 class ProfilePolicyConnector : public ProfileKeyedService { 27 class ProfilePolicyConnector : public ProfileKeyedService {
28 public: 28 public:
29 explicit ProfilePolicyConnector(Profile* profile); 29 explicit ProfilePolicyConnector(Profile* profile);
30 virtual ~ProfilePolicyConnector(); 30 virtual ~ProfilePolicyConnector();
31 31
(...skipping 12 matching lines...) Expand all
44 // ensure that it is dependent on the right services. See comment 44 // ensure that it is dependent on the right services. See comment
45 // in ProfilePolicyConnectorFactory::ProfilePolicyConnectorFactory. 45 // in ProfilePolicyConnectorFactory::ProfilePolicyConnectorFactory.
46 virtual void Shutdown() OVERRIDE; 46 virtual void Shutdown() OVERRIDE;
47 47
48 ConfigurationPolicyProvider* GetManagedCloudProvider(); 48 ConfigurationPolicyProvider* GetManagedCloudProvider();
49 ConfigurationPolicyProvider* GetRecommendedCloudProvider(); 49 ConfigurationPolicyProvider* GetRecommendedCloudProvider();
50 50
51 private: 51 private:
52 Profile* profile_; 52 Profile* profile_;
53 53
54 scoped_ptr<UserPolicyIdentityStrategy> identity_strategy_; 54 scoped_ptr<CloudPolicyIdentityStrategy> identity_strategy_;
55 scoped_ptr<CloudPolicySubsystem> cloud_policy_subsystem_; 55 scoped_ptr<CloudPolicySubsystem> cloud_policy_subsystem_;
56 56
57 scoped_ptr<ConfigurationPolicyProvider> managed_cloud_provider_; 57 scoped_ptr<ConfigurationPolicyProvider> managed_cloud_provider_;
58 scoped_ptr<ConfigurationPolicyProvider> recommended_cloud_provider_; 58 scoped_ptr<ConfigurationPolicyProvider> recommended_cloud_provider_;
59 59
60 // Temporarily needed until we can serve user policy to local state. 60 // Temporarily needed until we can serve user policy to local state.
61 PrefChangeRegistrar profile_pref_registrar_; 61 PrefChangeRegistrar profile_pref_registrar_;
62 62
63 DISALLOW_COPY_AND_ASSIGN(ProfilePolicyConnector); 63 DISALLOW_COPY_AND_ASSIGN(ProfilePolicyConnector);
64 }; 64 };
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 scoped_ptr<ConfigurationPolicyObserverRegistrar> profile_registrar_; 97 scoped_ptr<ConfigurationPolicyObserverRegistrar> profile_registrar_;
98 ObserverList<ConfigurationPolicyProvider::Observer, true> observer_list_; 98 ObserverList<ConfigurationPolicyProvider::Observer, true> observer_list_;
99 99
100 DISALLOW_COPY_AND_ASSIGN(MergingPolicyProvider); 100 DISALLOW_COPY_AND_ASSIGN(MergingPolicyProvider);
101 }; 101 };
102 102
103 103
104 } // namespace policy 104 } // namespace policy
105 105
106 #endif // CHROME_BROWSER_POLICY_PROFILE_POLICY_CONNECTOR_H_ 106 #endif // CHROME_BROWSER_POLICY_PROFILE_POLICY_CONNECTOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698