| 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.Handler; | 8 import android.os.Handler; |
| 9 import android.os.Looper; | 9 import android.os.Looper; |
| 10 import android.os.Process; | 10 import android.os.Process; |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 /** | 70 /** |
| 71 * Gets current statistics recorded since |initializeStatistics| with | 71 * Gets current statistics recorded since |initializeStatistics| with |
| 72 * |filter| as a substring as JSON text (an empty |filter| will include all | 72 * |filter| as a substring as JSON text (an empty |filter| will include all |
| 73 * registered histograms). | 73 * registered histograms). |
| 74 */ | 74 */ |
| 75 public String getStatisticsJSON(String filter) { | 75 public String getStatisticsJSON(String filter) { |
| 76 return nativeGetStatisticsJSON(filter); | 76 return nativeGetStatisticsJSON(filter); |
| 77 } | 77 } |
| 78 | 78 |
| 79 /** | 79 /** |
| 80 * Starts NetLog logging to a file. The NetLog log level used is | 80 * Starts NetLog logging to a file. The NetLog capture mode is |
| 81 * LOG_ALL_BUT_BYTES. | 81 * NetLogCaptureMode::Default(). |
| 82 * @param fileName The complete file path. It must not be empty. If file | 82 * @param fileName The complete file path. It must not be empty. If file |
| 83 * exists, it is truncated before starting. If actively logging, | 83 * exists, it is truncated before starting. If actively logging, |
| 84 * this method is ignored. | 84 * this method is ignored. |
| 85 */ | 85 */ |
| 86 public void startNetLogToFile(String fileName) { | 86 public void startNetLogToFile(String fileName) { |
| 87 nativeStartNetLogToFile(mChromiumUrlRequestContextAdapter, fileName); | 87 nativeStartNetLogToFile(mChromiumUrlRequestContextAdapter, fileName); |
| 88 } | 88 } |
| 89 | 89 |
| 90 /** | 90 /** |
| 91 * Stops NetLog logging and flushes file to disk. If a logging session is | 91 * Stops NetLog logging and flushes file to disk. If a logging session is |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 140 private native String nativeGetStatisticsJSON(String filter); | 140 private native String nativeGetStatisticsJSON(String filter); |
| 141 | 141 |
| 142 private native void nativeStartNetLogToFile( | 142 private native void nativeStartNetLogToFile( |
| 143 long chromiumUrlRequestContextAdapter, String fileName); | 143 long chromiumUrlRequestContextAdapter, String fileName); |
| 144 | 144 |
| 145 private native void nativeStopNetLog(long chromiumUrlRequestContextAdapter); | 145 private native void nativeStopNetLog(long chromiumUrlRequestContextAdapter); |
| 146 | 146 |
| 147 private native void nativeInitRequestContextOnMainThread( | 147 private native void nativeInitRequestContextOnMainThread( |
| 148 long chromiumUrlRequestContextAdapter); | 148 long chromiumUrlRequestContextAdapter); |
| 149 } | 149 } |
| OLD | NEW |