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_POLICY_BUILDER_H_ | 5 #ifndef CHROME_BROWSER_POLICY_CLOUD_POLICY_BUILDER_H_ |
6 #define CHROME_BROWSER_POLICY_CLOUD_POLICY_BUILDER_H_ | 6 #define CHROME_BROWSER_POLICY_CLOUD_POLICY_BUILDER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 17 matching lines...) Expand all Loading... |
28 public: | 28 public: |
29 // Constants used as dummy data for filling the PolicyData protobuf. | 29 // Constants used as dummy data for filling the PolicyData protobuf. |
30 static const char kFakeDeviceId[]; | 30 static const char kFakeDeviceId[]; |
31 static const char kFakeDomain[]; | 31 static const char kFakeDomain[]; |
32 static const char kFakeMachineName[]; | 32 static const char kFakeMachineName[]; |
33 static const char kFakePolicyType[]; | 33 static const char kFakePolicyType[]; |
34 static const int kFakePublicKeyVersion; | 34 static const int kFakePublicKeyVersion; |
35 static const int64 kFakeTimestamp; | 35 static const int64 kFakeTimestamp; |
36 static const char kFakeToken[]; | 36 static const char kFakeToken[]; |
37 static const char kFakeUsername[]; | 37 static const char kFakeUsername[]; |
| 38 static const char kFakeServiceAccountIdentity[]; |
38 | 39 |
39 // Creates a policy builder. The builder will have all PolicyData fields | 40 // Creates a policy builder. The builder will have all PolicyData fields |
40 // initialized to dummy values and use the test signing keys. | 41 // initialized to dummy values and use the test signing keys. |
41 PolicyBuilder(); | 42 PolicyBuilder(); |
42 virtual ~PolicyBuilder(); | 43 virtual ~PolicyBuilder(); |
43 | 44 |
44 // Use this member to access the PolicyData protobuf. | 45 // Use this member to access the PolicyData protobuf. |
45 enterprise_management::PolicyData& policy_data() { | 46 enterprise_management::PolicyData& policy_data() { |
46 if (!policy_data_.get()) | 47 if (!policy_data_.get()) |
47 policy_data_.reset(new enterprise_management::PolicyData()); | 48 policy_data_.reset(new enterprise_management::PolicyData()); |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
132 }; | 133 }; |
133 | 134 |
134 typedef TypedPolicyBuilder<enterprise_management::CloudPolicySettings> | 135 typedef TypedPolicyBuilder<enterprise_management::CloudPolicySettings> |
135 UserPolicyBuilder; | 136 UserPolicyBuilder; |
136 typedef TypedPolicyBuilder<enterprise_management::ExternalPolicyData> | 137 typedef TypedPolicyBuilder<enterprise_management::ExternalPolicyData> |
137 ComponentPolicyBuilder; | 138 ComponentPolicyBuilder; |
138 | 139 |
139 } // namespace policy | 140 } // namespace policy |
140 | 141 |
141 #endif // CHROME_BROWSER_POLICY_CLOUD_POLICY_BUILDER_H_ | 142 #endif // CHROME_BROWSER_POLICY_CLOUD_POLICY_BUILDER_H_ |
OLD | NEW |