Index: components/cronet/android/api/src/org/chromium/net/CronetEngine.java |
diff --git a/components/cronet/android/api/src/org/chromium/net/CronetEngine.java b/components/cronet/android/api/src/org/chromium/net/CronetEngine.java |
index 9316a7c0e25e02ce30f26e93e09645620fe4e0a6..079cefa8ff4994003141eb0672bd2c8e53cc32d9 100644 |
--- a/components/cronet/android/api/src/org/chromium/net/CronetEngine.java |
+++ b/components/cronet/android/api/src/org/chromium/net/CronetEngine.java |
@@ -314,15 +314,34 @@ public abstract class CronetEngine { |
} |
/** |
- * Sets experimental QUIC connection options, overwriting any pre-existing |
- * options. List of options is subject to change. |
+ * Sets experimental options to be used in Cronet. |
* |
- * @param quicConnectionOptions comma-separated QUIC options (for example |
- * "PACE,IW10") to use if QUIC is enabled. |
- * @return the builder to facilitate chaining. |
+ * Experimental options encoded as a string in a JSON format containing |
+ * experiments and their corresponding configuration options. The format |
+ * is a JSON object with the name of the experiment as the key, and |
+ * experiment options as the value; the experiment options for an |
pauljensen
2015/10/30 18:05:23
change semicolon to period?
xunjieli
2015/10/30 18:30:57
Done.
|
+ * experiment is encoded as a JSON object with option name as the key |
pauljensen
2015/10/30 18:05:23
remove "for an experiment"
pauljensen
2015/10/30 18:05:23
is->are
xunjieli
2015/10/30 18:30:57
Done.
xunjieli
2015/10/30 18:30:57
Done.
|
+ * and option value as the value: |
+ * <pre> |
+ * {"experiment1": {"option1": "option_value1", "option2": |
+ * "option_value2", ...}, "experiment2: {"option3", "option_value3", |
+ * ...}, ...} |
+ * </pre> |
+ * Here's an example to set QUIC connection options using this method: |
pauljensen
2015/10/30 18:05:23
I don't think we want specific examples in our pub
xunjieli
2015/10/30 18:30:57
Done.
|
+ * <pre> |
+ * {@code |
+ * JSONObject quicParams = new JSONObject().put("connection_options", |
+ * "PACE,IW10,FOO,DEADBEEF"); |
+ * JSONObject experimentalOptions = new JSONObject().put("QUIC", |
+ * quicParams); |
+ * builder.setExperimentalOptions(experimentalOptions.toString()); |
+ * } |
+ * </pre> |
+ * @param experimentalOptions experimental options as a JSON formatted |
+ * string |
*/ |
- public Builder setExperimentalQuicConnectionOptions(String quicConnectionOptions) { |
- return putString(CronetEngineBuilderList.QUIC_OPTIONS, quicConnectionOptions); |
+ public Builder setExperimentalOptions(String experimentalOptions) { |
+ return putString(CronetEngineBuilderList.EXPERIMENTAL_OPTIONS, experimentalOptions); |
} |
/** |