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

Side by Side Diff: components/cronet/android/java/src/org/chromium/net/impl/CronetUrlRequestContext.java

Issue 2341443002: [Cronet] Strip prefix of EFFECTIVE_CONNECTION_TYPE to just TYPE_blah (Closed)
Patch Set: fix tests Created 4 years, 3 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 package org.chromium.net.impl; 5 package org.chromium.net.impl;
6 6
7 import android.content.Context; 7 import android.content.Context;
8 import android.os.Build; 8 import android.os.Build;
9 import android.os.ConditionVariable; 9 import android.os.ConditionVariable;
10 import android.os.Handler; 10 import android.os.Handler;
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 * Locks operations on the list of RequestFinishedInfo.Listeners, because op erations can happen 84 * Locks operations on the list of RequestFinishedInfo.Listeners, because op erations can happen
85 * on any thread. 85 * on any thread.
86 */ 86 */
87 private final Object mFinishedListenerLock = new Object(); 87 private final Object mFinishedListenerLock = new Object();
88 88
89 /** 89 /**
90 * Current effective connection type as computed by the network quality 90 * Current effective connection type as computed by the network quality
91 * estimator. 91 * estimator.
92 */ 92 */
93 @GuardedBy("mNetworkQualityLock") 93 @GuardedBy("mNetworkQualityLock")
94 private int mEffectiveConnectionType = 94 private int mEffectiveConnectionType = EffectiveConnectionType.TYPE_UNKNOWN;
95 EffectiveConnectionType.EFFECTIVE_CONNECTION_TYPE_UNKNOWN;
96 95
97 @GuardedBy("mNetworkQualityLock") 96 @GuardedBy("mNetworkQualityLock")
98 private final ObserverList<NetworkQualityRttListener> mRttListenerList = 97 private final ObserverList<NetworkQualityRttListener> mRttListenerList =
99 new ObserverList<NetworkQualityRttListener>(); 98 new ObserverList<NetworkQualityRttListener>();
100 99
101 @GuardedBy("mNetworkQualityLock") 100 @GuardedBy("mNetworkQualityLock")
102 private final ObserverList<NetworkQualityThroughputListener> mThroughputList enerList = 101 private final ObserverList<NetworkQualityThroughputListener> mThroughputList enerList =
103 new ObserverList<NetworkQualityThroughputListener>(); 102 new ObserverList<NetworkQualityThroughputListener>();
104 103
105 @GuardedBy("mFinishedListenerLock") 104 @GuardedBy("mFinishedListenerLock")
(...skipping 529 matching lines...) Expand 10 before | Expand all | Expand 10 after
635 @NativeClassQualifiedName("CronetURLRequestContextAdapter") 634 @NativeClassQualifiedName("CronetURLRequestContextAdapter")
636 private native void nativeProvideRTTObservations(long nativePtr, boolean sho uld); 635 private native void nativeProvideRTTObservations(long nativePtr, boolean sho uld);
637 636
638 @NativeClassQualifiedName("CronetURLRequestContextAdapter") 637 @NativeClassQualifiedName("CronetURLRequestContextAdapter")
639 private native void nativeProvideThroughputObservations(long nativePtr, bool ean should); 638 private native void nativeProvideThroughputObservations(long nativePtr, bool ean should);
640 639
641 public boolean isNetworkThread(Thread thread) { 640 public boolean isNetworkThread(Thread thread) {
642 return thread == mNetworkThread; 641 return thread == mNetworkThread;
643 } 642 }
644 } 643 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698