Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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.impl; | 5 package org.chromium.net.impl; |
| 6 | 6 |
| 7 import android.os.SystemClock; | 7 import android.os.SystemClock; |
| 8 import android.support.annotation.Nullable; | 8 import android.support.annotation.Nullable; |
| 9 import android.util.Log; | 9 import android.util.Log; |
| 10 | 10 |
| (...skipping 474 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 485 }; | 485 }; |
| 486 postTaskToExecutor(task); | 486 postTaskToExecutor(task); |
| 487 } | 487 } |
| 488 | 488 |
| 489 //////////////////////////////////////////////// | 489 //////////////////////////////////////////////// |
| 490 // Private methods called by the native code. | 490 // Private methods called by the native code. |
| 491 // Always called on network thread. | 491 // Always called on network thread. |
| 492 //////////////////////////////////////////////// | 492 //////////////////////////////////////////////// |
| 493 | 493 |
| 494 /** | 494 /** |
| 495 * Called before following redirects. The redirect will automatically be | 495 * Called before following redirects. The redirect will only be followed if followRedirect() is |
|
xunjieli
2016/07/26 21:11:08
This line seems a bit too long compare to the rest
mgersh
2016/07/27 20:54:12
Done.
| |
| 496 * followed, unless the request is paused or canceled during this | 496 * called. If the redirect response has a body, it will be ignored. |
| 497 * callback. If the redirect response has a body, it will be ignored. | |
| 498 * This will only be called between start and onResponseStarted. | 497 * This will only be called between start and onResponseStarted. |
| 499 * | 498 * |
| 500 * @param newLocation Location where request is redirected. | 499 * @param newLocation Location where request is redirected. |
| 501 * @param httpStatusCode from redirect response | 500 * @param httpStatusCode from redirect response |
| 502 * @param receivedBytesCount count of bytes received for redirect response | 501 * @param receivedBytesCount count of bytes received for redirect response |
| 503 * @param headers an array of response headers with keys at the even indices | 502 * @param headers an array of response headers with keys at the even indices |
| 504 * followed by the corresponding values at the odd indices. | 503 * followed by the corresponding values at the odd indices. |
| 505 */ | 504 */ |
| 506 @SuppressWarnings("unused") | 505 @SuppressWarnings("unused") |
| 507 @CalledByNative | 506 @CalledByNative |
| (...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 758 @NativeClassQualifiedName("CronetURLRequestAdapter") | 757 @NativeClassQualifiedName("CronetURLRequestAdapter") |
| 759 private native boolean nativeReadData( | 758 private native boolean nativeReadData( |
| 760 long nativePtr, ByteBuffer byteBuffer, int position, int capacity); | 759 long nativePtr, ByteBuffer byteBuffer, int position, int capacity); |
| 761 | 760 |
| 762 @NativeClassQualifiedName("CronetURLRequestAdapter") | 761 @NativeClassQualifiedName("CronetURLRequestAdapter") |
| 763 private native void nativeDestroy(long nativePtr, boolean sendOnCanceled); | 762 private native void nativeDestroy(long nativePtr, boolean sendOnCanceled); |
| 764 | 763 |
| 765 @NativeClassQualifiedName("CronetURLRequestAdapter") | 764 @NativeClassQualifiedName("CronetURLRequestAdapter") |
| 766 private native void nativeGetStatus(long nativePtr, UrlRequest.StatusListene r listener); | 765 private native void nativeGetStatus(long nativePtr, UrlRequest.StatusListene r listener); |
| 767 } | 766 } |
| OLD | NEW |