Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 560 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 582 | 583 |
| 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. |
|
pauljensen
2016/06/14 12:50:31
needs @hide
xunjieli
2016/06/14 13:12:48
Done.
| |
| 593 */ | 594 */ |
| 594 Builder setMockCertVerifierForTesting(long mockCertVerifier) { | 595 @VisibleForTesting |
| 596 public Builder setMockCertVerifierForTesting(long mockCertVerifier) { | |
| 595 mMockCertVerifier = mockCertVerifier; | 597 mMockCertVerifier = mockCertVerifier; |
| 596 return this; | 598 return this; |
| 597 } | 599 } |
| 598 | 600 |
| 599 long mockCertVerifier() { | 601 long mockCertVerifier() { |
| 600 return mMockCertVerifier; | 602 return mMockCertVerifier; |
| 601 } | 603 } |
| 602 | 604 |
| 603 /** | 605 /** |
| 604 * Returns {@link Context} for builder. | 606 * Returns {@link Context} for builder. |
| (...skipping 505 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1110 * @hide as it's a prototype. | 1112 * @hide as it's a prototype. |
| 1111 */ | 1113 */ |
| 1112 public interface RequestFinishedListener { // TODO(klm): Add a convenience a bstract class. | 1114 public interface RequestFinishedListener { // TODO(klm): Add a convenience a bstract class. |
| 1113 /** | 1115 /** |
| 1114 * Invoked with request info. | 1116 * Invoked with request info. |
| 1115 * @param requestInfo {@link UrlRequestInfo} for finished request. | 1117 * @param requestInfo {@link UrlRequestInfo} for finished request. |
| 1116 */ | 1118 */ |
| 1117 void onRequestFinished(UrlRequestInfo requestInfo); | 1119 void onRequestFinished(UrlRequestInfo requestInfo); |
| 1118 } | 1120 } |
| 1119 } | 1121 } |
| OLD | NEW |