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

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

Issue 11299236: This moves the ONC parsing code into chromeos/network/onc (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove translated strings 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 1dbe6dec155dabb4d4b417d4f4039fe9d094d6ef..9ff5f60b2aaef7ac27a3f45623a49318d888332e 100644
--- a/chrome/browser/ui/webui/net_internals/net_internals_ui.cc
+++ b/chrome/browser/ui/webui/net_internals/net_internals_ui.cc
@@ -70,6 +70,7 @@
#include "net/proxy/proxy_service.h"
#include "net/url_request/url_request_context.h"
#include "net/url_request/url_request_context_getter.h"
+#include "ui/base/l10n/l10n_util.h"
#include "ui/base/resource/resource_bundle.h"
#if defined(OS_CHROMEOS)
@@ -78,6 +79,7 @@
#include "chrome/browser/chromeos/system/syslogs_provider.h"
#include "chromeos/dbus/dbus_thread_manager.h"
#include "chromeos/dbus/debug_daemon_client.h"
+#include "chromeos/network/onc/onc_constants.h"
#endif
#if defined(OS_WIN)
#include "chrome/browser/net/service_providers_win.h"
@@ -1488,12 +1490,17 @@ void NetInternalsMessageHandler::OnImportONCFile(const ListValue* list) {
}
std::string error;
+ std::string log_error;
chromeos::NetworkLibrary* cros_network =
chromeos::CrosLibrary::Get()->GetNetworkLibrary();
- cros_network->LoadOncNetworks(onc_blob, passcode,
- chromeos::NetworkUIData::ONC_SOURCE_USER_IMPORT,
+ if (!cros_network->LoadOncNetworks(onc_blob, passcode,
pneubeck (no reviews) 2012/12/04 10:43:56 We should also forwards warnings in the case of Lo
Greg Spencer (Chromium) 2012/12/07 18:12:27 Logging now goes to network logging interface, inc
+ chromeos::onc::ONC_SOURCE_USER_IMPORT,
false, // allow_web_trust_from_policy
- &error);
+ &log_error)) {
+ LOG(ERROR) << "Unable to load ONC blob: " << log_error;
pneubeck (no reviews) 2012/12/04 10:43:56 no need to log |log_error|...
Greg Spencer (Chromium) 2012/12/07 18:12:27 Done.
+ error = l10n_util::GetStringUTF8(
+ IDS_NETWORK_CONFIG_ERROR_UNABLE_TO_LOAD_ONC);
pneubeck (no reviews) 2012/12/04 10:43:56 Actually, l10n isn't needed for net-internals. Non
Greg Spencer (Chromium) 2012/12/07 18:12:27 Done.
+ }
// 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