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

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

Issue 1093793002: Allow setting Cronet NetLog level to LOG_ALL (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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; 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 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 // It is possible that adapter is already destroyed on another threa d. 114 // It is possible that adapter is already destroyed on another threa d.
115 if (!haveRequestContextAdapter()) { 115 if (!haveRequestContextAdapter()) {
116 return; 116 return;
117 } 117 }
118 nativeDestroy(mUrlRequestContextAdapter); 118 nativeDestroy(mUrlRequestContextAdapter);
119 mUrlRequestContextAdapter = 0; 119 mUrlRequestContextAdapter = 0;
120 } 120 }
121 } 121 }
122 122
123 @Override 123 @Override
124 public void startNetLogToFile(String fileName) { 124 public void startNetLogToFile(String fileName, boolean logAll) {
125 synchronized (mLock) { 125 synchronized (mLock) {
126 checkHaveAdapter(); 126 checkHaveAdapter();
127 nativeStartNetLogToFile(mUrlRequestContextAdapter, fileName); 127 nativeStartNetLogToFile(mUrlRequestContextAdapter, fileName,
128 logAll);
128 } 129 }
129 } 130 }
130 131
131 @Override 132 @Override
132 public void stopNetLog() { 133 public void stopNetLog() {
133 synchronized (mLock) { 134 synchronized (mLock) {
134 checkHaveAdapter(); 135 checkHaveAdapter();
135 nativeStopNetLog(mUrlRequestContextAdapter); 136 nativeStopNetLog(mUrlRequestContextAdapter);
136 } 137 }
137 } 138 }
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 // Native methods are implemented in cronet_url_request_context.cc. 200 // Native methods are implemented in cronet_url_request_context.cc.
200 private static native long nativeCreateRequestContextAdapter(String config); 201 private static native long nativeCreateRequestContextAdapter(String config);
201 202
202 private static native int nativeSetMinLogLevel(int loggingLevel); 203 private static native int nativeSetMinLogLevel(int loggingLevel);
203 204
204 @NativeClassQualifiedName("CronetURLRequestContextAdapter") 205 @NativeClassQualifiedName("CronetURLRequestContextAdapter")
205 private native void nativeDestroy(long nativePtr); 206 private native void nativeDestroy(long nativePtr);
206 207
207 @NativeClassQualifiedName("CronetURLRequestContextAdapter") 208 @NativeClassQualifiedName("CronetURLRequestContextAdapter")
208 private native void nativeStartNetLogToFile(long nativePtr, 209 private native void nativeStartNetLogToFile(long nativePtr,
209 String fileName); 210 String fileName, boolean logAll);
210 211
211 @NativeClassQualifiedName("CronetURLRequestContextAdapter") 212 @NativeClassQualifiedName("CronetURLRequestContextAdapter")
212 private native void nativeStopNetLog(long nativePtr); 213 private native void nativeStopNetLog(long nativePtr);
213 214
214 @NativeClassQualifiedName("CronetURLRequestContextAdapter") 215 @NativeClassQualifiedName("CronetURLRequestContextAdapter")
215 private native void nativeInitRequestContextOnMainThread(long nativePtr); 216 private native void nativeInitRequestContextOnMainThread(long nativePtr);
216 } 217 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698