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

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

Issue 11415148: Adding error handling to ONC validation. (Closed) Base URL: http://git.chromium.org/chromium/src.git@extract_onc_certificate
Patch Set: Initial patch. Created 8 years, 1 month 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 8842cf5b8f5c18309fc2b6bbe5b7ace1018d2390..c692c19d5234a9dfb00d352b1d0c901f5415bbe1 100644
--- a/chrome/browser/policy/network_configuration_updater.cc
+++ b/chrome/browser/policy/network_configuration_updater.cc
@@ -9,14 +9,12 @@
#include "base/bind.h"
#include "base/bind_helpers.h"
#include "chrome/browser/chromeos/cros/network_library.h"
+#include "chrome/browser/chromeos/network_settings/onc_utils.h"
#include "chrome/browser/policy/policy_map.h"
#include "policy/policy_constants.h"
namespace policy {
-const char NetworkConfigurationUpdater::kEmptyConfiguration[] =
- "{\"NetworkConfigurations\":[],\"Certificates\":[]}";
-
NetworkConfigurationUpdater::NetworkConfigurationUpdater(
PolicyService* policy_service,
chromeos::NetworkLibrary* network_library)
@@ -95,7 +93,7 @@ void NetworkConfigurationUpdater::ApplyNetworkConfiguration(
// An empty string is not a valid ONC and generates warnings and
// errors. Replace by a valid empty configuration.
if (new_network_config.empty())
- new_network_config = kEmptyConfiguration;
+ new_network_config = chromeos::onc::kEmptyUnencryptedConfiguration;
std::string unused_error;
network_library_->LoadOncNetworks(new_network_config, "", onc_source,

Powered by Google App Engine
This is Rietveld 408576698