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

Side by Side 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: Sync 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 unified diff | Download patch
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.support.annotation.Nullable; 9 import android.support.annotation.Nullable;
10 import android.util.Log; 10 import android.util.Log;
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 mContext = context; 124 mContext = context;
125 setLibraryName("cronet"); 125 setLibraryName("cronet");
126 enableLegacyMode(false); 126 enableLegacyMode(false);
127 enableQUIC(false); 127 enableQUIC(false);
128 enableHTTP2(true); 128 enableHTTP2(true);
129 enableSDCH(false); 129 enableSDCH(false);
130 enableHttpCache(HTTP_CACHE_DISABLED, 0); 130 enableHttpCache(HTTP_CACHE_DISABLED, 0);
131 } 131 }
132 132
133 /** 133 /**
134 * Constructs a User-Agent string including Cronet version, and 134 * Constructs a User-Agent string including application name and version ,
135 * application name and version. 135 * system build version, model and id, and Cronet version.
136 * 136 *
137 * @return User-Agent string. 137 * @return User-Agent string.
138 */ 138 */
139 public String getDefaultUserAgent() { 139 public String getDefaultUserAgent() {
140 return UserAgent.from(mContext); 140 return UserAgent.from(mContext);
141 } 141 }
142 142
143 /** 143 /**
144 * Overrides the User-Agent header for all requests. An explicitly 144 * Overrides the User-Agent header for all requests. An explicitly
145 * set User-Agent header (set using 145 * set User-Agent header (set using
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
247 public Builder enableQUIC(boolean value) { 247 public Builder enableQUIC(boolean value) {
248 mQuicEnabled = value; 248 mQuicEnabled = value;
249 return this; 249 return this;
250 } 250 }
251 251
252 boolean quicEnabled() { 252 boolean quicEnabled() {
253 return mQuicEnabled; 253 return mQuicEnabled;
254 } 254 }
255 255
256 /** 256 /**
257 * Constructs default QUIC User Agent Id string including application na me
258 * and Cronet version.
259 *
260 * @return QUIC User Agent ID string.
261 */
262 String getDefaultQuicUserAgentId() {
263 return UserAgent.getQuicUserAgentIdFrom(mContext);
264 }
265
266 /**
257 * Sets whether <a href="https://tools.ietf.org/html/rfc7540">HTTP/2</a> 267 * Sets whether <a href="https://tools.ietf.org/html/rfc7540">HTTP/2</a>
258 * protocol is enabled. Defaults to enabled. 268 * protocol is enabled. Defaults to enabled.
259 * @param value {@code true} to enable HTTP/2, {@code false} to disable. 269 * @param value {@code true} to enable HTTP/2, {@code false} to disable.
260 * @return the builder to facilitate chaining. 270 * @return the builder to facilitate chaining.
261 */ 271 */
262 public Builder enableHTTP2(boolean value) { 272 public Builder enableHTTP2(boolean value) {
263 mHttp2Enabled = value; 273 mHttp2Enabled = value;
264 return this; 274 return this;
265 } 275 }
266 276
(...skipping 822 matching lines...) Expand 10 before | Expand all | Expand 10 after
1089 */ 1099 */
1090 @Deprecated 1100 @Deprecated
1091 public interface RequestFinishedListener { // TODO(klm): Add a convenience a bstract class. 1101 public interface RequestFinishedListener { // TODO(klm): Add a convenience a bstract class.
1092 /** 1102 /**
1093 * Invoked with request info. 1103 * Invoked with request info.
1094 * @param requestInfo {@link UrlRequestInfo} for finished request. 1104 * @param requestInfo {@link UrlRequestInfo} for finished request.
1095 */ 1105 */
1096 void onRequestFinished(UrlRequestInfo requestInfo); 1106 void onRequestFinished(UrlRequestInfo requestInfo);
1097 } 1107 }
1098 } 1108 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698