OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_NQE_EFFECTIVE_CONNECTION_TYPE_H_ | 5 #ifndef NET_NQE_EFFECTIVE_CONNECTION_TYPE_H_ |
6 #define NET_NQE_EFFECTIVE_CONNECTION_TYPE_H_ | 6 #define NET_NQE_EFFECTIVE_CONNECTION_TYPE_H_ |
7 | 7 |
8 #include "base/strings/string_piece.h" | 8 #include "base/strings/string_piece.h" |
9 #include "net/base/net_export.h" | 9 #include "net/base/net_export.h" |
10 | 10 |
11 namespace net { | 11 namespace net { |
12 | 12 |
| 13 NET_EXPORT extern const char kEffectiveConnectionTypeUnknown[]; |
| 14 NET_EXPORT extern const char kEffectiveConnectionTypeOffline[]; |
| 15 NET_EXPORT extern const char kEffectiveConnectionTypeSlow2G[]; |
| 16 NET_EXPORT extern const char kEffectiveConnectionType2G[]; |
| 17 NET_EXPORT extern const char kEffectiveConnectionType3G[]; |
| 18 NET_EXPORT extern const char kEffectiveConnectionType4G[]; |
| 19 |
13 // EffectiveConnectionType is the connection type whose typical performance is | 20 // EffectiveConnectionType is the connection type whose typical performance is |
14 // most similar to the measured performance of the network in use. In many | 21 // most similar to the measured performance of the network in use. In many |
15 // cases, the "effective" connection type and the actual type of connection in | 22 // cases, the "effective" connection type and the actual type of connection in |
16 // use are the same, but often a network connection performs significantly | 23 // use are the same, but often a network connection performs significantly |
17 // differently, usually worse, from its expected capabilities. | 24 // differently, usually worse, from its expected capabilities. |
18 // EffectiveConnectionType of a network is independent of if the current | 25 // EffectiveConnectionType of a network is independent of if the current |
19 // connection is metered or not. For example, an unmetered slow connection may | 26 // connection is metered or not. For example, an unmetered slow connection may |
20 // have EFFECTIVE_CONNECTION_TYPE_SLOW_2G as its effective connection type. The | 27 // have EFFECTIVE_CONNECTION_TYPE_SLOW_2G as its effective connection type. The |
21 // effective connection type enums are be in increasing order of quality. | 28 // effective connection type enums are be in increasing order of quality. |
22 // GENERATED_JAVA_ENUM_PACKAGE: org.chromium.net | 29 // GENERATED_JAVA_ENUM_PACKAGE: org.chromium.net |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 EffectiveConnectionType* effective_connection_type); | 72 EffectiveConnectionType* effective_connection_type); |
66 | 73 |
67 // Returns the string equivalent of |type|. Deprecated, and replaced by | 74 // Returns the string equivalent of |type|. Deprecated, and replaced by |
68 // GetNameForEffectiveConnectionType. | 75 // GetNameForEffectiveConnectionType. |
69 NET_EXPORT_PRIVATE const char* DeprecatedGetNameForEffectiveConnectionType( | 76 NET_EXPORT_PRIVATE const char* DeprecatedGetNameForEffectiveConnectionType( |
70 EffectiveConnectionType type); | 77 EffectiveConnectionType type); |
71 | 78 |
72 } // namespace net | 79 } // namespace net |
73 | 80 |
74 #endif // NET_NQE_EFFECTIVE_CONNECTION_TYPE_H_ | 81 #endif // NET_NQE_EFFECTIVE_CONNECTION_TYPE_H_ |
OLD | NEW |