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

Side by Side Diff: net/base/network_quality_estimator.cc

Issue 1265453004: Get WiFi SSID information for Windows (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 4 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 #include "net/base/network_quality_estimator.h" 5 #include "net/base/network_quality_estimator.h"
6 6
7 #include <float.h> 7 #include <float.h>
8 #include <algorithm> 8 #include <algorithm>
9 #include <cmath> 9 #include <cmath>
10 #include <limits> 10 #include <limits>
(...skipping 608 matching lines...) Expand 10 before | Expand all | Expand 10 after
619 NetworkQualityEstimator::NetworkID network_id( 619 NetworkQualityEstimator::NetworkID network_id(
620 NetworkChangeNotifier::GetConnectionType(), std::string()); 620 NetworkChangeNotifier::GetConnectionType(), std::string());
621 621
622 switch (network_id.type) { 622 switch (network_id.type) {
623 case NetworkChangeNotifier::ConnectionType::CONNECTION_UNKNOWN: 623 case NetworkChangeNotifier::ConnectionType::CONNECTION_UNKNOWN:
624 case NetworkChangeNotifier::ConnectionType::CONNECTION_NONE: 624 case NetworkChangeNotifier::ConnectionType::CONNECTION_NONE:
625 case NetworkChangeNotifier::ConnectionType::CONNECTION_BLUETOOTH: 625 case NetworkChangeNotifier::ConnectionType::CONNECTION_BLUETOOTH:
626 case NetworkChangeNotifier::ConnectionType::CONNECTION_ETHERNET: 626 case NetworkChangeNotifier::ConnectionType::CONNECTION_ETHERNET:
627 break; 627 break;
628 case NetworkChangeNotifier::ConnectionType::CONNECTION_WIFI: 628 case NetworkChangeNotifier::ConnectionType::CONNECTION_WIFI:
629 #if defined(OS_ANDROID) || defined(OS_LINUX) || defined(OS_CHROMEOS) 629 #if defined(OS_ANDROID) || defined(OS_LINUX) || defined(OS_CHROMEOS) || \
630 defined(OS_WIN)
630 network_id.id = GetWifiSSID(); 631 network_id.id = GetWifiSSID();
631 #endif 632 #endif
632 break; 633 break;
633 case NetworkChangeNotifier::ConnectionType::CONNECTION_2G: 634 case NetworkChangeNotifier::ConnectionType::CONNECTION_2G:
634 case NetworkChangeNotifier::ConnectionType::CONNECTION_3G: 635 case NetworkChangeNotifier::ConnectionType::CONNECTION_3G:
635 case NetworkChangeNotifier::ConnectionType::CONNECTION_4G: 636 case NetworkChangeNotifier::ConnectionType::CONNECTION_4G:
636 #if defined(OS_ANDROID) 637 #if defined(OS_ANDROID)
637 network_id.id = android::GetTelephonyNetworkOperator(); 638 network_id.id = android::GetTelephonyNetworkOperator();
638 #endif 639 #endif
639 break; 640 break;
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
727 728
728 NetworkQualityEstimator::CachedNetworkQuality::~CachedNetworkQuality() { 729 NetworkQualityEstimator::CachedNetworkQuality::~CachedNetworkQuality() {
729 } 730 }
730 731
731 bool NetworkQualityEstimator::CachedNetworkQuality::OlderThan( 732 bool NetworkQualityEstimator::CachedNetworkQuality::OlderThan(
732 const CachedNetworkQuality& cached_network_quality) const { 733 const CachedNetworkQuality& cached_network_quality) const {
733 return last_update_time_ < cached_network_quality.last_update_time_; 734 return last_update_time_ < cached_network_quality.last_update_time_;
734 } 735 }
735 736
736 } // namespace net 737 } // namespace net
OLDNEW
« net/base/network_interfaces_win.cc ('K') | « net/base/network_interfaces_win.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698