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; | |
8 | |
7 import org.json.JSONException; | 9 import org.json.JSONException; |
8 | 10 |
9 /** | 11 /** |
10 * A config for HttpUrlRequestFactory, which allows runtime configuration of | 12 * A config for HttpUrlRequestFactory, which allows runtime configuration of |
11 * HttpUrlRequestFactory. | 13 * HttpUrlRequestFactory. |
12 * @deprecated Use {@link UrlRequestContextConfig} instead. | 14 * @deprecated Use {@link CronetEngine.Builder} instead. |
13 */ | 15 */ |
14 @Deprecated | 16 @Deprecated |
15 public class HttpUrlRequestFactoryConfig extends UrlRequestContextConfig { | 17 public class HttpUrlRequestFactoryConfig extends CronetEngine.Builder { |
16 | |
17 /** | 18 /** |
18 * Default config enables SPDY, QUIC, in memory http cache. | 19 * Default config enables SPDY, QUIC, in memory http cache. |
19 */ | 20 */ |
20 public HttpUrlRequestFactoryConfig() { | 21 public HttpUrlRequestFactoryConfig(Context context) { |
mef
2015/10/02 16:46:58
this needs default constructor.
Can we do super(n
pauljensen
2015/10/02 18:23:15
Done.
| |
21 super(); | 22 super(context); |
22 } | 23 } |
23 | 24 |
24 /** | 25 /** |
25 * Create config from json serialized using @toString. | 26 * Create config from json serialized using @toString. |
26 */ | 27 */ |
27 public HttpUrlRequestFactoryConfig(String json) throws JSONException { | 28 public HttpUrlRequestFactoryConfig(Context context, String json) throws JSON Exception { |
28 super(json); | 29 super(context, json); |
29 } | 30 } |
30 } | 31 } |
OLD | NEW |