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.ConditionVariable; | 8 import android.os.ConditionVariable; |
9 import android.os.Process; | 9 import android.os.Process; |
10 import android.util.Log; | 10 import android.util.Log; |
11 | 11 |
12 import org.chromium.base.CalledByNative; | 12 import org.chromium.base.CalledByNative; |
13 import org.chromium.base.JNINamespace; | 13 import org.chromium.base.JNINamespace; |
14 | 14 |
15 /** | 15 /** |
16 * Provides context for the native HTTP operations. | 16 * Provides context for the native HTTP operations. |
17 */ | 17 */ |
18 @JNINamespace("cronet") | 18 @JNINamespace("cronet") |
19 public class UrlRequestContext { | 19 public class UrlRequestContext { |
20 private static final int LOG_NONE = 0; | 20 private static final int LOG_NONE = 3; // LOG(FATAL), no VLOG. |
21 private static final int LOG_DEBUG = 1; | 21 private static final int LOG_DEBUG = -1; // LOG(FATAL...INFO), VLOG(1) |
22 private static final int LOG_VERBOSE = 2; | 22 private static final int LOG_VERBOSE = -2; // LOG(FATAL...INFO), VLOG(2) |
23 private static final String LOG_TAG = "ChromiumNetwork"; | 23 private static final String LOG_TAG = "ChromiumNetwork"; |
24 | 24 |
25 /** | 25 /** |
26 * Native peer object, owned by UrlRequestContext. | 26 * Native peer object, owned by UrlRequestContext. |
27 */ | 27 */ |
28 private long mUrlRequestContextPeer; | 28 private long mUrlRequestContextPeer; |
29 | 29 |
30 private final ConditionVariable mStarted = new ConditionVariable(); | 30 private final ConditionVariable mStarted = new ConditionVariable(); |
31 | 31 |
32 /** | 32 /** |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
129 | 129 |
130 private native void nativeInitializeStatistics(); | 130 private native void nativeInitializeStatistics(); |
131 | 131 |
132 private native String nativeGetStatisticsJSON(String filter); | 132 private native String nativeGetStatisticsJSON(String filter); |
133 | 133 |
134 private native void nativeStartNetLogToFile(long urlRequestContextPeer, | 134 private native void nativeStartNetLogToFile(long urlRequestContextPeer, |
135 String fileName); | 135 String fileName); |
136 | 136 |
137 private native void nativeStopNetLog(long urlRequestContextPeer); | 137 private native void nativeStopNetLog(long urlRequestContextPeer); |
138 } | 138 } |
OLD | NEW |