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

Unified Diff: chrome/browser/policy/network_configuration_updater.cc

Issue 8804020: Set onc_source UI data parameter when importing ONC. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase. Created 9 years 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: chrome/browser/policy/network_configuration_updater.cc
diff --git a/chrome/browser/policy/network_configuration_updater.cc b/chrome/browser/policy/network_configuration_updater.cc
index a1597ca84af65c0b7e88236f1eecce6b9e94bb51..d03bf544f436ce28d7de4cff21a32aedafcb6d13 100644
--- a/chrome/browser/policy/network_configuration_updater.cc
+++ b/chrome/browser/policy/network_configuration_updater.cc
@@ -36,14 +36,17 @@ void NetworkConfigurationUpdater::Update() {
}
ApplyNetworkConfiguration(policy, kPolicyDeviceOpenNetworkConfiguration,
+ chromeos::NetworkUIData::ONC_SOURCE_DEVICE_POLICY,
&device_network_config_);
ApplyNetworkConfiguration(policy, kPolicyOpenNetworkConfiguration,
+ chromeos::NetworkUIData::ONC_SOURCE_USER_POLICY,
&user_network_config_);
}
void NetworkConfigurationUpdater::ApplyNetworkConfiguration(
const PolicyMap& policy_map,
ConfigurationPolicyType policy_type,
+ chromeos::NetworkUIData::ONCSource onc_source,
std::string* cached_value) {
std::string new_network_config;
const base::Value* value = policy_map.Get(policy_type);
@@ -57,9 +60,10 @@ void NetworkConfigurationUpdater::ApplyNetworkConfiguration(
if (*cached_value != new_network_config) {
*cached_value = new_network_config;
std::string error;
- if (!network_library_->LoadOncNetworks(new_network_config, "", &error)) {
+ if (!network_library_->LoadOncNetworks(new_network_config, "", onc_source,
+ &error)) {
LOG(WARNING) << "Network library failed to load ONC configuration:"
- << error;
+ << error;
}
}
}
« no previous file with comments | « chrome/browser/policy/network_configuration_updater.h ('k') | chrome/browser/policy/network_configuration_updater_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698