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_CLOUD_USER_CLOUD_POLICY_MANAGER_H_ | 5 #ifndef CHROME_BROWSER_POLICY_CLOUD_USER_CLOUD_POLICY_MANAGER_H_ |
6 #define CHROME_BROWSER_POLICY_CLOUD_USER_CLOUD_POLICY_MANAGER_H_ | 6 #define CHROME_BROWSER_POLICY_CLOUD_USER_CLOUD_POLICY_MANAGER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
11 #include "base/compiler_specific.h" | 11 #include "base/compiler_specific.h" |
12 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
13 #include "chrome/browser/policy/cloud/cloud_policy_manager.h" | 13 #include "chrome/browser/policy/cloud/cloud_policy_manager.h" |
14 #include "components/browser_context_keyed_service/browser_context_keyed_service
.h" | 14 #include "components/browser_context_keyed_service/browser_context_keyed_service
.h" |
15 | 15 |
16 class PrefService; | 16 class PrefService; |
17 class Profile; | 17 class Profile; |
18 | 18 |
19 namespace policy { | 19 namespace policy { |
20 | 20 |
21 class DeviceManagementService; | 21 class DeviceManagementService; |
22 class UserCloudPolicyStore; | 22 class UserCloudPolicyStore; |
23 | 23 |
24 // UserCloudPolicyManager handles initialization of user policy for Chrome | 24 // UserCloudPolicyManager handles initialization of user policy for Chrome |
25 // Profiles on the desktop platforms. | 25 // Profiles on the desktop platforms. |
26 class UserCloudPolicyManager : public CloudPolicyManager, | 26 class UserCloudPolicyManager : public CloudPolicyManager, |
27 public ProfileKeyedService { | 27 public BrowserContextKeyedService { |
28 public: | 28 public: |
29 UserCloudPolicyManager(Profile* profile, | 29 UserCloudPolicyManager(Profile* profile, |
30 scoped_ptr<UserCloudPolicyStore> store); | 30 scoped_ptr<UserCloudPolicyStore> store); |
31 virtual ~UserCloudPolicyManager(); | 31 virtual ~UserCloudPolicyManager(); |
32 | 32 |
33 // Initializes the cloud connection. |local_state| and | 33 // Initializes the cloud connection. |local_state| and |
34 // |device_management_service| must stay valid until this object is deleted or | 34 // |device_management_service| must stay valid until this object is deleted or |
35 // DisconnectAndRemovePolicy() gets called. Virtual for mocking. | 35 // DisconnectAndRemovePolicy() gets called. Virtual for mocking. |
36 virtual void Connect(PrefService* local_state, | 36 virtual void Connect(PrefService* local_state, |
37 scoped_ptr<CloudPolicyClient> client); | 37 scoped_ptr<CloudPolicyClient> client); |
(...skipping 25 matching lines...) Expand all Loading... |
63 // Typed pointer to the store owned by UserCloudPolicyManager. Note that | 63 // Typed pointer to the store owned by UserCloudPolicyManager. Note that |
64 // CloudPolicyManager only keeps a plain CloudPolicyStore pointer. | 64 // CloudPolicyManager only keeps a plain CloudPolicyStore pointer. |
65 scoped_ptr<UserCloudPolicyStore> store_; | 65 scoped_ptr<UserCloudPolicyStore> store_; |
66 | 66 |
67 DISALLOW_COPY_AND_ASSIGN(UserCloudPolicyManager); | 67 DISALLOW_COPY_AND_ASSIGN(UserCloudPolicyManager); |
68 }; | 68 }; |
69 | 69 |
70 } // namespace policy | 70 } // namespace policy |
71 | 71 |
72 #endif // CHROME_BROWSER_POLICY_CLOUD_USER_CLOUD_POLICY_MANAGER_H_ | 72 #endif // CHROME_BROWSER_POLICY_CLOUD_USER_CLOUD_POLICY_MANAGER_H_ |
OLD | NEW |