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

Unified Diff: net/base/net_util.h

Issue 566243005: Cast: Allow extension to control wifi options on windows (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comments addressed Created 6 years, 3 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 | « media/cast/net/cast_transport_sender_impl_unittest.cc ('k') | net/base/net_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/net_util.h
diff --git a/net/base/net_util.h b/net/base/net_util.h
index c74dfd2ea48486b08e16be9fdb700b9d99f06bd0..fc28f4e912923bdfcff6f48f5c007d5479ce6211 100644
--- a/net/base/net_util.h
+++ b/net/base/net_util.h
@@ -498,6 +498,28 @@ enum WifiPHYLayerProtocol {
// Currently only available on OS_WIN.
NET_EXPORT WifiPHYLayerProtocol GetWifiPHYLayerProtocol();
+enum WifiOptions {
+ // Disables background SSID scans.
+ WIFI_OPTIONS_DISABLE_SCAN = 1 << 0,
+ // Enables media streaming mode.
+ WIFI_OPTIONS_MEDIA_STREAMING_MODE = 1 << 1
+};
+
+class NET_EXPORT ScopedWifiOptions {
+ public:
+ ScopedWifiOptions() {}
+ virtual ~ScopedWifiOptions();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(ScopedWifiOptions);
+};
+
+// Set temporary options on all wifi interfaces.
+// |options| is an ORed bitfield of WifiOptions.
+// Options are automatically disabled when the scoped pointer
+// is freed. Currently only available on OS_WIN.
+NET_EXPORT scoped_ptr<ScopedWifiOptions> SetWifiOptions(int options);
+
// Returns number of matching initial bits between the addresses |a1| and |a2|.
unsigned CommonPrefixLength(const IPAddressNumber& a1,
const IPAddressNumber& a2);
« no previous file with comments | « media/cast/net/cast_transport_sender_impl_unittest.cc ('k') | net/base/net_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698