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

Unified Diff: chrome/browser/chromeos/cros/onc_network_parser.cc

Issue 8480003: Surface error messages from ONC parsing in about:policy. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments, break out code gen / unit test changes. Created 9 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/chromeos/cros/onc_network_parser.cc
diff --git a/chrome/browser/chromeos/cros/onc_network_parser.cc b/chrome/browser/chromeos/cros/onc_network_parser.cc
index b3a8e2790550729d7d58b88eaa0d301739519d79..dc196b8a687f02c8c3f09e9ee5ca15e98b5aa12f 100644
--- a/chrome/browser/chromeos/cros/onc_network_parser.cc
+++ b/chrome/browser/chromeos/cros/onc_network_parser.cc
@@ -73,11 +73,10 @@ OncNetworkParser::OncNetworkParser(const std::string& onc_blob)
certificates_(NULL) {
JSONStringValueSerializer deserializer(onc_blob);
deserializer.set_allow_trailing_comma(true);
- std::string error_msg;
- scoped_ptr<base::Value> root(deserializer.Deserialize(NULL, &error_msg));
+ scoped_ptr<base::Value> root(deserializer.Deserialize(NULL, &parse_error_));
if (!root.get() || root->GetType() != base::Value::TYPE_DICTIONARY) {
- LOG(WARNING) << "OncNetworkParser received bad ONC file: " << error_msg;
+ LOG(WARNING) << "OncNetworkParser received bad ONC file: " << parse_error_;
} else {
root_dict_.reset(static_cast<DictionaryValue*>(root.release()));
// At least one of NetworkConfigurations or Certificates is required.

Powered by Google App Engine
This is Rietveld 408576698