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 log level used is either |
81 * LOG_ALL_BUT_BYTES. | 81 * LOG_STRIP_PRIVATE_DATA or LOG_ALL. |
eroman
2015/04/17 21:35:10
Note that LOG_STRIP_PRIVATE_DATA will soon be name
kallasjoki
2015/05/06 13:58:56
Acknowledged.
| |
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 * @param logAll {@code true} to use the LOG_ALL logging level. If false, | |
86 * LOG_STRIP_PRIVATE_DATA is used instead. | |
85 */ | 87 */ |
86 public void startNetLogToFile(String fileName) { | 88 public void startNetLogToFile(String fileName, boolean logAll) { |
87 nativeStartNetLogToFile(mChromiumUrlRequestContextAdapter, fileName); | 89 nativeStartNetLogToFile(mChromiumUrlRequestContextAdapter, fileName, |
90 logAll); | |
88 } | 91 } |
89 | 92 |
90 /** | 93 /** |
91 * Stops NetLog logging and flushes file to disk. If a logging session is | 94 * Stops NetLog logging and flushes file to disk. If a logging session is |
92 * not in progress, this call is ignored. | 95 * not in progress, this call is ignored. |
93 */ | 96 */ |
94 public void stopNetLog() { | 97 public void stopNetLog() { |
95 nativeStopNetLog(mChromiumUrlRequestContextAdapter); | 98 nativeStopNetLog(mChromiumUrlRequestContextAdapter); |
96 } | 99 } |
97 | 100 |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
133 String userAgent, int loggingLevel, String config); | 136 String userAgent, int loggingLevel, String config); |
134 | 137 |
135 private native void nativeReleaseRequestContextAdapter( | 138 private native void nativeReleaseRequestContextAdapter( |
136 long chromiumUrlRequestContextAdapter); | 139 long chromiumUrlRequestContextAdapter); |
137 | 140 |
138 private native void nativeInitializeStatistics(); | 141 private native void nativeInitializeStatistics(); |
139 | 142 |
140 private native String nativeGetStatisticsJSON(String filter); | 143 private native String nativeGetStatisticsJSON(String filter); |
141 | 144 |
142 private native void nativeStartNetLogToFile( | 145 private native void nativeStartNetLogToFile( |
143 long chromiumUrlRequestContextAdapter, String fileName); | 146 long chromiumUrlRequestContextAdapter, String fileName, |
147 boolean logAll); | |
144 | 148 |
145 private native void nativeStopNetLog(long chromiumUrlRequestContextAdapter); | 149 private native void nativeStopNetLog(long chromiumUrlRequestContextAdapter); |
146 | 150 |
147 private native void nativeInitRequestContextOnMainThread( | 151 private native void nativeInitRequestContextOnMainThread( |
148 long chromiumUrlRequestContextAdapter); | 152 long chromiumUrlRequestContextAdapter); |
149 } | 153 } |
OLD | NEW |