| 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_VALIDATOR_H_ | 5 #ifndef CHROME_BROWSER_POLICY_CLOUD_POLICY_VALIDATOR_H_ |
| 6 #define CHROME_BROWSER_POLICY_CLOUD_POLICY_VALIDATOR_H_ | 6 #define CHROME_BROWSER_POLICY_CLOUD_POLICY_VALIDATOR_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| 11 #include "base/callback.h" | 11 #include "base/callback.h" |
| 12 #include "base/memory/ref_counted.h" | 12 #include "base/memory/ref_counted.h" |
| 13 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
| 14 #include "base/time.h" | 14 #include "base/time.h" |
| 15 #include "chrome/browser/policy/proto/chrome_device_policy.pb.h" | |
| 16 #include "chrome/browser/policy/proto/cloud_policy.pb.h" | |
| 17 | 15 |
| 18 namespace base { | 16 namespace base { |
| 19 class MessageLoopProxy; | 17 class MessageLoopProxy; |
| 20 } | 18 } |
| 21 | 19 |
| 22 namespace google { | 20 namespace google { |
| 23 namespace protobuf { | 21 namespace protobuf { |
| 24 class MessageLite; | 22 class MessageLite; |
| 25 } | 23 } |
| 26 } | 24 } |
| 27 | 25 |
| 28 namespace enterprise_management { | 26 namespace enterprise_management { |
| 27 class ChromeDeviceSettingsProto; |
| 28 class CloudPolicySettings; |
| 29 class PolicyData; | 29 class PolicyData; |
| 30 class PolicyFetchResponse; | 30 class PolicyFetchResponse; |
| 31 } | 31 } |
| 32 | 32 |
| 33 namespace policy { | 33 namespace policy { |
| 34 | 34 |
| 35 // Helper class that implements the gory details of validating a policy blob. | 35 // Helper class that implements the gory details of validating a policy blob. |
| 36 // Since signature checks are expensive, validation is happening on the FILE | 36 // Since signature checks are expensive, validation is happening on the FILE |
| 37 // thread. The pattern is to create a validator, configure its behavior through | 37 // thread. The pattern is to create a validator, configure its behavior through |
| 38 // the ValidateXYZ() functions, and then call StartValidation(). | 38 // the ValidateXYZ() functions, and then call StartValidation(). |
| (...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 216 }; | 216 }; |
| 217 | 217 |
| 218 typedef CloudPolicyValidator<enterprise_management::ChromeDeviceSettingsProto> | 218 typedef CloudPolicyValidator<enterprise_management::ChromeDeviceSettingsProto> |
| 219 DeviceCloudPolicyValidator; | 219 DeviceCloudPolicyValidator; |
| 220 typedef CloudPolicyValidator<enterprise_management::CloudPolicySettings> | 220 typedef CloudPolicyValidator<enterprise_management::CloudPolicySettings> |
| 221 UserCloudPolicyValidator; | 221 UserCloudPolicyValidator; |
| 222 | 222 |
| 223 } // namespace policy | 223 } // namespace policy |
| 224 | 224 |
| 225 #endif // CHROME_BROWSER_POLICY_CLOUD_POLICY_VALIDATOR_H_ | 225 #endif // CHROME_BROWSER_POLICY_CLOUD_POLICY_VALIDATOR_H_ |
| OLD | NEW |