| OLD | NEW |
| (Empty) |
| 1 When adding a new policy setting, please consider the following: | |
| 2 | |
| 3 - Ideally, your new policy should be expressing the intention of an | |
| 4 administrator and/or cover a well-scoped user-visible behavior of the | |
| 5 browser as opposed to an implementation-specific parameter. Consider | |
| 6 that your implementation may change in the future, and you might have | |
| 7 to re-implement your policy on top of the new feature implementation. | |
| 8 - Make sure your policy definition has proper supported_on declarations | |
| 9 specifying the platform and versions this policy is supported on. | |
| 10 - Make sure feature flags are correct. In particular: | |
| 11 - dynamic_refresh - whether your feature can adjust to changes in | |
| 12 policy at run time. You typically use PrefChangeRegistrar to do so. | |
| 13 - per_profile - whether your policy is browser-global or can be set | |
| 14 independently for each Chrome Profile. This is usually true if you | |
| 15 read the policy value from the Profile's PrefService and false if | |
| 16 you read it from the local_state PrefService. | |
| 17 - can_be_recommended - whether your feature supports admin-supplied | |
| 18 default values that the user can override. | |
| 19 - Make sure you put a helpful policy description: | |
| 20 - Describe the effect of setting the policy in a way that makes sense | |
| 21 to somebody who is not intimately familiar with your feature, such | |
| 22 as administrators and other Chromium developers. | |
| 23 - Do mention behavior for the cases where the policy gets ignored | |
| 24 (i.e. when not configured and for booleans where only one value is | |
| 25 effective). It's nice for completeness and admins have been asking | |
| 26 specifically for this piece of information in the past. | |
| 27 - Write a browser_test for you new policy. The ideal test would fire up | |
| 28 the browser with the policy set and check whether the policy affects | |
| 29 user-visible behavior in the intended way. See | |
| 30 chrome/browser/policy/policy_browsertest.cc for examples. | |
| 31 - If you're adding a device policy for Chrome OS, be sure to update | |
| 32 chrome/browser/chromeos/policy/device_policy_decoder_chromeos.{h,cc} | |
| 33 so the policy shows up on the chrome://policy page. | |
| OLD | NEW |