New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 611851 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Jun 2016
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 2
Type: Bug



Sign in to add a comment

Update docs on CronetHttpURLConnection#setXXXTimeout or make CronetHttpURLConnection support them in a reasonable manner

Project Member Reported by xunji...@chromium.org, May 13 2016

Issue description

Cronet'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.
 
Labels: -Pri-3 Pri-2
Owner: xunji...@chromium.org
Status: Started (was: Available)
Project Member

Comment 3 by bugdroid1@chromium.org, 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

Status: Fixed (was: Started)
Status: Started (was: Fixed)
Project Member

Comment 6 by bugdroid1@chromium.org, 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

Labels: Merge-Request-52
Hello, can we have this merged in M52? This is in Cronet layer, and it won't impact Chrome.

Comment 8 by tin...@google.com, Jun 2 2016

Labels: -Merge-Request-52 Merge-Approved-52 Hotlist-Merge-Approved
Your change meets the bar and is auto-approved for M52 (branch: 2743)
Project Member

Comment 9 by bugdroid1@chromium.org, Jun 2 2016

Labels: -merge-approved-52 merge-merged-2743
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

Status: Fixed (was: Started)

Sign in to add a comment