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.util.Log; | 8 import android.util.Log; |
| 9 | 9 |
| 10 import java.lang.reflect.Constructor; | 10 import java.lang.reflect.Constructor; |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 81 * false, NetLogCaptureMode::Default() is used instead. | 81 * false, NetLogCaptureMode::Default() is used instead. |
| 82 */ | 82 */ |
| 83 public abstract void startNetLogToFile(String fileName, boolean logAll); | 83 public abstract void startNetLogToFile(String fileName, boolean logAll); |
| 84 | 84 |
| 85 /** | 85 /** |
| 86 * Stops NetLog logging and flushes file to disk. If a logging session is | 86 * Stops NetLog logging and flushes file to disk. If a logging session is |
| 87 * not in progress, this call is ignored. | 87 * not in progress, this call is ignored. |
| 88 */ | 88 */ |
| 89 public abstract void stopNetLog(); | 89 public abstract void stopNetLog(); |
| 90 | 90 |
| 91 public abstract void configureNetworkQualityEstimator( | |
|
mef
2015/08/11 17:16:27
need javadoc comments for all of these.
Does it m
bengr
2015/08/25 23:43:34
Done. I don't think a separate interface is needed
| |
| 92 boolean useLocalHostRequests, boolean useSmallerResponses); | |
| 93 public abstract void addRTTObserver(RTTObserver observer); | |
| 94 public abstract void removeRTTObserver(RTTObserver observer); | |
| 95 public abstract void addBandwidthObserver(BandwidthObserver observer); | |
| 96 public abstract void removeBandwidthObserver(BandwidthObserver observer); | |
| 97 | |
| 91 /** | 98 /** |
| 92 * Create context with given config. If config.legacyMode is true, or | 99 * Create context with given config. If config.legacyMode is true, or |
| 93 * native library is not available, then creates HttpUrlConnection-based | 100 * native library is not available, then creates HttpUrlConnection-based |
| 94 * context. | 101 * context. |
| 95 * @param context application context. | 102 * @param context application context. |
| 96 * @param config context configuration. | 103 * @param config context configuration. |
| 97 */ | 104 */ |
| 98 public static UrlRequestContext createContext(Context context, | 105 public static UrlRequestContext createContext(Context context, |
| 99 UrlRequestContextConfig config) { | 106 UrlRequestContextConfig config) { |
| 100 UrlRequestContext urlRequestContext = null; | 107 UrlRequestContext urlRequestContext = null; |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 133 } catch (ClassNotFoundException e) { | 140 } catch (ClassNotFoundException e) { |
| 134 // Leave as null. | 141 // Leave as null. |
| 135 } catch (Exception e) { | 142 } catch (Exception e) { |
| 136 throw new IllegalStateException( | 143 throw new IllegalStateException( |
| 137 "Cannot instantiate: " + CRONET_URL_REQUEST_CONTEXT, | 144 "Cannot instantiate: " + CRONET_URL_REQUEST_CONTEXT, |
| 138 e); | 145 e); |
| 139 } | 146 } |
| 140 return urlRequestContext; | 147 return urlRequestContext; |
| 141 } | 148 } |
| 142 } | 149 } |
| OLD | NEW |