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; |
(...skipping 647 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
658 cronetEngine = new JavaCronetEngine(getUserAgent()); | 658 cronetEngine = new JavaCronetEngine(getUserAgent()); |
659 } | 659 } |
660 Log.i(TAG, "Using network stack: " + cronetEngine.getVersionString()
); | 660 Log.i(TAG, "Using network stack: " + cronetEngine.getVersionString()
); |
661 // Clear MOCK_CERT_VERIFIER reference if there is any, since | 661 // Clear MOCK_CERT_VERIFIER reference if there is any, since |
662 // the ownership has been transferred to the engine. | 662 // the ownership has been transferred to the engine. |
663 mMockCertVerifier = 0; | 663 mMockCertVerifier = 0; |
664 return cronetEngine; | 664 return cronetEngine; |
665 } | 665 } |
666 } | 666 } |
667 | 667 |
668 private static final String TAG = "UrlRequestFactory"; | 668 private static final String TAG = CronetEngine.class.getSimpleName(); |
669 private static final String CRONET_URL_REQUEST_CONTEXT = | 669 private static final String CRONET_URL_REQUEST_CONTEXT = |
670 "org.chromium.net.CronetUrlRequestContext"; | 670 "org.chromium.net.CronetUrlRequestContext"; |
671 | 671 |
672 /** | 672 /** |
673 * Creates a {@link UrlRequest} object. All callbacks will | 673 * Creates a {@link UrlRequest} object. All callbacks will |
674 * be called on {@code executor}'s thread. {@code executor} must not run | 674 * be called on {@code executor}'s thread. {@code executor} must not run |
675 * tasks on the current thread to prevent blocking networking operations | 675 * tasks on the current thread to prevent blocking networking operations |
676 * and causing exceptions during shutdown. Request is given medium priority, | 676 * and causing exceptions during shutdown. Request is given medium priority, |
677 * see {@link UrlRequest.Builder#REQUEST_PRIORITY_MEDIUM}. To specify other | 677 * see {@link UrlRequest.Builder#REQUEST_PRIORITY_MEDIUM}. To specify other |
678 * priorities see {@link #createRequest(String, UrlRequest.Callback, | 678 * priorities see {@link #createRequest(String, UrlRequest.Callback, |
(...skipping 468 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1147 * @hide as it's a prototype. | 1147 * @hide as it's a prototype. |
1148 */ | 1148 */ |
1149 public interface RequestFinishedListener { | 1149 public interface RequestFinishedListener { |
1150 /** | 1150 /** |
1151 * Invoked with request info. | 1151 * Invoked with request info. |
1152 * @param requestInfo {@link UrlRequestInfo} for finished request. | 1152 * @param requestInfo {@link UrlRequestInfo} for finished request. |
1153 */ | 1153 */ |
1154 void onRequestFinished(UrlRequestInfo requestInfo); | 1154 void onRequestFinished(UrlRequestInfo requestInfo); |
1155 } | 1155 } |
1156 } | 1156 } |
OLD | NEW |