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

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

Issue 2805053005: [Cronet] Enable Brotli (Closed)
Patch Set: add test Created 3 years, 8 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.net.http.HttpResponseCache; 8 import android.net.http.HttpResponseCache;
9 import android.support.annotation.VisibleForTesting; 9 import android.support.annotation.VisibleForTesting;
10 10
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 * SDCH</a> compression is enabled. Defaults to disabled. 165 * SDCH</a> compression is enabled. Defaults to disabled.
166 * @param value {@code true} to enable SDCH, {@code false} to disable. 166 * @param value {@code true} to enable SDCH, {@code false} to disable.
167 * @return the builder to facilitate chaining. 167 * @return the builder to facilitate chaining.
168 */ 168 */
169 public Builder enableSdch(boolean value) { 169 public Builder enableSdch(boolean value) {
170 mBuilderDelegate.enableSdch(value); 170 mBuilderDelegate.enableSdch(value);
171 return this; 171 return this;
172 } 172 }
173 173
174 /** 174 /**
175 * Sets whether <a href="https://tools.ietf.org/html/rfc7932">Brotli</a> compression is
176 * enabled. If enabled, Brotli will be advertised in Accept-Encoding req uest headers.
177 * Defaults to disabled.
178 * @param value {@code true} to enable Brotli, {@code false} to disable.
179 * @return the builder to facilitate chaining.
180 */
181 public Builder enableBrotli(boolean value) {
mef 2017/04/12 17:45:49 Addition of public API requires to bump API versio
xunjieli 2017/04/13 21:26:14 Done.
182 mBuilderDelegate.enableBrotli(value);
183 return this;
184 }
185
186 /**
175 * Setting to disable HTTP cache. Some data may still be temporarily sto red in memory. 187 * Setting to disable HTTP cache. Some data may still be temporarily sto red in memory.
176 * Passed to {@link #enableHttpCache}. 188 * Passed to {@link #enableHttpCache}.
177 */ 189 */
178 public static final int HTTP_CACHE_DISABLED = 0; 190 public static final int HTTP_CACHE_DISABLED = 0;
179 191
180 /** 192 /**
181 * Setting to enable in-memory HTTP cache, including HTTP data. 193 * Setting to enable in-memory HTTP cache, including HTTP data.
182 * Passed to {@link #enableHttpCache}. 194 * Passed to {@link #enableHttpCache}.
183 */ 195 */
184 public static final int HTTP_CACHE_IN_MEMORY = 1; 196 public static final int HTTP_CACHE_IN_MEMORY = 1;
(...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after
516 * thread calling {@link Executor#execute} to prevent blocking networking 528 * thread calling {@link Executor#execute} to prevent blocking networking
517 * operations and causing exceptions during shutdown. 529 * operations and causing exceptions during shutdown.
518 * 530 *
519 * @param url URL for the generated requests. 531 * @param url URL for the generated requests.
520 * @param callback callback object that gets invoked on different events. 532 * @param callback callback object that gets invoked on different events.
521 * @param executor {@link Executor} on which all callbacks will be invoked. 533 * @param executor {@link Executor} on which all callbacks will be invoked.
522 */ 534 */
523 public abstract UrlRequest.Builder newUrlRequestBuilder( 535 public abstract UrlRequest.Builder newUrlRequestBuilder(
524 String url, UrlRequest.Callback callback, Executor executor); 536 String url, UrlRequest.Callback callback, Executor executor);
525 } 537 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698