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

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

Issue 1665503002: [Cronet] Expose quic_user_agent_id and quic_prefer_aes config options. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Document QUIC UAID string usage, don't pass it down unless QUIC is enabled. Created 4 years, 10 months 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 side-by-side diff with in-line comments
Download patch
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 a07ae3cc9248805605176b6d23c92ecf1ac82bdf..a249839fbcf91ceae3f34edb100e464eee53a356 100644
--- a/components/cronet/android/api/src/org/chromium/net/CronetEngine.java
+++ b/components/cronet/android/api/src/org/chromium/net/CronetEngine.java
@@ -131,8 +131,8 @@ public abstract class CronetEngine {
}
/**
- * Constructs a User-Agent string including Cronet version, and
- * application name and version.
+ * Constructs a User-Agent string including application name and version,
+ * system build version, model and id, and Cronet version.
*
* @return User-Agent string.
*/
@@ -240,7 +240,8 @@ public abstract class CronetEngine {
/**
* Sets whether <a href="https://www.chromium.org/quic">QUIC</a> protocol
- * is enabled. Defaults to disabled.
+ * is enabled. Defaults to disabled. If QUIC is enabled, then QUIC User Agent Id
+ * containing application name and Cronet version is sent to the server.
* @param value {@code true} to enable QUIC, {@code false} to disable.
* @return the builder to facilitate chaining.
*/
@@ -254,6 +255,16 @@ public abstract class CronetEngine {
}
/**
+ * Constructs default QUIC User Agent Id string including application name
+ * and Cronet version. Returns empty string if QUIC is not enabled.
+ *
+ * @return QUIC User Agent ID string.
+ */
+ String getDefaultQuicUserAgentId() {
+ return mQuicEnabled ? UserAgent.getQuicUserAgentIdFrom(mContext) : "";
+ }
+
+ /**
* Sets whether <a href="https://tools.ietf.org/html/rfc7540">HTTP/2</a>
* protocol is enabled. Defaults to enabled.
* @param value {@code true} to enable HTTP/2, {@code false} to disable.
« no previous file with comments | « components/cronet/android/BUILD.gn ('k') | components/cronet/android/api/src/org/chromium/net/UserAgent.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698