OLD | NEW |
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/profiles/profile_keyed_service.h" | 13 #include "chrome/browser/profiles/profile_keyed_service.h" |
14 | 14 |
15 class Profile; | 15 class Profile; |
16 | 16 |
17 namespace policy { | 17 namespace policy { |
18 | 18 |
19 class CloudPolicySubsystem; | 19 class CloudPolicySubsystem; |
20 class UserPolicyIdentityStrategy; | 20 class UserPolicyIdentityStrategy; |
21 | 21 |
22 // This class is a container for the profile-specific policy bits located in the | 22 // This class is a container for the profile-specific policy bits located in the |
23 // profile. Since the subsystem owns the policy provider, it's vital that it | 23 // profile. Since the subsystem owns the policy provider, it's vital that it |
24 // gets initialized before the profile's prefs and destroyed after the prefs | 24 // gets initialized before the profile's prefs and destroyed after the prefs |
25 // are gone. | 25 // are gone. |
26 class ProfilePolicyConnector : public ProfileKeyedService { | 26 class ProfilePolicyConnector : public ProfileKeyedService { |
27 public: | 27 public: |
28 explicit ProfilePolicyConnector(Profile* profile); | 28 explicit ProfilePolicyConnector(Profile* profile); |
29 ~ProfilePolicyConnector(); | 29 virtual ~ProfilePolicyConnector(); |
30 | 30 |
31 // Schedules initialization of the policy backend service if the service is | 31 // Schedules initialization of the policy backend service if the service is |
32 // already constructed. | 32 // already constructed. |
33 void ScheduleServiceInitialization(int delay_milliseconds); | 33 void ScheduleServiceInitialization(int delay_milliseconds); |
34 | 34 |
35 // Initializes the context. Should be called only after the profile's request | 35 // Initializes the context. Should be called only after the profile's request |
36 // context is up. | 36 // context is up. |
37 void Initialize(); | 37 void Initialize(); |
38 | 38 |
39 // Shuts the context down. This must be called before the networking | 39 // Shuts the context down. This must be called before the networking |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 scoped_ptr<ConfigurationPolicyObserverRegistrar> profile_registrar_; | 93 scoped_ptr<ConfigurationPolicyObserverRegistrar> profile_registrar_; |
94 ObserverList<ConfigurationPolicyProvider::Observer, true> observer_list_; | 94 ObserverList<ConfigurationPolicyProvider::Observer, true> observer_list_; |
95 | 95 |
96 DISALLOW_COPY_AND_ASSIGN(MergingPolicyProvider); | 96 DISALLOW_COPY_AND_ASSIGN(MergingPolicyProvider); |
97 }; | 97 }; |
98 | 98 |
99 | 99 |
100 } // namespace policy | 100 } // namespace policy |
101 | 101 |
102 #endif // CHROME_BROWSER_POLICY_PROFILE_POLICY_CONNECTOR_H_ | 102 #endif // CHROME_BROWSER_POLICY_PROFILE_POLICY_CONNECTOR_H_ |
OLD | NEW |