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

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

Issue 2055083002: [Cronet] Fix CronetFixedModeOutputStream to not write more bytes than specified (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address comments Created 4 years, 6 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.annotation.SuppressLint; 7 import android.annotation.SuppressLint;
8 import android.content.Context; 8 import android.content.Context;
9 import android.net.http.HttpResponseCache; 9 import android.net.http.HttpResponseCache;
10 import android.support.annotation.IntDef; 10 import android.support.annotation.IntDef;
11 import android.support.annotation.Nullable; 11 import android.support.annotation.Nullable;
12 import android.support.annotation.VisibleForTesting;
12 import android.util.Log; 13 import android.util.Log;
13 14
14 import java.io.File; 15 import java.io.File;
15 import java.io.IOException; 16 import java.io.IOException;
16 import java.lang.annotation.Retention; 17 import java.lang.annotation.Retention;
17 import java.lang.annotation.RetentionPolicy; 18 import java.lang.annotation.RetentionPolicy;
18 import java.lang.reflect.Constructor; 19 import java.lang.reflect.Constructor;
19 import java.net.IDN; 20 import java.net.IDN;
20 import java.net.Proxy; 21 import java.net.Proxy;
21 import java.net.URL; 22 import java.net.URL;
(...skipping 561 matching lines...) Expand 10 before | Expand all | Expand 10 after
583 String experimentalOptions() { 584 String experimentalOptions() {
584 return mExperimentalOptions; 585 return mExperimentalOptions;
585 } 586 }
586 587
587 /** 588 /**
588 * Sets a native MockCertVerifier for testing. See 589 * Sets a native MockCertVerifier for testing. See
589 * {@code MockCertVerifier.createMockCertVerifier} for a method that 590 * {@code MockCertVerifier.createMockCertVerifier} for a method that
590 * can be used to create a MockCertVerifier. 591 * can be used to create a MockCertVerifier.
591 * @param mockCertVerifier pointer to native MockCertVerifier. 592 * @param mockCertVerifier pointer to native MockCertVerifier.
592 * @return the builder to facilitate chaining. 593 * @return the builder to facilitate chaining.
594 * @hide
593 */ 595 */
594 Builder setMockCertVerifierForTesting(long mockCertVerifier) { 596 @VisibleForTesting
597 public Builder setMockCertVerifierForTesting(long mockCertVerifier) {
595 mMockCertVerifier = mockCertVerifier; 598 mMockCertVerifier = mockCertVerifier;
596 return this; 599 return this;
597 } 600 }
598 601
599 long mockCertVerifier() { 602 long mockCertVerifier() {
600 return mMockCertVerifier; 603 return mMockCertVerifier;
601 } 604 }
602 605
603 /** 606 /**
604 * Returns {@link Context} for builder. 607 * Returns {@link Context} for builder.
(...skipping 505 matching lines...) Expand 10 before | Expand all | Expand 10 after
1110 * @hide as it's a prototype. 1113 * @hide as it's a prototype.
1111 */ 1114 */
1112 public interface RequestFinishedListener { // TODO(klm): Add a convenience a bstract class. 1115 public interface RequestFinishedListener { // TODO(klm): Add a convenience a bstract class.
1113 /** 1116 /**
1114 * Invoked with request info. 1117 * Invoked with request info.
1115 * @param requestInfo {@link UrlRequestInfo} for finished request. 1118 * @param requestInfo {@link UrlRequestInfo} for finished request.
1116 */ 1119 */
1117 void onRequestFinished(UrlRequestInfo requestInfo); 1120 void onRequestFinished(UrlRequestInfo requestInfo);
1118 } 1121 }
1119 } 1122 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698