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

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

Issue 544223003: Add SetSupportsQuic method to explicitly specify server that supports QUIC. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added QUIC hints to HttpUrlRequestFactoryConfig. Created 6 years, 3 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.util.Log; 7 import android.util.Log;
8 8
9 import org.apache.http.conn.ConnectTimeoutException; 9 import org.apache.http.conn.ConnectTimeoutException;
10 import org.chromium.base.CalledByNative; 10 import org.chromium.base.CalledByNative;
(...skipping 372 matching lines...) Expand 10 before | Expand all | Expand 10 after
383 return mCanceled; 383 return mCanceled;
384 } 384 }
385 } 385 }
386 386
387 public boolean isRecycled() { 387 public boolean isRecycled() {
388 synchronized (mLock) { 388 synchronized (mLock) {
389 return mRecycled; 389 return mRecycled;
390 } 390 }
391 } 391 }
392 392
393 @Override
394 public String getNegotiatedProtocol() {
Charles 2014/09/09 17:03:56 Check to make sure we've received headers first, a
mef 2014/09/10 16:48:17 Done.
395 return nativeGetNegotiatedProtocol(mUrlRequestAdapter);
396 }
397
393 public String getContentType() { 398 public String getContentType() {
394 return mContentType; 399 return mContentType;
395 } 400 }
396 401
397 public String getHeader(String name) { 402 public String getHeader(String name) {
398 validateHeadersAvailable(); 403 validateHeadersAvailable();
399 return nativeGetHeader(mUrlRequestAdapter, name); 404 return nativeGetHeader(mUrlRequestAdapter, name);
400 } 405 }
401 406
402 // All response headers. 407 // All response headers.
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after
680 685
681 private native String nativeGetContentType(long urlRequestAdapter); 686 private native String nativeGetContentType(long urlRequestAdapter);
682 687
683 private native long nativeGetContentLength(long urlRequestAdapter); 688 private native long nativeGetContentLength(long urlRequestAdapter);
684 689
685 private native String nativeGetHeader(long urlRequestAdapter, String name); 690 private native String nativeGetHeader(long urlRequestAdapter, String name);
686 691
687 private native void nativeGetAllHeaders(long urlRequestAdapter, 692 private native void nativeGetAllHeaders(long urlRequestAdapter,
688 ResponseHeadersMap headers); 693 ResponseHeadersMap headers);
689 694
695 private native String nativeGetNegotiatedProtocol(long urlRequestAdapter);
696
690 // Explicit class to work around JNI-generator generics confusion. 697 // Explicit class to work around JNI-generator generics confusion.
691 private class ResponseHeadersMap extends HashMap<String, List<String>> { 698 private class ResponseHeadersMap extends HashMap<String, List<String>> {
692 } 699 }
693 } 700 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698