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

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

Issue 1633733005: Native SSID extraction moved to platform code on Android (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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 758 matching lines...) Expand 10 before | Expand all | Expand 10 after
769 NetworkQualityEstimator::NetworkID network_id( 769 NetworkQualityEstimator::NetworkID network_id(
770 NetworkChangeNotifier::GetConnectionType(), std::string()); 770 NetworkChangeNotifier::GetConnectionType(), std::string());
771 771
772 switch (network_id.type) { 772 switch (network_id.type) {
773 case NetworkChangeNotifier::ConnectionType::CONNECTION_UNKNOWN: 773 case NetworkChangeNotifier::ConnectionType::CONNECTION_UNKNOWN:
774 case NetworkChangeNotifier::ConnectionType::CONNECTION_NONE: 774 case NetworkChangeNotifier::ConnectionType::CONNECTION_NONE:
775 case NetworkChangeNotifier::ConnectionType::CONNECTION_BLUETOOTH: 775 case NetworkChangeNotifier::ConnectionType::CONNECTION_BLUETOOTH:
776 case NetworkChangeNotifier::ConnectionType::CONNECTION_ETHERNET: 776 case NetworkChangeNotifier::ConnectionType::CONNECTION_ETHERNET:
777 break; 777 break;
778 case NetworkChangeNotifier::ConnectionType::CONNECTION_WIFI: 778 case NetworkChangeNotifier::ConnectionType::CONNECTION_WIFI:
779 #if defined(OS_ANDROID) || defined(OS_LINUX) || defined(OS_CHROMEOS) || \ 779 #if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_WIN)
780 defined(OS_WIN)
781 network_id.id = GetWifiSSID(); 780 network_id.id = GetWifiSSID();
781 #elif defined(OS_ANDROID)
782 network_id.id = android::GetCurrentWifiConnectionSsid();
Ryan Sleevi 2016/01/26 20:22:26 DESIGN: Given that network_interfaces is already d
Ryan Hamilton 2016/01/26 20:24:48 Oo! Good idea.
ripp 2016/01/27 12:09:06 Done.
ripp 2016/01/27 12:09:06 Done.
782 #endif 783 #endif
783 break; 784 break;
784 case NetworkChangeNotifier::ConnectionType::CONNECTION_2G: 785 case NetworkChangeNotifier::ConnectionType::CONNECTION_2G:
785 case NetworkChangeNotifier::ConnectionType::CONNECTION_3G: 786 case NetworkChangeNotifier::ConnectionType::CONNECTION_3G:
786 case NetworkChangeNotifier::ConnectionType::CONNECTION_4G: 787 case NetworkChangeNotifier::ConnectionType::CONNECTION_4G:
787 #if defined(OS_ANDROID) 788 #if defined(OS_ANDROID)
788 network_id.id = android::GetTelephonyNetworkOperator(); 789 network_id.id = android::GetTelephonyNetworkOperator();
789 #endif 790 #endif
790 break; 791 break;
791 default: 792 default:
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
1003 1004
1004 NetworkQualityEstimator::NetworkQuality& 1005 NetworkQualityEstimator::NetworkQuality&
1005 NetworkQualityEstimator::NetworkQuality:: 1006 NetworkQualityEstimator::NetworkQuality::
1006 operator=(const NetworkQuality& other) { 1007 operator=(const NetworkQuality& other) {
1007 rtt_ = other.rtt_; 1008 rtt_ = other.rtt_;
1008 downstream_throughput_kbps_ = other.downstream_throughput_kbps_; 1009 downstream_throughput_kbps_ = other.downstream_throughput_kbps_;
1009 return *this; 1010 return *this;
1010 } 1011 }
1011 1012
1012 } // namespace net 1013 } // namespace net
OLDNEW
« net/android/network_library.h ('K') | « net/android/network_library.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698