| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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.support.annotation.IntDef; | 8 import android.support.annotation.IntDef; |
| 9 import android.support.annotation.Nullable; | 9 import android.support.annotation.Nullable; |
| 10 import android.util.Log; | 10 import android.util.Log; |
| (...skipping 710 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 721 * otherwise throws an exception. | 721 * otherwise throws an exception. |
| 722 * | 722 * |
| 723 * Cannot be called on network thread - the thread Cronet calls into | 723 * Cannot be called on network thread - the thread Cronet calls into |
| 724 * Executor on (which is different from the thread the Executor invokes | 724 * Executor on (which is different from the thread the Executor invokes |
| 725 * callbacks on). May block until all the {@code CronetEngine}'s | 725 * callbacks on). May block until all the {@code CronetEngine}'s |
| 726 * resources have been cleaned up. | 726 * resources have been cleaned up. |
| 727 */ | 727 */ |
| 728 public abstract void shutdown(); | 728 public abstract void shutdown(); |
| 729 | 729 |
| 730 /** | 730 /** |
| 731 * Starts NetLog logging to a file. The NetLog is useful for debugging. | 731 * Starts NetLog logging to a file. The NetLog will contain events emitted |
| 732 * by all live CronetEngines. The NetLog is useful for debugging. |
| 732 * The file can be viewed using a Chrome browser navigated to | 733 * The file can be viewed using a Chrome browser navigated to |
| 733 * chrome://net-internals/#import | 734 * chrome://net-internals/#import |
| 734 * @param fileName the complete file path. It must not be empty. If the file | 735 * @param fileName the complete file path. It must not be empty. If the file |
| 735 * exists, it is truncated before starting. If actively logging, | 736 * exists, it is truncated before starting. If actively logging, |
| 736 * this method is ignored. | 737 * this method is ignored. |
| 737 * @param logAll {@code true} to include basic events, user cookies, | 738 * @param logAll {@code true} to include basic events, user cookies, |
| 738 * credentials and all transferred bytes in the log. | 739 * credentials and all transferred bytes in the log. |
| 739 * {@code false} to just include basic events. | 740 * {@code false} to just include basic events. |
| 740 */ | 741 */ |
| 741 public abstract void startNetLogToFile(String fileName, boolean logAll); | 742 public abstract void startNetLogToFile(String fileName, boolean logAll); |
| (...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1102 */ | 1103 */ |
| 1103 @Deprecated | 1104 @Deprecated |
| 1104 public interface RequestFinishedListener { // TODO(klm): Add a convenience a
bstract class. | 1105 public interface RequestFinishedListener { // TODO(klm): Add a convenience a
bstract class. |
| 1105 /** | 1106 /** |
| 1106 * Invoked with request info. | 1107 * Invoked with request info. |
| 1107 * @param requestInfo {@link UrlRequestInfo} for finished request. | 1108 * @param requestInfo {@link UrlRequestInfo} for finished request. |
| 1108 */ | 1109 */ |
| 1109 void onRequestFinished(UrlRequestInfo requestInfo); | 1110 void onRequestFinished(UrlRequestInfo requestInfo); |
| 1110 } | 1111 } |
| 1111 } | 1112 } |
| OLD | NEW |