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

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

Issue 2368663002: change return type of StartNetLogToFile (Closed)
Patch Set: add documentation comment and improve test for startNetLogToFile 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/cronet/android/cronet_url_request_context_adapter.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 2c2df1a7f1d23f066c66f28f65a24e6277e7c477..f9656fac1bc069dfd4df2271014bfbf926d1c898 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
@@ -260,7 +260,9 @@ public class CronetUrlRequestContext extends CronetEngine {
public void startNetLogToFile(String fileName, boolean logAll) {
synchronized (mLock) {
checkHaveAdapter();
- nativeStartNetLogToFile(mUrlRequestContextAdapter, fileName, logAll);
+ if (!nativeStartNetLogToFile(mUrlRequestContextAdapter, fileName, logAll)) {
+ throw new RuntimeException("Unable to start NetLog");
+ }
mIsLogging = true;
}
}
@@ -612,7 +614,7 @@ public class CronetUrlRequestContext extends CronetEngine {
private native void nativeDestroy(long nativePtr);
@NativeClassQualifiedName("CronetURLRequestContextAdapter")
- private native void nativeStartNetLogToFile(long nativePtr, String fileName, boolean logAll);
+ private native boolean nativeStartNetLogToFile(long nativePtr, String fileName, boolean logAll);
@NativeClassQualifiedName("CronetURLRequestContextAdapter")
private native void nativeStartNetLogToDisk(
« no previous file with comments | « components/cronet/android/cronet_url_request_context_adapter.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698