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

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

Issue 474573003: Catch and report exceptions in CalledByNative java methods. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add test asserts. Created 6 years, 4 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 | Annotate | Revision Log
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.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 ChromiumUrlRequestContext { 19 public class ChromiumUrlRequestContext {
20 private static final int LOG_NONE = 3; // LOG(FATAL), no VLOG. 20 private static final int LOG_NONE = 3; // LOG(FATAL), no VLOG.
21 private static final int LOG_DEBUG = -1; // LOG(FATAL...INFO), VLOG(1) 21 private static final int LOG_DEBUG = -1; // LOG(FATAL...INFO), VLOG(1)
22 private static final int LOG_VERBOSE = -2; // LOG(FATAL...INFO), VLOG(2) 22 private static final int LOG_VERBOSE = -2; // LOG(FATAL...INFO), VLOG(2)
23 private static final String LOG_TAG = "ChromiumNetwork"; 23 public static final String LOG_TAG = "ChromiumNetwork";
Charles 2014/08/13 21:17:09 No need for public, leaving off the access marker
mef 2014/08/13 21:34:40 Done.
24 24
25 /** 25 /**
26 * Native adapter object, owned by ChromiumUrlRequestContext. 26 * Native adapter object, owned by ChromiumUrlRequestContext.
27 */ 27 */
28 private long mChromiumUrlRequestContextAdapter; 28 private long mChromiumUrlRequestContextAdapter;
29 29
30 private final ConditionVariable mStarted = new ConditionVariable(); 30 private final ConditionVariable mStarted = new ConditionVariable();
31 31
32 /** 32 /**
33 * Constructor. 33 * Constructor.
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
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( 134 private native void nativeStartNetLogToFile(
135 long ChromiumUrlRequestContextAdapter, String fileName); 135 long ChromiumUrlRequestContextAdapter, String fileName);
136 136
137 private native void nativeStopNetLog(long ChromiumUrlRequestContextAdapter); 137 private native void nativeStopNetLog(long ChromiumUrlRequestContextAdapter);
138 } 138 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698