Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(142)

Unified Diff: chromeos/network/managed_network_configuration_handler_impl.cc

Issue 2828713002: Enable client certificate patterns in device ONC policy (Closed)
Patch Set: Addressed comments - more DCHECKs, use PostTask..WithReply in client_cert_resolver.cc. Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chromeos/network/managed_network_configuration_handler_impl.cc
diff --git a/chromeos/network/managed_network_configuration_handler_impl.cc b/chromeos/network/managed_network_configuration_handler_impl.cc
index 8ada86f35ce871ea9c857f0f00718c159f95b5b4..6f820f2b19dcac971764c76a8212e5e13023c52a 100644
--- a/chromeos/network/managed_network_configuration_handler_impl.cc
+++ b/chromeos/network/managed_network_configuration_handler_impl.cc
@@ -718,7 +718,8 @@ ManagedNetworkConfigurationHandlerImpl::GetGlobalConfigFromPolicy(
const base::DictionaryValue*
ManagedNetworkConfigurationHandlerImpl::FindPolicyByGuidAndProfile(
const std::string& guid,
- const std::string& profile_path) const {
+ const std::string& profile_path,
+ ::onc::ONCSource* onc_source) const {
const NetworkProfile* profile =
network_profile_handler_->GetProfileForPath(profile_path);
if (!profile) {
@@ -730,7 +731,13 @@ ManagedNetworkConfigurationHandlerImpl::FindPolicyByGuidAndProfile(
if (!policies)
return NULL;
- return GetByGUID(policies->per_network_config, guid);
+ const base::DictionaryValue* policy =
+ GetByGUID(policies->per_network_config, guid);
+ if (policy && onc_source) {
+ *onc_source = (profile->userhash.empty() ? ::onc::ONC_SOURCE_DEVICE_POLICY
+ : ::onc::ONC_SOURCE_USER_POLICY);
+ }
+ return policy;
}
const ManagedNetworkConfigurationHandlerImpl::Policies*

Powered by Google App Engine
This is Rietveld 408576698