| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 static android.os.Process.THREAD_PRIORITY_BACKGROUND; | 7 import static android.os.Process.THREAD_PRIORITY_BACKGROUND; |
| 8 import static android.os.Process.THREAD_PRIORITY_MORE_FAVORABLE; | 8 import static android.os.Process.THREAD_PRIORITY_MORE_FAVORABLE; |
| 9 | 9 |
| 10 import java.io.IOException; | 10 import java.io.IOException; |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 | 57 |
| 58 @Override | 58 @Override |
| 59 public UrlRequest createRequest(String url, UrlRequest.Callback callback, Ex
ecutor executor, | 59 public UrlRequest createRequest(String url, UrlRequest.Callback callback, Ex
ecutor executor, |
| 60 int priority, Collection<Object> connectionAnnotations) { | 60 int priority, Collection<Object> connectionAnnotations) { |
| 61 return new JavaUrlRequest(callback, mExecutorService, executor, url, mUs
erAgent); | 61 return new JavaUrlRequest(callback, mExecutorService, executor, url, mUs
erAgent); |
| 62 } | 62 } |
| 63 | 63 |
| 64 @Override | 64 @Override |
| 65 BidirectionalStream createBidirectionalStream(String url, BidirectionalStrea
m.Callback callback, | 65 BidirectionalStream createBidirectionalStream(String url, BidirectionalStrea
m.Callback callback, |
| 66 Executor executor, String httpMethod, List<Map.Entry<String, String>
> requestHeaders, | 66 Executor executor, String httpMethod, List<Map.Entry<String, String>
> requestHeaders, |
| 67 @BidirectionalStream.Builder.StreamPriority int priority) { | 67 @BidirectionalStream.Builder.StreamPriority int priority, boolean di
sableAutoFlush) { |
| 68 throw new UnsupportedOperationException( | 68 throw new UnsupportedOperationException( |
| 69 "Can't create a bidi stream - httpurlconnection doesn't have tho
se APIs"); | 69 "Can't create a bidi stream - httpurlconnection doesn't have tho
se APIs"); |
| 70 } | 70 } |
| 71 | 71 |
| 72 @Override | 72 @Override |
| 73 boolean isEnabled() { | 73 boolean isEnabled() { |
| 74 return true; | 74 return true; |
| 75 } | 75 } |
| 76 | 76 |
| 77 @Override | 77 @Override |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 135 // Returning null causes this factory to pass though, which ends up usin
g the platform's | 135 // Returning null causes this factory to pass though, which ends up usin
g the platform's |
| 136 // implementation. | 136 // implementation. |
| 137 return new URLStreamHandlerFactory() { | 137 return new URLStreamHandlerFactory() { |
| 138 @Override | 138 @Override |
| 139 public URLStreamHandler createURLStreamHandler(String protocol) { | 139 public URLStreamHandler createURLStreamHandler(String protocol) { |
| 140 return null; | 140 return null; |
| 141 } | 141 } |
| 142 }; | 142 }; |
| 143 } | 143 } |
| 144 } | 144 } |
| OLD | NEW |