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

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

Issue 2470903002: Add default implementation of experimental methods (Closed)
Patch Set: Addressed Paul's comments Created 4 years, 1 month 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/api/src/org/chromium/net/ExperimentalCronetEngine.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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 /** 7 /**
8 * {@link BidirectionalStream} that exposes experimental features. 8 * {@link BidirectionalStream} that exposes experimental features.
9 * Created using {@link Builder}. Every instance of {@link BidirectionalStream} can be casted 9 * Created using {@link Builder}. Every instance of {@link BidirectionalStream} can be casted
10 * to an instance of this class. 10 * to an instance of this class.
(...skipping 10 matching lines...) Expand all
21 public abstract static class Builder extends BidirectionalStream.Builder { 21 public abstract static class Builder extends BidirectionalStream.Builder {
22 /** 22 /**
23 * Associates the annotation object with this request. May add more than one. 23 * Associates the annotation object with this request. May add more than one.
24 * Passed through to a {@link RequestFinishedInfo.Listener}, 24 * Passed through to a {@link RequestFinishedInfo.Listener},
25 * see {@link RequestFinishedInfo#getAnnotations}. 25 * see {@link RequestFinishedInfo#getAnnotations}.
26 * 26 *
27 * @param annotation an object to pass on to the {@link RequestFinishedI nfo.Listener} with a 27 * @param annotation an object to pass on to the {@link RequestFinishedI nfo.Listener} with a
28 * {@link RequestFinishedInfo}. 28 * {@link RequestFinishedInfo}.
29 * @return the builder to facilitate chaining. 29 * @return the builder to facilitate chaining.
30 */ 30 */
31 public abstract Builder addRequestAnnotation(Object annotation); 31 public Builder addRequestAnnotation(Object annotation) {
32 return this;
33 }
32 34
33 // To support method chaining, override superclass methods to return an 35 // To support method chaining, override superclass methods to return an
34 // instance of this class instead of the parent. 36 // instance of this class instead of the parent.
35 37
36 @Override 38 @Override
37 public abstract Builder setHttpMethod(String method); 39 public abstract Builder setHttpMethod(String method);
38 40
39 @Override 41 @Override
40 public abstract Builder addHeader(String header, String value); 42 public abstract Builder addHeader(String header, String value);
41 43
42 @Override 44 @Override
43 public abstract Builder setPriority(int priority); 45 public abstract Builder setPriority(int priority);
44 46
45 @Override 47 @Override
46 public abstract Builder delayRequestHeadersUntilFirstFlush( 48 public abstract Builder delayRequestHeadersUntilFirstFlush(
47 boolean delayRequestHeadersUntilFirstFlush); 49 boolean delayRequestHeadersUntilFirstFlush);
48 50
49 @Override 51 @Override
50 public abstract ExperimentalBidirectionalStream build(); 52 public abstract ExperimentalBidirectionalStream build();
51 } 53 }
52 } 54 }
OLDNEW
« no previous file with comments | « no previous file | components/cronet/android/api/src/org/chromium/net/ExperimentalCronetEngine.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698