Update docs on CronetHttpURLConnection#setXXXTimeout or make CronetHttpURLConnection support them in a reasonable manner |
||||||||
Issue descriptionCronet's HttpURLConnection does not support setConnectTimeout and setReadTimeout. We should amend the Javadocs on CronetURLStreamHandlerFactory.java and other relevant docs to make a note of this limitation. Alternatively, we should explore a way to support them in a reasonable manner. It is suggested that we can do BlockingQueue.poll(timeout) rather than wait indefinitely.
,
May 16 2016
,
May 18 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/5d1f9896cfc04ffcd76f5995c5725891a0ed8882 commit 5d1f9896cfc04ffcd76f5995c5725891a0ed8882 Author: xunjieli <xunjieli@chromium.org> Date: Wed May 18 20:44:34 2016 Support setReadTimeout in CronetHttpURLConnection This CL adds support for setReadTimeout in CronetHttpURLConnection. Because of late binding of sockets to requests, we cannot support per-request connect timeout. This CL adds an UnsupportedOperationException when setConnectTimeout is invoked. The implementation part of the CL is mostly taken from a patch by rohitagr@. This CL also adds unit tests. BUG= 611851 Review-Url: https://codereview.chromium.org/1984723002 Cr-Commit-Position: refs/heads/master@{#394541} [modify] https://crrev.com/5d1f9896cfc04ffcd76f5995c5725891a0ed8882/components/cronet/android/java/src/org/chromium/net/urlconnection/CronetHttpURLConnection.java [modify] https://crrev.com/5d1f9896cfc04ffcd76f5995c5725891a0ed8882/components/cronet/android/java/src/org/chromium/net/urlconnection/MessageLoop.java [modify] https://crrev.com/5d1f9896cfc04ffcd76f5995c5725891a0ed8882/components/cronet/android/test/javatests/src/org/chromium/net/urlconnection/CronetHttpURLConnectionTest.java [modify] https://crrev.com/5d1f9896cfc04ffcd76f5995c5725891a0ed8882/components/cronet/android/test/javatests/src/org/chromium/net/urlconnection/MessageLoopTest.java [modify] https://crrev.com/5d1f9896cfc04ffcd76f5995c5725891a0ed8882/components/cronet/android/test/mock_url_request_job_factory.cc [modify] https://crrev.com/5d1f9896cfc04ffcd76f5995c5725891a0ed8882/components/cronet/android/test/src/org/chromium/net/MockUrlRequestJobFactory.java [modify] https://crrev.com/5d1f9896cfc04ffcd76f5995c5725891a0ed8882/net/BUILD.gn [modify] https://crrev.com/5d1f9896cfc04ffcd76f5995c5725891a0ed8882/net/net.gyp [add] https://crrev.com/5d1f9896cfc04ffcd76f5995c5725891a0ed8882/net/test/url_request/url_request_hanging_read_job.cc [add] https://crrev.com/5d1f9896cfc04ffcd76f5995c5725891a0ed8882/net/test/url_request/url_request_hanging_read_job.h
,
May 18 2016
,
Jun 2 2016
,
Jun 2 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/7130ccb5f2fa407a7dd54e221744978475d8b64e commit 7130ccb5f2fa407a7dd54e221744978475d8b64e Author: xunjieli <xunjieli@chromium.org> Date: Thu Jun 02 16:59:21 2016 Make CronetHttpURLConnection#setConnectTimeout silently fail This CL makes setConnectTimeout to fail silently so we don't crash applications when this method is called. The goal of Cronet's HttpURLConnection impl is to facilitate applications to try out Cronet. In order to do so, we would like it to be as easy as possible to drop in Cronet's HttpURLConnection impl without hitting any exceptions. We should only reserve the use of exceptions when absolutely necessary (e.g. in matters of correctness), but not for issues of sub-optimality (e.g. HTTP cache being ignored). BUG= 611851 Review-Url: https://codereview.chromium.org/2030933002 Cr-Commit-Position: refs/heads/master@{#397450} [modify] https://crrev.com/7130ccb5f2fa407a7dd54e221744978475d8b64e/components/cronet/android/java/src/org/chromium/net/urlconnection/CronetHttpURLConnection.java [modify] https://crrev.com/7130ccb5f2fa407a7dd54e221744978475d8b64e/components/cronet/android/test/javatests/src/org/chromium/net/urlconnection/CronetHttpURLConnectionTest.java
,
Jun 2 2016
Hello, can we have this merged in M52? This is in Cronet layer, and it won't impact Chrome.
,
Jun 2 2016
Your change meets the bar and is auto-approved for M52 (branch: 2743)
,
Jun 2 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/01585fdf8e4550c0f989c946931565ae3c1248b0 commit 01585fdf8e4550c0f989c946931565ae3c1248b0 Author: xunjieli <xunjieli@chromium.org> Date: Thu Jun 02 17:37:32 2016 Make CronetHttpURLConnection#setConnectTimeout silently fail This CL makes setConnectTimeout to fail silently so we don't crash applications when this method is called. The goal of Cronet's HttpURLConnection impl is to facilitate applications to try out Cronet. In order to do so, we would like it to be as easy as possible to drop in Cronet's HttpURLConnection impl without hitting any exceptions. We should only reserve the use of exceptions when absolutely necessary (e.g. in matters of correctness), but not for issues of sub-optimality (e.g. HTTP cache being ignored). BUG= 611851 TBR=pauljensen@chromium.org NOTRY=true NOPRESUBMIT=true Review-Url: https://codereview.chromium.org/2030933002 Cr-Commit-Position: refs/heads/master@{#397450} (cherry picked from commit 7130ccb5f2fa407a7dd54e221744978475d8b64e) Review-Url: https://codereview.chromium.org/2037683003 Cr-Commit-Position: refs/branch-heads/2743@{#192} Cr-Branched-From: 2b3ae3b8090361f8af5a611712fc1a5ab2de53cb-refs/heads/master@{#394939} [modify] https://crrev.com/01585fdf8e4550c0f989c946931565ae3c1248b0/components/cronet/android/java/src/org/chromium/net/urlconnection/CronetHttpURLConnection.java [modify] https://crrev.com/01585fdf8e4550c0f989c946931565ae3c1248b0/components/cronet/android/test/javatests/src/org/chromium/net/urlconnection/CronetHttpURLConnectionTest.java
,
Jun 2 2016
|
||||||||
►
Sign in to add a comment |
||||||||
Comment 1 by xunji...@chromium.org
, May 13 2016