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

Side by Side 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 unified diff | 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef NET_BASE_NET_UTIL_H_ 5 #ifndef NET_BASE_NET_UTIL_H_
6 #define NET_BASE_NET_UTIL_H_ 6 #define NET_BASE_NET_UTIL_H_
7 7
8 #include "build/build_config.h" 8 #include "build/build_config.h"
9 9
10 #if defined(OS_WIN) 10 #if defined(OS_WIN)
(...skipping 480 matching lines...) Expand 10 before | Expand all | Expand 10 after
491 // 802.11n, HT rates. 491 // 802.11n, HT rates.
492 WIFI_PHY_LAYER_PROTOCOL_N, 492 WIFI_PHY_LAYER_PROTOCOL_N,
493 // Unclassified mode or failure to identify. 493 // Unclassified mode or failure to identify.
494 WIFI_PHY_LAYER_PROTOCOL_UNKNOWN 494 WIFI_PHY_LAYER_PROTOCOL_UNKNOWN
495 }; 495 };
496 496
497 // Characterize the PHY mode of the currently associated access point. 497 // Characterize the PHY mode of the currently associated access point.
498 // Currently only available on OS_WIN. 498 // Currently only available on OS_WIN.
499 NET_EXPORT WifiPHYLayerProtocol GetWifiPHYLayerProtocol(); 499 NET_EXPORT WifiPHYLayerProtocol GetWifiPHYLayerProtocol();
500 500
501 enum WifiOptions {
502 // Disables background SSID scans.
503 WIFI_OPTIONS_DISABLE_SCAN = 1 << 0,
504 // Enables media streaming mode.
505 WIFI_OPTIONS_MEDIA_STREAMING_MODE = 1 << 1
506 };
507
508 class NET_EXPORT ScopedWifiOptions {
509 public:
510 ScopedWifiOptions() {}
511 virtual ~ScopedWifiOptions();
512
513 private:
514 DISALLOW_COPY_AND_ASSIGN(ScopedWifiOptions);
515 };
516
517 // Set temporary options on all wifi interfaces.
518 // |options| is an ORed bitfield of WifiOptions.
519 // Options are automatically disabled when the scoped pointer
520 // is freed. Currently only available on OS_WIN.
521 NET_EXPORT scoped_ptr<ScopedWifiOptions> SetWifiOptions(int options);
522
501 // Returns number of matching initial bits between the addresses |a1| and |a2|. 523 // Returns number of matching initial bits between the addresses |a1| and |a2|.
502 unsigned CommonPrefixLength(const IPAddressNumber& a1, 524 unsigned CommonPrefixLength(const IPAddressNumber& a1,
503 const IPAddressNumber& a2); 525 const IPAddressNumber& a2);
504 526
505 // Computes the number of leading 1-bits in |mask|. 527 // Computes the number of leading 1-bits in |mask|.
506 unsigned MaskPrefixLength(const IPAddressNumber& mask); 528 unsigned MaskPrefixLength(const IPAddressNumber& mask);
507 529
508 // Differentiated Services Code Point. 530 // Differentiated Services Code Point.
509 // See http://tools.ietf.org/html/rfc2474 for details. 531 // See http://tools.ietf.org/html/rfc2474 for details.
510 enum DiffServCodePoint { 532 enum DiffServCodePoint {
(...skipping 20 matching lines...) Expand all
531 DSCP_CS5 = 40, // Video 553 DSCP_CS5 = 40, // Video
532 DSCP_EF = 46, // Voice 554 DSCP_EF = 46, // Voice
533 DSCP_CS6 = 48, // Voice 555 DSCP_CS6 = 48, // Voice
534 DSCP_CS7 = 56, // Control messages 556 DSCP_CS7 = 56, // Control messages
535 DSCP_LAST = DSCP_CS7 557 DSCP_LAST = DSCP_CS7
536 }; 558 };
537 559
538 } // namespace net 560 } // namespace net
539 561
540 #endif // NET_BASE_NET_UTIL_H_ 562 #endif // NET_BASE_NET_UTIL_H_
OLDNEW
« 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