Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(116)

Side by Side Diff: components/cronet/android/api/src/org/chromium/net/CronetEngine.java

Issue 1487723002: [Cronet] Replace setExperimentalQuicConnectionOptions with a more general API (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2564
Patch Set: Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | components/cronet/android/test/javatests/src/org/chromium/net/QuicTest.java » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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.util.Log; 9 import android.util.Log;
10 10
(...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after
296 hint.put(CronetEngineBuilderList.QUIC_HINT_PORT, port); 296 hint.put(CronetEngineBuilderList.QUIC_HINT_PORT, port);
297 hint.put(CronetEngineBuilderList.QUIC_HINT_ALT_PORT, alternatePo rt); 297 hint.put(CronetEngineBuilderList.QUIC_HINT_ALT_PORT, alternatePo rt);
298 quicHints.put(hint); 298 quicHints.put(hint);
299 } catch (JSONException e) { 299 } catch (JSONException e) {
300 // Intentionally do nothing. 300 // Intentionally do nothing.
301 } 301 }
302 return this; 302 return this;
303 } 303 }
304 304
305 /** 305 /**
306 * Sets experimental QUIC connection options, overwriting any pre-existi ng 306 * Sets experimental options to be used in Cronet.
307 * options. List of options is subject to change.
308 * 307 *
309 * @param quicConnectionOptions comma-separated QUIC options (for exampl e 308 * @param options JSON formatted experimental options.
310 * "PACE,IW10") to use if QUIC is enabled.
311 * @return the builder to facilitate chaining. 309 * @return the builder to facilitate chaining.
312 */ 310 */
313 public Builder setExperimentalQuicConnectionOptions(String quicConnectio nOptions) { 311 public Builder setExperimentalOptions(String options) {
314 return putString(CronetEngineBuilderList.QUIC_OPTIONS, quicConnectio nOptions); 312 return putString(CronetEngineBuilderList.EXPERIMENTAL_OPTIONS, optio ns);
315 } 313 }
316 314
317 /** 315 /**
318 * Sets a native MockCertVerifier for testing. 316 * Sets a native MockCertVerifier for testing.
319 */ 317 */
320 Builder setMockCertVerifierForTesting(long mockCertVerifier) { 318 Builder setMockCertVerifierForTesting(long mockCertVerifier) {
321 return putString( 319 return putString(
322 CronetEngineBuilderList.MOCK_CERT_VERIFIER, String.valueOf(m ockCertVerifier)); 320 CronetEngineBuilderList.MOCK_CERT_VERIFIER, String.valueOf(m ockCertVerifier));
323 } 321 }
324 322
(...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after
688 cronetEngine = possibleEngine; 686 cronetEngine = possibleEngine;
689 } 687 }
690 } catch (ClassNotFoundException e) { 688 } catch (ClassNotFoundException e) {
691 // Leave as null. 689 // Leave as null.
692 } catch (Exception e) { 690 } catch (Exception e) {
693 throw new IllegalStateException("Cannot instantiate: " + CRONET_URL_ REQUEST_CONTEXT, e); 691 throw new IllegalStateException("Cannot instantiate: " + CRONET_URL_ REQUEST_CONTEXT, e);
694 } 692 }
695 return cronetEngine; 693 return cronetEngine;
696 } 694 }
697 } 695 }
OLDNEW
« no previous file with comments | « no previous file | components/cronet/android/test/javatests/src/org/chromium/net/QuicTest.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698