| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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/quic/quic_connection_logger.h" | 5 #include "net/quic/quic_connection_logger.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 277 NetworkChangeNotifier::GetConnectionType(); | 277 NetworkChangeNotifier::GetConnectionType(); |
| 278 const char* description = NetworkChangeNotifier::ConnectionTypeToString(type); | 278 const char* description = NetworkChangeNotifier::ConnectionTypeToString(type); |
| 279 // Most platforms don't distingish Wifi vs Etherenet, and call everything | 279 // Most platforms don't distingish Wifi vs Etherenet, and call everything |
| 280 // CONNECTION_UNKNOWN :-(. We'll tease out some details when we are on WiFi, | 280 // CONNECTION_UNKNOWN :-(. We'll tease out some details when we are on WiFi, |
| 281 // and hopefully leave only ethernet (with no WiFi available) in the | 281 // and hopefully leave only ethernet (with no WiFi available) in the |
| 282 // CONNECTION_UNKNOWN category. This *might* err if there is both ethernet, | 282 // CONNECTION_UNKNOWN category. This *might* err if there is both ethernet, |
| 283 // as well as WiFi, where WiFi was not being used that much. | 283 // as well as WiFi, where WiFi was not being used that much. |
| 284 // This function only seems usefully defined on Windows currently. | 284 // This function only seems usefully defined on Windows currently. |
| 285 if (type == NetworkChangeNotifier::CONNECTION_UNKNOWN || | 285 if (type == NetworkChangeNotifier::CONNECTION_UNKNOWN || |
| 286 type == NetworkChangeNotifier::CONNECTION_WIFI) { | 286 type == NetworkChangeNotifier::CONNECTION_WIFI) { |
| 287 // TODO(rtenneti): Remove ScopedTracker below once crbug.com/422516 is |
| 288 // fixed. |
| 289 tracked_objects::ScopedTracker tracking_profile1( |
| 290 FROM_HERE_WITH_EXPLICIT_FUNCTION( |
| 291 "422516 QuicConnectionLogger GetConnectionDescriptionString1")); |
| 292 |
| 287 WifiPHYLayerProtocol wifi_type = GetWifiPHYLayerProtocol(); | 293 WifiPHYLayerProtocol wifi_type = GetWifiPHYLayerProtocol(); |
| 288 switch (wifi_type) { | 294 switch (wifi_type) { |
| 289 case WIFI_PHY_LAYER_PROTOCOL_NONE: | 295 case WIFI_PHY_LAYER_PROTOCOL_NONE: |
| 290 // No wifi support or no associated AP. | 296 // No wifi support or no associated AP. |
| 291 break; | 297 break; |
| 292 case WIFI_PHY_LAYER_PROTOCOL_ANCIENT: | 298 case WIFI_PHY_LAYER_PROTOCOL_ANCIENT: |
| 293 // An obsolete modes introduced by the original 802.11, e.g. IR, FHSS. | 299 // An obsolete modes introduced by the original 802.11, e.g. IR, FHSS. |
| 294 description = "CONNECTION_WIFI_ANCIENT"; | 300 description = "CONNECTION_WIFI_ANCIENT"; |
| 295 break; | 301 break; |
| 296 case WIFI_PHY_LAYER_PROTOCOL_A: | 302 case WIFI_PHY_LAYER_PROTOCOL_A: |
| (...skipping 607 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 904 continue; | 910 continue; |
| 905 } | 911 } |
| 906 // Record some overlapping patterns, to get a better picture, since this is | 912 // Record some overlapping patterns, to get a better picture, since this is |
| 907 // not very expensive. | 913 // not very expensive. |
| 908 if (i % 3 == 0) | 914 if (i % 3 == 0) |
| 909 six_packet_histogram->Add(recent_6_mask); | 915 six_packet_histogram->Add(recent_6_mask); |
| 910 } | 916 } |
| 911 } | 917 } |
| 912 | 918 |
| 913 } // namespace net | 919 } // namespace net |
| OLD | NEW |