summaryrefslogtreecommitdiffstats
path: root/chromeos/network/network_util.h
diff options
context:
space:
mode:
authorstevenjb@chromium.org <stevenjb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-05-19 21:36:00 +0000
committerstevenjb@chromium.org <stevenjb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-05-19 21:36:00 +0000
commit04df97cf67a5b7fdcd5bb3b729975ee7fd49c417 (patch)
treed424b7b34a7981380cd22e7bd59016f25eb47b06 /chromeos/network/network_util.h
parent6eb4cc7f9a06e3021aadebe3fb6a10547974eeb8 (diff)
downloadchromium_src-04df97cf67a5b7fdcd5bb3b729975ee7fd49c417.zip
chromium_src-04df97cf67a5b7fdcd5bb3b729975ee7fd49c417.tar.gz
chromium_src-04df97cf67a5b7fdcd5bb3b729975ee7fd49c417.tar.bz2
Implement networkingPrivate.getNetworks
Design Doc and Proposal here: https://docs.google.com/a/google.com/document/d/1QWIzDvf_-iZJW8CINvhxzIERwwKeg72302hNUw0ZrSM/edit This CL depends on https://codereview.chromium.org/275543005/ BUG=371966 Review URL: https://codereview.chromium.org/280023003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@271490 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chromeos/network/network_util.h')
-rw-r--r--chromeos/network/network_util.h19
1 files changed, 15 insertions, 4 deletions
diff --git a/chromeos/network/network_util.h b/chromeos/network/network_util.h
index ebcc811..1fd7b49 100644
--- a/chromeos/network/network_util.h
+++ b/chromeos/network/network_util.h
@@ -26,6 +26,7 @@ class ListValue;
namespace chromeos {
+class FavoriteState;
class NetworkTypePattern;
// Struct for passing wifi access point data.
@@ -86,11 +87,21 @@ CHROMEOS_EXPORT int32 NetmaskToPrefixLength(const std::string& netmask);
CHROMEOS_EXPORT bool ParseCellularScanResults(
const base::ListValue& list, std::vector<CellularScanResult>* scan_results);
-// Retrieves the list of visible network services by passing |pattern| to
-// NetworkStateHandler::GetNetworkListByType() and translates each into a list
-// of ONC dictionaries using TranslateShillServiceToONCPart.
+// Retrieves the ONC state dictionary for |favorite| using GetStateProperties.
+// This includes properties from the corresponding NetworkState if it exists.
+CHROMEOS_EXPORT scoped_ptr<base::DictionaryValue> TranslateFavoriteStateToONC(
+ const FavoriteState* favorite);
+
+// Retrieves the list of network services by passing |pattern|,
+// |configured_only|, and |visible_only| to NetworkStateHandler::
+// GetNetworkListByType(). Translates the result into a list of ONC
+// dictionaries using TranslateShillServiceToONCPart. |limit| is used to limit
+// the number of results.
CHROMEOS_EXPORT scoped_ptr<base::ListValue> TranslateNetworkListToONC(
- NetworkTypePattern pattern);
+ NetworkTypePattern pattern,
+ bool configured_only,
+ bool visible_only,
+ int limit);
} // namespace network_util
} // namespace chromeos