Allow extension policy to specify sensitive values

Allow extension policy schemas to specify "sensitiveValue": true, which
hides the policy value from the chrome://policy UI, from policy exports
and from being sent as part of enterprise reporting.
The "sensitiveValue": true annotation can be placed on any level in the
schema declaration. An example extension storage schema may be:
{
  "type": "object",
  "properties": {
    "VisibleStringPolicy": {
      "type": "string"
    },
    "SensitiveStringPolicy": {
      "type": "string",
      "sensitiveValue": true
    },
    "VisibleDictPolicy": {
      "type": "object",
      "properties": {
        "some_bool": { "type": "boolean" },
        "some_string": { "type": "boolean" }
      }
    }
    "SensitiveDictPolicy": {
      "type": "object",
      "properties": {
        "some_bool": { "type": "boolean" },
        "some_string": { "type": "boolean" }
      },
      "sensitiveValue": true
    }
  }
}
In this case, the values of VisibleStringPolicy and VisibleDictPolicy
will be displayed on chrome://policy. The values of
SensitiveStringPolicy and SensitiveDictPolicy will be replaced with the
masking string "********"".

      browser_tests --gtest_filter=*PolicyUITest*

Test: components_unittests --gtest_filter=*Schema* && \
Bug: 849657
Change-Id: I07fc5f30945dccd05f5ccb8f8d071e25b4105c79
Reviewed-on: https://chromium-review.googlesource.com/1140301
Reviewed-by: Steven Bennetts <stevenjb@chromium.org>
Reviewed-by: Lutz Justen <ljusten@chromium.org>
Reviewed-by: Maksim Ivanov <emaxx@chromium.org>
Commit-Queue: Pavol Marko <pmarko@chromium.org>
Cr-Commit-Position: refs/heads/master@{#578367}
7 files changed