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

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

Issue 8804021: Proper management for policy-configured networks. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 fcefc3f67dc5ad16d472568072c3f53d8bc67b9b..765ea4a11977694c69889e25ee61861231d4b27b 100644
--- a/chrome/browser/policy/network_configuration_updater.cc
+++ b/chrome/browser/policy/network_configuration_updater.cc
@@ -57,6 +57,12 @@ void NetworkConfigurationUpdater::ApplyNetworkConfiguration(
LOG(WARNING) << "Invalid network configuration.";
}
+ // We need to load an empty configuration to get rid of any configuration
+ // that has been installed previously. An empty string also works, but
+ // generates warnings and errors, which we'd like to avoid.
+ if (new_network_config.empty())
+ new_network_config = "{NetworkConfigurations:[],Certificates:[]}";
+
if (*cached_value != new_network_config) {
*cached_value = new_network_config;
if (!network_library_->LoadOncNetworks(new_network_config, "", onc_source))

Powered by Google App Engine
This is Rietveld 408576698