| 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_POLICY_BUILDER_H_ | 5 #ifndef CHROME_BROWSER_POLICY_POLICY_BUILDER_H_ |
| 6 #define CHROME_BROWSER_POLICY_POLICY_BUILDER_H_ | 6 #define CHROME_BROWSER_POLICY_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/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
| 13 #include "chrome/browser/policy/proto/chrome_device_policy.pb.h" | |
| 14 #include "chrome/browser/policy/proto/cloud_policy.pb.h" | 13 #include "chrome/browser/policy/proto/cloud_policy.pb.h" |
| 15 #include "chrome/browser/policy/proto/device_management_local.pb.h" | 14 #include "chrome/browser/policy/proto/device_management_local.pb.h" |
| 16 #include "crypto/rsa_private_key.h" | 15 #include "crypto/rsa_private_key.h" |
| 17 | 16 |
| 17 namespace enterprise_management { |
| 18 class ChromeDeviceSettingsProto; |
| 19 } // namespace enterprise_management |
| 20 |
| 18 namespace policy { | 21 namespace policy { |
| 19 | 22 |
| 20 // A helper class for testing that provides a straightforward interface for | 23 // A helper class for testing that provides a straightforward interface for |
| 21 // constructing policy blobs for use in testing. NB: This uses fake data and | 24 // constructing policy blobs for use in testing. NB: This uses fake data and |
| 22 // hard-coded signing keys by default, so should not be used in production code. | 25 // hard-coded signing keys by default, so should not be used in production code. |
| 23 class PolicyBuilder { | 26 class PolicyBuilder { |
| 24 public: | 27 public: |
| 25 // Constants used as dummy data for filling the PolicyData protobuf. | 28 // Constants used as dummy data for filling the PolicyData protobuf. |
| 26 static const char kFakeDeviceId[]; | 29 static const char kFakeDeviceId[]; |
| 27 static const char kFakeDomain[]; | 30 static const char kFakeDomain[]; |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 123 }; | 126 }; |
| 124 | 127 |
| 125 typedef TypedPolicyBuilder<enterprise_management::CloudPolicySettings> | 128 typedef TypedPolicyBuilder<enterprise_management::CloudPolicySettings> |
| 126 UserPolicyBuilder; | 129 UserPolicyBuilder; |
| 127 typedef TypedPolicyBuilder<enterprise_management::ChromeDeviceSettingsProto> | 130 typedef TypedPolicyBuilder<enterprise_management::ChromeDeviceSettingsProto> |
| 128 DevicePolicyBuilder; | 131 DevicePolicyBuilder; |
| 129 | 132 |
| 130 } // namespace policy | 133 } // namespace policy |
| 131 | 134 |
| 132 #endif // CHROME_BROWSER_POLICY_POLICY_BUILDER_H_ | 135 #endif // CHROME_BROWSER_POLICY_POLICY_BUILDER_H_ |
| OLD | NEW |