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

Unified Diff: chromeos/network/network_connection_handler.cc

Issue 17167010: Fix minor bugs found in NetworkConnectionHandler code (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 7 years, 6 months 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
« no previous file with comments | « chromeos/network/network_connection_handler.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromeos/network/network_connection_handler.cc
diff --git a/chromeos/network/network_connection_handler.cc b/chromeos/network/network_connection_handler.cc
index ec75b013e51a2b1b0381513ad124e0fdc4fb40f4..f0d33e0a38e8c4e9864f560f97ffef09d1a6e3f6 100644
--- a/chromeos/network/network_connection_handler.cc
+++ b/chromeos/network/network_connection_handler.cc
@@ -72,13 +72,15 @@ bool VPNIsConfigured(const std::string& service_path,
}
std::string provider_type;
// Note: we use Value path expansion to extract Provider.Type.
- if (!properties->GetString(flimflam::kTypeProperty, &provider_type)) {
+ if (!properties->GetStringWithoutPathExpansion(
+ flimflam::kTypeProperty, &provider_type)) {
NET_LOG_ERROR("VPN Provider Type not present", service_path);
return false;
}
if (provider_type == flimflam::kProviderOpenVpn) {
std::string hostname;
- properties->GetString(flimflam::kHostProperty, &hostname);
+ properties->GetStringWithoutPathExpansion(
+ flimflam::kHostProperty, &hostname);
if (hostname.empty()) {
NET_LOG_EVENT("OpenVPN: No hostname", service_path);
return false;
@@ -220,7 +222,7 @@ void NetworkConnectionHandler::OnCertificatesLoaded(
true /* ignore_error_state */);
} else if (initial_load) {
// Once certificates have loaded, connect to the "best" available network.
- NetworkHandler::Get()->network_state_handler()->ConnectToBestWifiNetwork();
+ network_state_handler_->ConnectToBestWifiNetwork();
}
}
@@ -399,7 +401,8 @@ void NetworkConnectionHandler::VerifyConfiguredAndConnect(
if (network->type() == flimflam::kTypeVPN) {
std::string provider_type;
- properties.GetString(flimflam::kTypeProperty, &provider_type);
+ // Get 'Type' property from 'Provider' dictionary (use expansion).
+ properties.GetString(flimflam::kProviderTypeProperty, &provider_type);
if (provider_type == flimflam::kProviderOpenVpn) {
config_properties.SetStringWithoutPathExpansion(
flimflam::kOpenVPNClientCertSlotProperty, tpm_slot);
« no previous file with comments | « chromeos/network/network_connection_handler.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698