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

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

Issue 1849753002: [Cronet] Separate Cronet implementation and API by package name. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: sync Created 4 years, 5 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 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; 5 package org.chromium.net;
6 6
7 import android.support.annotation.IntDef; 7 import android.support.annotation.IntDef;
8 import android.util.Log; 8 import android.util.Log;
9 import android.util.Pair; 9 import android.util.Pair;
10 10
(...skipping 487 matching lines...) Expand 10 before | Expand all | Expand 10 after
498 * {@link UrlRequest#read read()} operation.) 498 * {@link UrlRequest#read read()} operation.)
499 */ 499 */
500 public static final int READING_RESPONSE = 14; 500 public static final int READING_RESPONSE = 14;
501 501
502 private Status() {} 502 private Status() {}
503 503
504 /** 504 /**
505 * Convert a LoadState int to one of values listed above. 505 * Convert a LoadState int to one of values listed above.
506 * @param loadState a LoadState to convert. 506 * @param loadState a LoadState to convert.
507 * @return static int Status. 507 * @return static int Status.
508 * @hide only used by internal implementation.
508 */ 509 */
509 @StatusValues 510 @StatusValues
510 static int convertLoadState(int loadState) { 511 public static int convertLoadState(int loadState) {
511 assert loadState >= LoadState.IDLE && loadState <= LoadState.READING _RESPONSE; 512 assert loadState >= LoadState.IDLE && loadState <= LoadState.READING _RESPONSE;
512 switch (loadState) { 513 switch (loadState) {
513 case (LoadState.IDLE): 514 case (LoadState.IDLE):
514 return IDLE; 515 return IDLE;
515 516
516 case (LoadState.WAITING_FOR_STALLED_SOCKET_POOL): 517 case (LoadState.WAITING_FOR_STALLED_SOCKET_POOL):
517 return WAITING_FOR_STALLED_SOCKET_POOL; 518 return WAITING_FOR_STALLED_SOCKET_POOL;
518 519
519 case (LoadState.WAITING_FOR_AVAILABLE_SOCKET): 520 case (LoadState.WAITING_FOR_AVAILABLE_SOCKET):
520 return WAITING_FOR_AVAILABLE_SOCKET; 521 return WAITING_FOR_AVAILABLE_SOCKET;
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
677 * the request's current status. {@code listener} will be invoked 678 * the request's current status. {@code listener} will be invoked
678 * back on the {@link Executor} passed in when the request was 679 * back on the {@link Executor} passed in when the request was
679 * created. 680 * created.
680 */ 681 */
681 public void getStatus(final StatusListener listener); 682 public void getStatus(final StatusListener listener);
682 683
683 // Note: There are deliberately no accessors for the results of the request 684 // Note: There are deliberately no accessors for the results of the request
684 // here. Having none removes any ambiguity over when they are populated, 685 // here. Having none removes any ambiguity over when they are populated,
685 // particularly in the redirect case. 686 // particularly in the redirect case.
686 } 687 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698