OLD | NEW |
---|---|
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; | 5 package org.chromium.net; |
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 25 matching lines...) Expand all Loading... | |
36 | 36 |
37 /** | 37 /** |
38 * CronetEngine using Chromium HTTP stack implementation. | 38 * CronetEngine using Chromium HTTP stack implementation. |
39 */ | 39 */ |
40 @JNINamespace("cronet") | 40 @JNINamespace("cronet") |
41 @UsedByReflection("CronetEngine.java") | 41 @UsedByReflection("CronetEngine.java") |
42 class CronetUrlRequestContext extends CronetEngine { | 42 class CronetUrlRequestContext extends CronetEngine { |
43 private static final int LOG_NONE = 3; // LOG(FATAL), no VLOG. | 43 private static final int LOG_NONE = 3; // LOG(FATAL), no VLOG. |
44 private static final int LOG_DEBUG = -1; // LOG(FATAL...INFO), VLOG(1) | 44 private static final int LOG_DEBUG = -1; // LOG(FATAL...INFO), VLOG(1) |
45 private static final int LOG_VERBOSE = -2; // LOG(FATAL...INFO), VLOG(2) | 45 private static final int LOG_VERBOSE = -2; // LOG(FATAL...INFO), VLOG(2) |
46 static final String LOG_TAG = "ChromiumNetwork"; | 46 static final String LOG_TAG = CronetUrlRequestContext.class.getSimpleName(); |
xunjieli
2016/07/01 14:11:07
There was a reason that this TAG is ChromiumNetwor
mef
2016/07/01 15:18:18
I think the reason was mostly historical (based on
pauljensen
2016/07/01 15:35:22
I don't feel too strongly as there are pros and co
mef
2016/07/13 19:15:58
Acknowledged. I don't feel strongly either, and fo
pauljensen
2016/08/17 11:58:33
Done.
| |
47 | 47 |
48 /** | 48 /** |
49 * Synchronize access to mUrlRequestContextAdapter and shutdown routine. | 49 * Synchronize access to mUrlRequestContextAdapter and shutdown routine. |
50 */ | 50 */ |
51 private final Object mLock = new Object(); | 51 private final Object mLock = new Object(); |
52 private final ConditionVariable mInitCompleted = new ConditionVariable(false ); | 52 private final ConditionVariable mInitCompleted = new ConditionVariable(false ); |
53 private final AtomicInteger mActiveRequestCount = new AtomicInteger(0); | 53 private final AtomicInteger mActiveRequestCount = new AtomicInteger(0); |
54 | 54 |
55 private long mUrlRequestContextAdapter = 0; | 55 private long mUrlRequestContextAdapter = 0; |
56 private Thread mNetworkThread; | 56 private Thread mNetworkThread; |
(...skipping 518 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
575 | 575 |
576 @NativeClassQualifiedName("CronetURLRequestContextAdapter") | 576 @NativeClassQualifiedName("CronetURLRequestContextAdapter") |
577 private native void nativeEnableNetworkQualityEstimator(long nativePtr); | 577 private native void nativeEnableNetworkQualityEstimator(long nativePtr); |
578 | 578 |
579 @NativeClassQualifiedName("CronetURLRequestContextAdapter") | 579 @NativeClassQualifiedName("CronetURLRequestContextAdapter") |
580 private native void nativeProvideRTTObservations(long nativePtr, boolean sho uld); | 580 private native void nativeProvideRTTObservations(long nativePtr, boolean sho uld); |
581 | 581 |
582 @NativeClassQualifiedName("CronetURLRequestContextAdapter") | 582 @NativeClassQualifiedName("CronetURLRequestContextAdapter") |
583 private native void nativeProvideThroughputObservations(long nativePtr, bool ean should); | 583 private native void nativeProvideThroughputObservations(long nativePtr, bool ean should); |
584 } | 584 } |
OLD | NEW |