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

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

Issue 500193002: Fix Cronet compilation and test errors. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 4 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 379 matching lines...) Expand 10 before | Expand all | Expand 10 after
390 public String getContentType() { 390 public String getContentType() {
391 return mContentType; 391 return mContentType;
392 } 392 }
393 393
394 public String getHeader(String name) { 394 public String getHeader(String name) {
395 validateHeadersAvailable(); 395 validateHeadersAvailable();
396 return nativeGetHeader(mUrlRequestAdapter, name); 396 return nativeGetHeader(mUrlRequestAdapter, name);
397 } 397 }
398 398
399 // All response headers. 399 // All response headers.
400 @SuppressWarnings("unused")
mmenke 2014/08/25 19:46:44 Should this be using the called by native thing?
mef 2014/08/25 20:26:18 Well, it isn't really called by native. Per discu
mef 2014/08/25 22:12:42 Per discussion with clm@ this is not a fix, but ju
400 public Map<String, List<String>> getAllHeaders() { 401 public Map<String, List<String>> getAllHeaders() {
401 validateHeadersAvailable(); 402 validateHeadersAvailable();
402 ResponseHeadersMap result = new ResponseHeadersMap(); 403 ResponseHeadersMap result = new ResponseHeadersMap();
403 nativeGetAllHeaders(mUrlRequestAdapter, result); 404 nativeGetAllHeaders(mUrlRequestAdapter, result);
404 return result; 405 return result;
405 } 406 }
406 407
407 public String getUrl() { 408 public String getUrl() {
408 return mUrl; 409 return mUrl;
409 } 410 }
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after
675 676
676 private native String nativeGetHeader(long urlRequestAdapter, String name); 677 private native String nativeGetHeader(long urlRequestAdapter, String name);
677 678
678 private native void nativeGetAllHeaders(long urlRequestAdapter, 679 private native void nativeGetAllHeaders(long urlRequestAdapter,
679 ResponseHeadersMap headers); 680 ResponseHeadersMap headers);
680 681
681 // Explicit class to work around JNI-generator generics confusion. 682 // Explicit class to work around JNI-generator generics confusion.
682 private class ResponseHeadersMap extends HashMap<String, List<String>> { 683 private class ResponseHeadersMap extends HashMap<String, List<String>> {
683 } 684 }
684 } 685 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698