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.util.Log; | 8 import android.util.Log; |
9 | 9 |
10 import java.lang.reflect.Constructor; | 10 import java.lang.reflect.Constructor; |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
49 * otherwise throws an exception. | 49 * otherwise throws an exception. |
50 * | 50 * |
51 * Cannot be called on network thread - the thread Cronet calls into | 51 * Cannot be called on network thread - the thread Cronet calls into |
52 * Executor on (which is different from the thread the Executor invokes | 52 * Executor on (which is different from the thread the Executor invokes |
53 * callbacks on). May block until all the Context's resources have been | 53 * callbacks on). May block until all the Context's resources have been |
54 * cleaned up. | 54 * cleaned up. |
55 */ | 55 */ |
56 public abstract void shutdown(); | 56 public abstract void shutdown(); |
57 | 57 |
58 /** | 58 /** |
59 * Starts NetLog logging to a file. The NetLog log level used is | 59 * Starts NetLog logging to a file. The NetLog capture mode used is |
60 * LOG_ALL_BUT_BYTES. | 60 * NetLogCaptureMode::Default(). |
mmenke
2015/04/22 18:52:17
IncludeCookiesAndCredentials()
eroman
2015/04/22 20:01:47
This is intentional, the previous comment was wron
| |
61 * @param fileName The complete file path. It must not be empty. If file | 61 * @param fileName The complete file path. It must not be empty. If file |
62 * exists, it is truncated before starting. If actively logging, | 62 * exists, it is truncated before starting. If actively logging, |
63 * this method is ignored. | 63 * this method is ignored. |
64 */ | 64 */ |
65 public abstract void startNetLogToFile(String fileName); | 65 public abstract void startNetLogToFile(String fileName); |
66 | 66 |
67 /** | 67 /** |
68 * Stops NetLog logging and flushes file to disk. If a logging session is | 68 * Stops NetLog logging and flushes file to disk. If a logging session is |
69 * not in progress, this call is ignored. | 69 * not in progress, this call is ignored. |
70 */ | 70 */ |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
115 } catch (ClassNotFoundException e) { | 115 } catch (ClassNotFoundException e) { |
116 // Leave as null. | 116 // Leave as null. |
117 } catch (Exception e) { | 117 } catch (Exception e) { |
118 throw new IllegalStateException( | 118 throw new IllegalStateException( |
119 "Cannot instantiate: " + CRONET_URL_REQUEST_CONTEXT, | 119 "Cannot instantiate: " + CRONET_URL_REQUEST_CONTEXT, |
120 e); | 120 e); |
121 } | 121 } |
122 return urlRequestContext; | 122 return urlRequestContext; |
123 } | 123 } |
124 } | 124 } |
OLD | NEW |