NetworkIsolationKey:  Add code to convert from/to a base::Value.

Opaque origins cannot be converted to base::Values, but empty keys and
fully populated ones can be.

This allows saving to/loading data from a JSON-formatted file,
regardless of whether NetworkIsolationKeys are enabled (And covers
internal consumers that aren't using them), and also allows using
opaque origins as keys in the in-memory cache, but not writing
them to disk.

Bug: 969890
Change-Id: I49809a609a70251c8de583f8651a2b303e6b21e7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1737070
Reviewed-by: Shivani Sharma <shivanisha@chromium.org>
Reviewed-by: Josh Karlin <jkarlin@chromium.org>
Commit-Queue: Matt Menke <mmenke@chromium.org>
Cr-Commit-Position: refs/heads/master@{#684550}
3 files changed