summaryrefslogtreecommitdiffstats
path: root/chromeos/network/onc/onc_utils.h
diff options
context:
space:
mode:
authorpneubeck@chromium.org <pneubeck@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-04-04 22:53:06 +0000
committerpneubeck@chromium.org <pneubeck@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-04-04 22:53:06 +0000
commitfbd6cf126ebe9614849a3a8a0f4d407edc056343 (patch)
treeb554d8df05af361b692eb3c3a327847d940bde3a /chromeos/network/onc/onc_utils.h
parent42d5b58b97ba863466689eaa9d29bf136e010529 (diff)
downloadchromium_src-fbd6cf126ebe9614849a3a8a0f4d407edc056343.zip
chromium_src-fbd6cf126ebe9614849a3a8a0f4d407edc056343.tar.gz
chromium_src-fbd6cf126ebe9614849a3a8a0f4d407edc056343.tar.bz2
This is a refactoring that moves the list of credential fields of ONC from NetworkConfigurationPolicyHandler to chromeos/signature.h.
This allows to use the same list of sensitive fields e.g. for sanitization before exposing network configurations through the networking extension API. BUG=NONE Review URL: https://chromiumcodereview.appspot.com/13194003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@192401 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chromeos/network/onc/onc_utils.h')
-rw-r--r--chromeos/network/onc/onc_utils.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/chromeos/network/onc/onc_utils.h b/chromeos/network/onc/onc_utils.h
index 61ab3a4..c431466 100644
--- a/chromeos/network/onc/onc_utils.h
+++ b/chromeos/network/onc/onc_utils.h
@@ -64,6 +64,14 @@ CHROMEOS_EXPORT void ExpandStringsInOncObject(
const StringSubstitution& substitution,
base::DictionaryValue* onc_object);
+// Creates a copy of |onc_object| with all values of sensitive fields replaced
+// by |mask|. To find sensitive fields, signature and field name are checked
+// with the function FieldIsCredential().
+CHROMEOS_EXPORT scoped_ptr<base::DictionaryValue> MaskCredentialsInOncObject(
+ const onc::OncValueSignature& signature,
+ const base::DictionaryValue& onc_object,
+ const std::string& mask);
+
} // namespace onc
} // namespace chromeos