| 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 | 8 |
| 9 import java.nio.channels.WritableByteChannel; | 9 import java.nio.channels.WritableByteChannel; |
| 10 import java.util.Map; | 10 import java.util.Map; |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 mContext = context.getApplicationContext(); | 21 mContext = context.getApplicationContext(); |
| 22 } | 22 } |
| 23 | 23 |
| 24 @Override | 24 @Override |
| 25 public boolean isEnabled() { | 25 public boolean isEnabled() { |
| 26 return true; | 26 return true; |
| 27 } | 27 } |
| 28 | 28 |
| 29 @Override | 29 @Override |
| 30 public String getName() { | 30 public String getName() { |
| 31 return "HttpUrlConnection"; | 31 return "HttpUrlConnection/" + Version.getVersion(); |
| 32 } | 32 } |
| 33 | 33 |
| 34 @Override | 34 @Override |
| 35 public HttpUrlRequest createRequest(String url, int requestPriority, | 35 public HttpUrlRequest createRequest(String url, int requestPriority, |
| 36 Map<String, String> headers, HttpUrlRequestListener listener) { | 36 Map<String, String> headers, HttpUrlRequestListener listener) { |
| 37 return new HttpUrlConnectionUrlRequest(mContext, url, requestPriority, | 37 return new HttpUrlConnectionUrlRequest(mContext, url, requestPriority, |
| 38 headers, listener); | 38 headers, listener); |
| 39 } | 39 } |
| 40 | 40 |
| 41 @Override | 41 @Override |
| 42 public HttpUrlRequest createRequest(String url, int requestPriority, | 42 public HttpUrlRequest createRequest(String url, int requestPriority, |
| 43 Map<String, String> headers, WritableByteChannel channel, | 43 Map<String, String> headers, WritableByteChannel channel, |
| 44 HttpUrlRequestListener listener) { | 44 HttpUrlRequestListener listener) { |
| 45 return new HttpUrlConnectionUrlRequest(mContext, url, requestPriority, | 45 return new HttpUrlConnectionUrlRequest(mContext, url, requestPriority, |
| 46 headers, channel, listener); | 46 headers, channel, listener); |
| 47 } | 47 } |
| 48 } | 48 } |
| OLD | NEW |