Chromium Code Reviews| 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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 71 /** | 71 /** |
| 72 * Gets current statistics recorded since |initializeStatistics| with | 72 * Gets current statistics recorded since |initializeStatistics| with |
| 73 * |filter| as a substring as JSON text (an empty |filter| will include all | 73 * |filter| as a substring as JSON text (an empty |filter| will include all |
| 74 * registered histograms). | 74 * registered histograms). |
| 75 */ | 75 */ |
| 76 public String getStatisticsJSON(String filter) { | 76 public String getStatisticsJSON(String filter) { |
| 77 return nativeGetStatisticsJSON(filter); | 77 return nativeGetStatisticsJSON(filter); |
| 78 } | 78 } |
| 79 | 79 |
| 80 /** | 80 /** |
| 81 * Starts NetLog logging to a file. The NetLog capture mode is | 81 * Starts NetLog logging to a file. The NetLog capture mode is either |
| 82 * NetLogCaptureMode::Default(). | 82 * NetLogCaptureMode::Default() or NetLogCaptureMode::IncludeSocketBytes(). |
| 83 * @param fileName The complete file path. It must not be empty. If file | 83 * @param fileName The complete file path. It must not be empty. If file |
| 84 * exists, it is truncated before starting. If actively logging, | 84 * exists, it is truncated before starting. If actively logging, |
| 85 * this method is ignored. | 85 * this method is ignored. |
| 86 * @param logAll {@code true} to use the NetLogCaptureMode::Default() | |
|
eroman
2015/05/06 17:34:19
This comment is reversed. true=IncludeSocketBytes,
kallasjoki
2015/05/06 17:47:08
Done. (I got them completely flipped when adjustin
| |
| 87 * logging level. If false, | |
| 88 * NetLogCaptureMode::IncludeSocketBytes() is used instead. | |
| 86 */ | 89 */ |
| 87 public void startNetLogToFile(String fileName) { | 90 public void startNetLogToFile(String fileName, boolean logAll) { |
| 88 nativeStartNetLogToFile(mChromiumUrlRequestContextAdapter, fileName); | 91 nativeStartNetLogToFile(mChromiumUrlRequestContextAdapter, fileName, |
| 92 logAll); | |
| 89 } | 93 } |
| 90 | 94 |
| 91 /** | 95 /** |
| 92 * Stops NetLog logging and flushes file to disk. If a logging session is | 96 * Stops NetLog logging and flushes file to disk. If a logging session is |
| 93 * not in progress, this call is ignored. | 97 * not in progress, this call is ignored. |
| 94 */ | 98 */ |
| 95 public void stopNetLog() { | 99 public void stopNetLog() { |
| 96 nativeStopNetLog(mChromiumUrlRequestContextAdapter); | 100 nativeStopNetLog(mChromiumUrlRequestContextAdapter); |
| 97 } | 101 } |
| 98 | 102 |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 143 String userAgent, int loggingLevel, String config); | 147 String userAgent, int loggingLevel, String config); |
| 144 | 148 |
| 145 private native void nativeReleaseRequestContextAdapter( | 149 private native void nativeReleaseRequestContextAdapter( |
| 146 long chromiumUrlRequestContextAdapter); | 150 long chromiumUrlRequestContextAdapter); |
| 147 | 151 |
| 148 private native void nativeInitializeStatistics(); | 152 private native void nativeInitializeStatistics(); |
| 149 | 153 |
| 150 private native String nativeGetStatisticsJSON(String filter); | 154 private native String nativeGetStatisticsJSON(String filter); |
| 151 | 155 |
| 152 private native void nativeStartNetLogToFile( | 156 private native void nativeStartNetLogToFile( |
| 153 long chromiumUrlRequestContextAdapter, String fileName); | 157 long chromiumUrlRequestContextAdapter, String fileName, |
| 158 boolean logAll); | |
| 154 | 159 |
| 155 private native void nativeStopNetLog(long chromiumUrlRequestContextAdapter); | 160 private native void nativeStopNetLog(long chromiumUrlRequestContextAdapter); |
| 156 | 161 |
| 157 private native void nativeInitRequestContextOnMainThread( | 162 private native void nativeInitRequestContextOnMainThread( |
| 158 long chromiumUrlRequestContextAdapter); | 163 long chromiumUrlRequestContextAdapter); |
| 159 } | 164 } |
| OLD | NEW |