Chromium Code Reviews| 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 namespace net { | 8 namespace net { |
| 9 | 9 |
| 10 // EffectiveConnectionType is the connection type whose typical performance is | 10 // EffectiveConnectionType is the connection type whose typical performance is |
| 11 // most similar to the measured performance of the network in use. In many | 11 // most similar to the measured performance of the network in use. In many |
| 12 // cases, the "effective" connection type and the actual type of connection in | 12 // cases, the "effective" connection type and the actual type of connection in |
| 13 // use are the same, but often a network connection performs significantly | 13 // use are the same, but often a network connection performs significantly |
| 14 // differently, usually worse, from its expected capabilities. | 14 // differently, usually worse, from its expected capabilities. |
| 15 // EffectiveConnectionType of a network is independent of if the current | 15 // EffectiveConnectionType of a network is independent of if the current |
| 16 // connection is metered or not. For example, an unmetered slow connection may | 16 // connection is metered or not. For example, an unmetered slow connection may |
| 17 // have EFFECTIVE_CONNECTION_TYPE_SLOW_2G as its effective connection type. | 17 // have EFFECTIVE_CONNECTION_TYPE_SLOW_2G as its effective connection type. |
| 18 // An invalid Java prefix to strip is specified to prevent the Java class | |
| 19 // generator from automatically stripping off the common prefix | |
| 20 // ("EFFECTIVE_CONNECTION_TYPE_"). | |
| 21 // GENERATED_JAVA_ENUM_PACKAGE: org.chromium.net | |
| 22 // GENERATED_JAVA_CLASS_NAME_OVERRIDE: EffectiveConnectionType | |
|
xunjieli
2016/08/09 13:22:44
You can omit this line 22.
tbansal1
2016/08/09 17:59:16
Done.
| |
| 23 // GENERATED_JAVA_PREFIX_TO_STRIP: PREFIX_NOT_PRESENT_ | |
|
xunjieli
2016/08/09 13:22:44
Do you need to keep the prefix? If not, can we str
tbansal1
2016/08/09 17:59:16
If I remove this, then EFFECTIVE_CONNECTION_TYPE_
xunjieli
2016/08/10 17:39:43
Acknowledged.
| |
| 18 enum EffectiveConnectionType { | 24 enum EffectiveConnectionType { |
| 19 // The connection types should be in increasing order of quality. | 25 // The connection types should be in increasing order of quality. |
| 20 EFFECTIVE_CONNECTION_TYPE_UNKNOWN = 0, | 26 EFFECTIVE_CONNECTION_TYPE_UNKNOWN = 0, |
| 21 EFFECTIVE_CONNECTION_TYPE_OFFLINE, | 27 EFFECTIVE_CONNECTION_TYPE_OFFLINE, |
| 22 EFFECTIVE_CONNECTION_TYPE_SLOW_2G, | 28 EFFECTIVE_CONNECTION_TYPE_SLOW_2G, |
| 23 EFFECTIVE_CONNECTION_TYPE_2G, | 29 EFFECTIVE_CONNECTION_TYPE_2G, |
| 24 EFFECTIVE_CONNECTION_TYPE_3G, | 30 EFFECTIVE_CONNECTION_TYPE_3G, |
| 25 EFFECTIVE_CONNECTION_TYPE_4G, | 31 EFFECTIVE_CONNECTION_TYPE_4G, |
| 26 EFFECTIVE_CONNECTION_TYPE_BROADBAND, | 32 EFFECTIVE_CONNECTION_TYPE_BROADBAND, |
| 27 EFFECTIVE_CONNECTION_TYPE_LAST, | 33 EFFECTIVE_CONNECTION_TYPE_LAST, |
| 28 }; | 34 }; |
| 29 | 35 |
| 30 } // namespace net | 36 } // namespace net |
| 31 | 37 |
| 32 #endif // NET_NQE_EFFECTIVE_CONNECTION_TYPE_H_ | 38 #endif // NET_NQE_EFFECTIVE_CONNECTION_TYPE_H_ |
| OLD | NEW |