| 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.util.Log; | 8 import android.util.Log; |
| 9 | 9 |
| 10 import org.json.JSONArray; | 10 import org.json.JSONArray; |
| (...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 285 * | 285 * |
| 286 * @param quicConnectionOptions comma-separated QUIC options (for exampl
e | 286 * @param quicConnectionOptions comma-separated QUIC options (for exampl
e |
| 287 * "PACE,IW10") to use if QUIC is enabled. | 287 * "PACE,IW10") to use if QUIC is enabled. |
| 288 * @return the builder to facilitate chaining. | 288 * @return the builder to facilitate chaining. |
| 289 */ | 289 */ |
| 290 public Builder setExperimentalQuicConnectionOptions(String quicConnectio
nOptions) { | 290 public Builder setExperimentalQuicConnectionOptions(String quicConnectio
nOptions) { |
| 291 return putString(CronetEngineBuilderList.QUIC_OPTIONS, quicConnectio
nOptions); | 291 return putString(CronetEngineBuilderList.QUIC_OPTIONS, quicConnectio
nOptions); |
| 292 } | 292 } |
| 293 | 293 |
| 294 /** | 294 /** |
| 295 * Sets a list of of mock certs to trust in testing. |
| 296 * @param mockCerts a comma delimited list of cert files. |
| 297 */ |
| 298 Builder setMockCertsForTesting(String mockCerts) { |
| 299 return putString(CronetEngineBuilderList.MOCK_CERTS_FOR_TESTING, moc
kCerts); |
| 300 } |
| 301 |
| 302 /** |
| 295 * Get JSON string representation of the builder. | 303 * Get JSON string representation of the builder. |
| 296 */ | 304 */ |
| 297 @Override | 305 @Override |
| 298 public String toString() { | 306 public String toString() { |
| 299 return mConfig.toString(); | 307 return mConfig.toString(); |
| 300 } | 308 } |
| 301 | 309 |
| 302 /** | 310 /** |
| 303 * Returns {@link Context} for builder. | 311 * Returns {@link Context} for builder. |
| 304 * | 312 * |
| (...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 554 cronetEngine = possibleEngine; | 562 cronetEngine = possibleEngine; |
| 555 } | 563 } |
| 556 } catch (ClassNotFoundException e) { | 564 } catch (ClassNotFoundException e) { |
| 557 // Leave as null. | 565 // Leave as null. |
| 558 } catch (Exception e) { | 566 } catch (Exception e) { |
| 559 throw new IllegalStateException("Cannot instantiate: " + CRONET_URL_
REQUEST_CONTEXT, e); | 567 throw new IllegalStateException("Cannot instantiate: " + CRONET_URL_
REQUEST_CONTEXT, e); |
| 560 } | 568 } |
| 561 return cronetEngine; | 569 return cronetEngine; |
| 562 } | 570 } |
| 563 } | 571 } |
| OLD | NEW |