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 COMPONENTS_POLICY_CORE_COMMON_CLOUD_POLICY_BUILDER_H_ | 5 #ifndef COMPONENTS_POLICY_CORE_COMMON_CLOUD_POLICY_BUILDER_H_ |
6 #define COMPONENTS_POLICY_CORE_COMMON_CLOUD_POLICY_BUILDER_H_ | 6 #define COMPONENTS_POLICY_CORE_COMMON_CLOUD_POLICY_BUILDER_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/logging.h" | 12 #include "base/logging.h" |
13 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
14 #include "crypto/rsa_private_key.h" | 14 #include "crypto/rsa_private_key.h" |
15 #include "policy/proto/cloud_policy.pb.h" | 15 #include "policy/proto/cloud_policy.pb.h" |
16 #include "policy/proto/device_management_backend.pb.h" | 16 #include "policy/proto/device_management_backend.pb.h" |
17 | 17 |
18 #if !defined(OS_ANDROID) | 18 #if !defined(OS_ANDROID) && !defined(OS_IOS) |
19 #include "policy/proto/chrome_extension_policy.pb.h" | 19 #include "policy/proto/chrome_extension_policy.pb.h" |
20 #endif | 20 #endif |
21 | 21 |
22 namespace policy { | 22 namespace policy { |
23 | 23 |
24 // A helper class for testing that provides a straightforward interface for | 24 // A helper class for testing that provides a straightforward interface for |
25 // constructing policy blobs for use in testing. NB: This uses fake data and | 25 // constructing policy blobs for use in testing. NB: This uses fake data and |
26 // hard-coded signing keys by default, so should not be used in production code. | 26 // hard-coded signing keys by default, so should not be used in production code. |
27 class PolicyBuilder { | 27 class PolicyBuilder { |
28 public: | 28 public: |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
129 | 129 |
130 private: | 130 private: |
131 scoped_ptr<PayloadProto> payload_; | 131 scoped_ptr<PayloadProto> payload_; |
132 | 132 |
133 DISALLOW_COPY_AND_ASSIGN(TypedPolicyBuilder); | 133 DISALLOW_COPY_AND_ASSIGN(TypedPolicyBuilder); |
134 }; | 134 }; |
135 | 135 |
136 typedef TypedPolicyBuilder<enterprise_management::CloudPolicySettings> | 136 typedef TypedPolicyBuilder<enterprise_management::CloudPolicySettings> |
137 UserPolicyBuilder; | 137 UserPolicyBuilder; |
138 | 138 |
139 #if !defined(OS_ANDROID) | 139 #if !defined(OS_ANDROID) && !defined(OS_IOS) |
140 typedef TypedPolicyBuilder<enterprise_management::ExternalPolicyData> | 140 typedef TypedPolicyBuilder<enterprise_management::ExternalPolicyData> |
141 ComponentPolicyBuilder; | 141 ComponentPolicyBuilder; |
142 #endif | 142 #endif |
143 | 143 |
144 } // namespace policy | 144 } // namespace policy |
145 | 145 |
146 #endif // COMPONENTS_POLICY_CORE_COMMON_CLOUD_POLICY_BUILDER_H_ | 146 #endif // COMPONENTS_POLICY_CORE_COMMON_CLOUD_POLICY_BUILDER_H_ |
OLD | NEW |