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

Unified Diff: chrome/browser/ui/webui/net_internals/net_internals_ui.cc

Issue 11469026: Extending ONC validator's logging. Completing toplevel validation. (Closed) Base URL: http://git.chromium.org/chromium/src.git@add_error_handling_to_validator
Patch Set: Initial patch. Created 8 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/ui/webui/net_internals/net_internals_ui.cc
diff --git a/chrome/browser/ui/webui/net_internals/net_internals_ui.cc b/chrome/browser/ui/webui/net_internals/net_internals_ui.cc
index 6bb3a6a03a79d2dedcd66557d5d727ac18baa963..082da88007701c82e8d5c8a0cebb57568ec6c8a6 100644
--- a/chrome/browser/ui/webui/net_internals/net_internals_ui.cc
+++ b/chrome/browser/ui/webui/net_internals/net_internals_ui.cc
@@ -1488,13 +1488,17 @@ void NetInternalsMessageHandler::OnImportONCFile(const ListValue* list) {
NOTREACHED();
}
- std::string error;
chromeos::NetworkLibrary* cros_network =
chromeos::CrosLibrary::Get()->GetNetworkLibrary();
- cros_network->LoadOncNetworks(onc_blob, passcode,
- chromeos::NetworkUIData::ONC_SOURCE_USER_IMPORT,
- false, // allow_web_trust_from_policy
- &error);
+ bool success = cros_network->LoadOncNetworks(
+ onc_blob,
+ passcode,
+ chromeos::NetworkUIData::ONC_SOURCE_USER_IMPORT,
+ false); // allow_web_trust_from_policy
+
+ std::string error;
+ if (!success)
+ error = "Couldn't import ONC";
// Now that we've added the networks, we need to rescan them so they'll be
// available from the menu more immediately.

Powered by Google App Engine
This is Rietveld 408576698