OLD | NEW |
| (Empty) |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef CHROME_BROWSER_POLICY_USER_CLOUD_POLICY_STORE_BASE_H_ | |
6 #define CHROME_BROWSER_POLICY_USER_CLOUD_POLICY_STORE_BASE_H_ | |
7 | |
8 #include <string> | |
9 | |
10 #include "base/basictypes.h" | |
11 #include "base/memory/scoped_ptr.h" | |
12 #include "base/memory/weak_ptr.h" | |
13 #include "chrome/browser/policy/cloud_policy_store.h" | |
14 | |
15 namespace policy { | |
16 | |
17 // Base class that implements common cross-platform UserCloudPolicyStore | |
18 // functionality. | |
19 class UserCloudPolicyStoreBase : public CloudPolicyStore { | |
20 public: | |
21 UserCloudPolicyStoreBase(); | |
22 virtual ~UserCloudPolicyStoreBase(); | |
23 | |
24 protected: | |
25 // Creates a validator configured to validate a user policy. The caller owns | |
26 // the resulting object until StartValidation() is invoked. | |
27 scoped_ptr<UserCloudPolicyValidator> CreateValidator( | |
28 scoped_ptr<enterprise_management::PolicyFetchResponse> policy); | |
29 | |
30 // Sets |policy_data| and |payload| as the active policy. | |
31 void InstallPolicy( | |
32 scoped_ptr<enterprise_management::PolicyData> policy_data, | |
33 scoped_ptr<enterprise_management::CloudPolicySettings> payload); | |
34 | |
35 private: | |
36 DISALLOW_COPY_AND_ASSIGN(UserCloudPolicyStoreBase); | |
37 }; | |
38 | |
39 } // namespace policy | |
40 | |
41 #endif // CHROME_BROWSER_POLICY_USER_CLOUD_POLICY_STORE_BASE_H_ | |
OLD | NEW |