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

Side by Side Diff: net/nqe/effective_connection_type.h

Issue 2223773003: Expose effective connection type to Cronet (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased, addressed comments Created 4 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 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. The
18 // effective connection type enums are be in increasing order of quality.
19 // An invalid Java prefix to strip is specified to prevent the Java class
20 // generator from automatically stripping off the common prefix
21 // ("EFFECTIVE_CONNECTION_TYPE_").
22 // GENERATED_JAVA_ENUM_PACKAGE: org.chromium.net
23 // GENERATED_JAVA_PREFIX_TO_STRIP: PREFIX_NOT_PRESENT_
18 enum EffectiveConnectionType { 24 enum EffectiveConnectionType {
19 // The connection types should be in increasing order of quality. 25 // Effective connection type reported when the network quality is unknown.
20 EFFECTIVE_CONNECTION_TYPE_UNKNOWN = 0, 26 EFFECTIVE_CONNECTION_TYPE_UNKNOWN = 0,
27
28 // Effective connection type reported when the Internet is unreachable, either
29 // because the device does not have a connection or because the
30 // connection is too slow to be usable.
21 EFFECTIVE_CONNECTION_TYPE_OFFLINE, 31 EFFECTIVE_CONNECTION_TYPE_OFFLINE,
32
33 // Effective connection type reported when the network has the quality of a
34 // poor 2G connection.
22 EFFECTIVE_CONNECTION_TYPE_SLOW_2G, 35 EFFECTIVE_CONNECTION_TYPE_SLOW_2G,
36
37 // Effective connection type reported when the network has the quality of a
38 // faster 2G connection.
23 EFFECTIVE_CONNECTION_TYPE_2G, 39 EFFECTIVE_CONNECTION_TYPE_2G,
40
41 // Effective connection type reported when the network has the quality of a 3G
42 // connection.
24 EFFECTIVE_CONNECTION_TYPE_3G, 43 EFFECTIVE_CONNECTION_TYPE_3G,
44
45 // Effective connection type reported when the network has the quality of a 4G
46 // connection.
25 EFFECTIVE_CONNECTION_TYPE_4G, 47 EFFECTIVE_CONNECTION_TYPE_4G,
48
49 // Effective connection type reported when the network has the quality of a
50 // broadband connection.
26 EFFECTIVE_CONNECTION_TYPE_BROADBAND, 51 EFFECTIVE_CONNECTION_TYPE_BROADBAND,
52
53 // Last value of the effective connection type. This value is unused.
27 EFFECTIVE_CONNECTION_TYPE_LAST, 54 EFFECTIVE_CONNECTION_TYPE_LAST,
28 }; 55 };
29 56
30 } // namespace net 57 } // namespace net
31 58
32 #endif // NET_NQE_EFFECTIVE_CONNECTION_TYPE_H_ 59 #endif // NET_NQE_EFFECTIVE_CONNECTION_TYPE_H_
OLDNEW
« no previous file with comments | « components/cronet/android/test/javatests/src/org/chromium/net/QuicTest.java ('k') | net/nqe/network_quality_estimator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698