| 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; | 5 package org.chromium.net; |
| 6 | 6 |
| 7 import android.content.Context; | 7 import android.content.Context; |
| 8 import android.os.Build; | 8 import android.os.Build; |
| 9 | 9 |
| 10 import java.nio.channels.WritableByteChannel; | 10 import java.nio.channels.WritableByteChannel; |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 public boolean isEnabled() { | 32 public boolean isEnabled() { |
| 33 return Build.VERSION.SDK_INT >= 14; | 33 return Build.VERSION.SDK_INT >= 14; |
| 34 } | 34 } |
| 35 | 35 |
| 36 @Override | 36 @Override |
| 37 public String getName() { | 37 public String getName() { |
| 38 return "Chromium/" + UrlRequestContext.getVersion(); | 38 return "Chromium/" + UrlRequestContext.getVersion(); |
| 39 } | 39 } |
| 40 | 40 |
| 41 @Override | 41 @Override |
| 42 public HttpUrlRequest createRequest(String url, int requestPriority, | 42 public ChromiumUrlRequest createRequest(String url, int requestPriority, |
| 43 Map<String, String> headers, HttpUrlRequestListener listener) { | 43 Map<String, String> headers, HttpUrlRequestListener listener) { |
| 44 return new ChromiumUrlRequest(mRequestContext, url, requestPriority, | 44 return new ChromiumUrlRequest(mRequestContext, url, requestPriority, |
| 45 headers, listener); | 45 headers, listener); |
| 46 } | 46 } |
| 47 | 47 |
| 48 @Override | 48 @Override |
| 49 public HttpUrlRequest createRequest(String url, int requestPriority, | 49 public ChromiumUrlRequest createRequest(String url, int requestPriority, |
| 50 Map<String, String> headers, WritableByteChannel channel, | 50 Map<String, String> headers, WritableByteChannel channel, |
| 51 HttpUrlRequestListener listener) { | 51 HttpUrlRequestListener listener) { |
| 52 return new ChromiumUrlRequest(mRequestContext, url, requestPriority, | 52 return new ChromiumUrlRequest(mRequestContext, url, requestPriority, |
| 53 headers, channel, listener); | 53 headers, channel, listener); |
| 54 } | 54 } |
| 55 } | 55 } |
| OLD | NEW |