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

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

Issue 2850003002: Add flag to override Effective Connection Type (Closed)
Patch Set: Rebased Created 3 years, 7 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
« no previous file with comments | « net/nqe/effective_connection_type.h ('k') | net/nqe/network_quality_estimator_params.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "net/nqe/effective_connection_type.h" 5 #include "net/nqe/effective_connection_type.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 8
9 namespace { 9 namespace {
10 10
11 const char kDeprectedEffectiveConnectionTypeSlow2G[] = "Slow2G";
12
13 } // namespace
14
15 namespace net {
16
11 const char kEffectiveConnectionTypeUnknown[] = "Unknown"; 17 const char kEffectiveConnectionTypeUnknown[] = "Unknown";
12 const char kEffectiveConnectionTypeOffline[] = "Offline"; 18 const char kEffectiveConnectionTypeOffline[] = "Offline";
13 const char kEffectiveConnectionTypeSlow2G[] = "Slow-2G"; 19 const char kEffectiveConnectionTypeSlow2G[] = "Slow-2G";
14 const char kEffectiveConnectionType2G[] = "2G"; 20 const char kEffectiveConnectionType2G[] = "2G";
15 const char kEffectiveConnectionType3G[] = "3G"; 21 const char kEffectiveConnectionType3G[] = "3G";
16 const char kEffectiveConnectionType4G[] = "4G"; 22 const char kEffectiveConnectionType4G[] = "4G";
17 const char kDeprectedEffectiveConnectionTypeSlow2G[] = "Slow2G";
18
19 } // namespace
20
21 namespace net {
22 23
23 const char* GetNameForEffectiveConnectionType(EffectiveConnectionType type) { 24 const char* GetNameForEffectiveConnectionType(EffectiveConnectionType type) {
24 switch (type) { 25 switch (type) {
25 case EFFECTIVE_CONNECTION_TYPE_UNKNOWN: 26 case EFFECTIVE_CONNECTION_TYPE_UNKNOWN:
26 return kEffectiveConnectionTypeUnknown; 27 return kEffectiveConnectionTypeUnknown;
27 case EFFECTIVE_CONNECTION_TYPE_OFFLINE: 28 case EFFECTIVE_CONNECTION_TYPE_OFFLINE:
28 return kEffectiveConnectionTypeOffline; 29 return kEffectiveConnectionTypeOffline;
29 case EFFECTIVE_CONNECTION_TYPE_SLOW_2G: 30 case EFFECTIVE_CONNECTION_TYPE_SLOW_2G:
30 return kEffectiveConnectionTypeSlow2G; 31 return kEffectiveConnectionTypeSlow2G;
31 case EFFECTIVE_CONNECTION_TYPE_2G: 32 case EFFECTIVE_CONNECTION_TYPE_2G:
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 EffectiveConnectionType type) { 84 EffectiveConnectionType type) {
84 switch (type) { 85 switch (type) {
85 case EFFECTIVE_CONNECTION_TYPE_SLOW_2G: 86 case EFFECTIVE_CONNECTION_TYPE_SLOW_2G:
86 return kDeprectedEffectiveConnectionTypeSlow2G; 87 return kDeprectedEffectiveConnectionTypeSlow2G;
87 default: 88 default:
88 return GetNameForEffectiveConnectionType(type); 89 return GetNameForEffectiveConnectionType(type);
89 } 90 }
90 } 91 }
91 92
92 } // namespace net 93 } // namespace net
OLDNEW
« no previous file with comments | « net/nqe/effective_connection_type.h ('k') | net/nqe/network_quality_estimator_params.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698