Commit e9c3367a authored by stevenjb@chromium.org's avatar stevenjb@chromium.org

Fix FirstNetworkByType, and some minor debugging

The change to combine NetworkState and FavoriteState broke
FirstNetworkByType for VPN since it doesn't appear with the "visible"
networks. We don't use that method a lot, so the easy fix is to remove
the early exit and continue instead of break.

BUG=375955
TBR=pneubeck@chromium.org

Review URL: https://codereview.chromium.org/332713003

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@276851 0039d316-1c4b-4281-b951-d872f2087c98
parent a69e81f7
...@@ -39,6 +39,7 @@ ...@@ -39,6 +39,7 @@
<td>Name</td> <td>Name</td>
<td>Type</td> <td>Type</td>
<td>State</td> <td>State</td>
<td>Connect?</td>
<td>Error</td> <td>Error</td>
<td>Security</td> <td>Security</td>
<td>Technology</td> <td>Technology</td>
......
...@@ -13,6 +13,7 @@ var NetworkUI = (function() { ...@@ -13,6 +13,7 @@ var NetworkUI = (function() {
'Name', 'Name',
'Type', 'Type',
'ConnectionState', 'ConnectionState',
'connectable',
'ErrorState', 'ErrorState',
'WiFi.Security', 'WiFi.Security',
['Cellular.NetworkTechnology', ['Cellular.NetworkTechnology',
......
...@@ -222,7 +222,7 @@ const NetworkState* NetworkStateHandler::FirstNetworkByType( ...@@ -222,7 +222,7 @@ const NetworkState* NetworkStateHandler::FirstNetworkByType(
if (!network->update_received()) if (!network->update_received())
continue; continue;
if (!network->visible()) if (!network->visible())
break; continue;
if (network->Matches(type)) if (network->Matches(type))
return network; return network;
} }
......
...@@ -170,6 +170,7 @@ scoped_ptr<base::ListValue> TranslateNetworkListToONC( ...@@ -170,6 +170,7 @@ scoped_ptr<base::ListValue> TranslateNetworkListToONC(
TranslateNetworkStateToONC(*it); TranslateNetworkStateToONC(*it);
if (debugging_properties) { if (debugging_properties) {
onc_dictionary->SetBoolean("connectable", (*it)->connectable());
onc_dictionary->SetBoolean("visible", (*it)->visible()); onc_dictionary->SetBoolean("visible", (*it)->visible());
onc_dictionary->SetString("profile_path", (*it)->profile_path()); onc_dictionary->SetString("profile_path", (*it)->profile_path());
std::string onc_source = (*it)->ui_data().GetONCSourceAsString(); std::string onc_source = (*it)->ui_data().GetONCSourceAsString();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment