Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright (c) 2010 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_PROFILE_POLICY_CONTEXT_H_ | |
| 6 #define CHROME_BROWSER_POLICY_PROFILE_POLICY_CONTEXT_H_ | |
| 7 #pragma once | |
| 8 | |
| 9 #include "base/scoped_ptr.h" | |
| 10 | |
| 11 class Profile; | |
| 12 | |
| 13 namespace policy { | |
| 14 | |
| 15 class DeviceManagementPolicyProvider; | |
| 16 class DeviceManagementService; | |
| 17 | |
| 18 // This class is a container for the profile-specific policy bits located in the | |
| 19 // profile. Since the context owns the policy provider, it's vital that it gets | |
| 20 // initialized before the profile's prefs and destroyed after the prefs are | |
| 21 // gone. | |
|
Nico
2010/11/22 11:06:06
The comments on |Initialize()| and |Shutdown()| su
Mattias Nissler (ping if slow)
2010/11/22 12:35:39
No, actually the comment is correct. The ProfilePo
Nico
2010/11/22 12:40:16
Ah! I mixed up the profile's pref and the profile
| |
| 22 class ProfilePolicyContext { | |
| 23 public: | |
| 24 explicit ProfilePolicyContext(Profile* profile); | |
| 25 ~ProfilePolicyContext(); | |
| 26 | |
| 27 // Initializes the context. Should be called only after the profile's request | |
| 28 // context is up. | |
| 29 void Initialize(); | |
| 30 | |
| 31 // Shuts the context down. This must be called before the networking | |
| 32 // infrastructure in the profile goes away. | |
| 33 void Shutdown(); | |
| 34 | |
| 35 // Get the policy provider. | |
| 36 DeviceManagementPolicyProvider* GetDeviceManagementPolicyProvider(); | |
| 37 | |
| 38 private: | |
| 39 // The profile this context is associated with. | |
| 40 Profile* profile_; | |
| 41 | |
| 42 // The device management service. | |
| 43 scoped_ptr<DeviceManagementService> device_management_service_; | |
|
Nico
2010/11/22 11:06:06
No getter for this guy?
Mattias Nissler (ping if slow)
2010/11/22 12:35:39
Not needed at the moment. GetDeviceManagementPolic
| |
| 44 | |
| 45 // Our provider. | |
| 46 scoped_ptr<DeviceManagementPolicyProvider> device_management_policy_provider_; | |
| 47 }; | |
| 48 | |
| 49 } // namespace policy | |
| 50 | |
| 51 #endif // CHROME_BROWSER_POLICY_PROFILE_POLICY_CONTEXT_H_ | |
| OLD | NEW |