| Index: components/cronet/android/java/src/org/chromium/net/impl/CronetUrlRequestContext.java
|
| diff --git a/components/cronet/android/java/src/org/chromium/net/impl/CronetUrlRequestContext.java b/components/cronet/android/java/src/org/chromium/net/impl/CronetUrlRequestContext.java
|
| index 16824f9466cb26171a14cbc526dda2e15e9bd31c..24f3690a003a5fb715c1d89dab2fc46c036fc7f2 100644
|
| --- a/components/cronet/android/java/src/org/chromium/net/impl/CronetUrlRequestContext.java
|
| +++ b/components/cronet/android/java/src/org/chromium/net/impl/CronetUrlRequestContext.java
|
| @@ -148,13 +148,6 @@ public class CronetUrlRequestContext extends CronetEngineBase {
|
| @GuardedBy("mLock")
|
| private boolean mIsLogging;
|
|
|
| - /**
|
| - * True if a NetLog observer that writes to disk with a bounded amount of space has been
|
| - * activated by calling StartNetLogToDisk().
|
| - */
|
| - @GuardedBy("mLock")
|
| - private boolean mNetLogToDisk;
|
| -
|
| @UsedByReflection("CronetEngine.java")
|
| public CronetUrlRequestContext(final CronetEngineBuilderImpl builder) {
|
| CronetLibraryLoader.ensureInitialized(builder.getContext(), builder);
|
| @@ -281,9 +274,7 @@ public class CronetUrlRequestContext extends CronetEngineBase {
|
| public void startNetLogToFile(String fileName, boolean logAll) {
|
| synchronized (mLock) {
|
| checkHaveAdapter();
|
| - if (!nativeStartNetLogToFile(mUrlRequestContextAdapter, fileName, logAll)) {
|
| - throw new RuntimeException("Unable to start NetLog");
|
| - }
|
| + nativeStartNetLogToFile(mUrlRequestContextAdapter, fileName, logAll);
|
| mIsLogging = true;
|
| }
|
| }
|
| @@ -294,7 +285,6 @@ public class CronetUrlRequestContext extends CronetEngineBase {
|
| checkHaveAdapter();
|
| nativeStartNetLogToDisk(mUrlRequestContextAdapter, dirPath, logAll, maxSize);
|
| mIsLogging = true;
|
| - mNetLogToDisk = true;
|
| }
|
| }
|
|
|
| @@ -307,9 +297,6 @@ public class CronetUrlRequestContext extends CronetEngineBase {
|
| checkHaveAdapter();
|
| nativeStopNetLog(mUrlRequestContextAdapter);
|
| mIsLogging = false;
|
| - if (!mNetLogToDisk) {
|
| - return;
|
| - }
|
| mStopNetLogCompleted = new ConditionVariable();
|
| }
|
| mStopNetLogCompleted.block();
|
| @@ -317,9 +304,6 @@ public class CronetUrlRequestContext extends CronetEngineBase {
|
|
|
| @CalledByNative
|
| public void stopNetLogCompleted() {
|
| - synchronized (mLock) {
|
| - mNetLogToDisk = false;
|
| - }
|
| mStopNetLogCompleted.open();
|
| }
|
|
|
| @@ -717,7 +701,7 @@ public class CronetUrlRequestContext extends CronetEngineBase {
|
| private native void nativeDestroy(long nativePtr);
|
|
|
| @NativeClassQualifiedName("CronetURLRequestContextAdapter")
|
| - private native boolean nativeStartNetLogToFile(long nativePtr, String fileName, boolean logAll);
|
| + private native void nativeStartNetLogToFile(long nativePtr, String fileName, boolean logAll);
|
|
|
| @NativeClassQualifiedName("CronetURLRequestContextAdapter")
|
| private native void nativeStartNetLogToDisk(
|
|
|