Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2013 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 COMPONENTS_POLICY_CORE_COMMON_POLICY_DETAILS_H_ | |
| 6 #define COMPONENTS_POLICY_CORE_COMMON_POLICY_DETAILS_H_ | |
| 7 | |
| 8 #include <string> | |
| 9 | |
| 10 #include "base/callback_forward.h" | |
| 11 #include "components/policy/policy_export.h" | |
| 12 | |
| 13 namespace policy { | |
| 14 | |
| 15 // Contains read-only metadata about a Chrome policy. | |
| 16 struct POLICY_EXPORT PolicyDetails { | |
| 17 // True if this policy has been deprecated. | |
| 18 bool is_deprecated; | |
| 19 | |
| 20 // True if this policy is a ChromeOS device policy. | |
|
bartfab (slow)
2013/11/05 18:18:33
Nit: s/ChromeOS/Chrome OS/
Joao da Silva
2013/11/07 20:27:27
Done.
| |
| 21 bool is_device_policy; | |
| 22 | |
| 23 // The id of the protobuf field that contains this policy, | |
| 24 // in the cloud policy protobuf. | |
| 25 int id; | |
|
bartfab (slow)
2013/11/05 18:18:33
Do we ever use this for anything?
Joao da Silva
2013/11/07 20:27:27
It's what the PolicyStatisticsCollector samples fo
| |
| 26 | |
| 27 // If this policy references external data to be downloaded then | |
|
bartfab (slow)
2013/11/05 18:18:33
Could you drop the part "to be downloaded"? As Mat
Joao da Silva
2013/11/07 20:27:27
Done.
| |
| 28 // this is the maximum size allowed for that external data. | |
| 29 // Otherwise this field is 0 and doesn't have any meaning. | |
| 30 size_t max_external_data_size; | |
|
bartfab (slow)
2013/11/05 18:18:33
Nit: #include "base/basictypes.h"
Joao da Silva
2013/11/07 20:27:27
Done.
| |
| 31 }; | |
| 32 | |
| 33 // A typedef for functions that match the signature of | |
| 34 // GetChromePolicyDetails(). This can be used to inject that | |
| 35 // function into objects, so that it can be easily mocked for | |
|
bartfab (slow)
2013/11/05 18:18:33
Nice mocking mechanism.
Joao da Silva
2013/11/07 20:27:27
Daniel and I have remarked how the component refac
| |
| 36 // tests. | |
| 37 typedef base::Callback<const PolicyDetails*(const std::string&)> | |
| 38 GetChromePolicyDetailsCallback; | |
| 39 | |
| 40 } // namespace policy | |
| 41 | |
| 42 #endif // COMPONENTS_POLICY_CORE_COMMON_POLICY_DETAILS_H_ | |
| OLD | NEW |